Re: [CentOS] (C8) root on mdraid

2020-11-15 Thread Ruslanas Gžibovskis
Hi,

I am curious, what config your /etc/grub2.cfg looks like?

does it have the correct root partition specified under "set root=" or in
linux option
or how it looks in boot loader during a start?

Thanks

On Mon, 16 Nov 2020 at 08:41, Łukasz Posadowski 
wrote:

> Sun, 15 Nov 2020 14:16:48 -0800
> Gordon Messmer :
>
> > On 11/15/20 3:32 AM, Łukasz Posadowski wrote:
> > > Do anyone can suggest what else I forgot to do?
> >
> >
> > Use metadata version 1.2 instead of 0.9.
> >
> > You need for the filesystem to be not visible until after the RAID is
> > assembled, and the easiest way to do that is to put the metadata at
> > the beginning of the drive and the partition table inside the RAID
> > volume.
> >
> > With metadata version 0.9, the partition table is technically inside
> > the volume, but it's at the same offset that it would be for a disk
> > with no RAID volume, so it can be recognized before the volume is
> > assembled.
>
> Thanks, I'll try that. I'm use to metadata 0.9, because GRUB have
> (had?) some issue with the newer ones.
>
> --
> Łukasz Posadowski
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


-- 
Ruslanas Gžibovskis
+370 6030 7030
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] (C8) root on mdraid

2020-11-15 Thread Łukasz Posadowski
Sun, 15 Nov 2020 14:16:48 -0800
Gordon Messmer :

> On 11/15/20 3:32 AM, Łukasz Posadowski wrote:
> > Do anyone can suggest what else I forgot to do?
> 
> 
> Use metadata version 1.2 instead of 0.9.
> 
> You need for the filesystem to be not visible until after the RAID is 
> assembled, and the easiest way to do that is to put the metadata at
> the beginning of the drive and the partition table inside the RAID
> volume.
> 
> With metadata version 0.9, the partition table is technically inside
> the volume, but it's at the same offset that it would be for a disk
> with no RAID volume, so it can be recognized before the volume is
> assembled.

Thanks, I'll try that. I'm use to metadata 0.9, because GRUB have
(had?) some issue with the newer ones.

-- 
Łukasz Posadowski
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Intel RST RAID 1, partition tables and UUIDs

2020-11-15 Thread H
I have been having some problems with hardware RAID 1 on the motherboard that I 
am running CentOS 7 on. After a BIOS upgrade of the system, I lost the RAID 1 
setup and was no longer able to boot the system.

Testdisk revealed that the partition tables had been damaged and because I had 
earlier saved information from fdisk, I was able to recreate the partitions. 
However, booting into the BIOS and recreating/synchronizing the RAID from one 
of the disks (took around 20 hours for 256 GB disks), I again lost the ability 
the boot and the partition tables were similarly damaged. Eventually I was able 
to boot the system again from one of the two disks and it is now up and 
running, now running without RAID.

- Should I expect that the Intel RAID 1 setup changes the partition tables? I 
should add that the disks were originally created after the RAID 1 was setup.

- After fooling around with testdisk (and prior to that, parted), it turned out 
that I had lost the disk UUID for both disks, they were both set to 000... 
Partition UUIDs seemed unchanged from before, including the LUKS partitions. 
Are disk UUIDs (not partition UUIDs) not used by Linux since I have not - yet - 
seen any effects of the missing disk UUIDs?

Because there seems to be a couple of other issues with the motherboard, I 
expect to have it replaced early this week but I am still interested in 
learning more.

Thanks.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] (C8) root on mdraid

2020-11-15 Thread Gordon Messmer

On 11/15/20 3:32 AM, Łukasz Posadowski wrote:

Do anyone can suggest what else I forgot to do?



Use metadata version 1.2 instead of 0.9.

You need for the filesystem to be not visible until after the RAID is 
assembled, and the easiest way to do that is to put the metadata at the 
beginning of the drive and the partition table inside the RAID volume.


With metadata version 0.9, the partition table is technically inside the 
volume, but it's at the same offset that it would be for a disk with no 
RAID volume, so it can be recognized before the volume is assembled.


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Apologies - possible hardware problem?

2020-11-15 Thread Jeffrey Layton
Good afternoon,

I have a home workstation with an AMD CPU, Titan V GPU, 32 GB of memory,
and a root SSD and /home on spinning disks.

Right now it has xubuntu 18.04 on it and it would boot fine. I shut it down
and restarted it to get an inventory before I put CentOS 8.2 on it. It
won't boot now. It gets to the grub menu and freezes. I can't use the
keyboard to select an item in the menu and I can't press enter to make it
boot or press "e" to edit the boot line. It just sits there (seemingly
forever). Here's what I've tred:

1. New keyboard/mouse - no change

2. Different monitor - no change

3. Booting from the CentOS 8.2 iso on a USB stick - no change

4. Replacing the TItan V card with a GT 1030 NV card - no change

When booting from a USB stick, I get the BIOS splash screen and press "DEL"
to get to the menu, but the menu never shows up. It just freezes.

This one has me stumped. Not being able to boot from a USB stick is really
puzzling. I've never seen that before. Possible bad MB?

My apologies for using the list to help debug problems but since I'm moving
to CentOS 8.2 I thought people might have some ideas.

TIA!

Jeff
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] (C8) root on mdraid

2020-11-15 Thread Łukasz Posadowski

Hello everyone. 

I'm trying to install CentOS 8 with root and swap partitions on
software raid. The plan is:
- create md0 raid level 1 with 2 hard drives: /dev/sda and /dev/sdb,
using Linux Rscue CD,
- install CentOS 8 with Virtual Box on my laptop,
- rsync CentOS 8 root partition on /dev/md0p1,
- chroot in CentOS 8 root partition,
- configure /etc/mdadm.conf, grub.cfg, initramfs, install bootloader on
both sda and sdb drives.

I think I can do first four of the above, but my CentOS installation
acts strange after rebooting the server. It recognizes the raid, but
boots randomly with root on /dev/sda1 (and recognizes raid
with /dev/sdb disk), or with root on /dev/sdb1 (and recognizes raid
with /dev/sda disk). When booting from Linux Rescue CD, the raid with
two disk is recognized.



Creating md0 wth Linux Rescue CD.

# lsblk
NAME  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0   7:00 819.5M  1 loop /run/archiso/sfs/airootfs
sda 8:00 232.9G  0 disk 
sdb 8:16   0 232.9G  0 disk 
sr011:01   871M  0 rom  

# mdadm --create /dev/md0 --level=1 --raid-devices=2 
--metadata=0.9 /dev/sda /dev/sdb
mdadm: array /dev/md0 started.

# mdadm --detail --scan --verbose
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=fef2f68b:
1a462c80:c44c77eb:7ee19756 devices=/dev/sda,/dev/sdb

# cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb[1] sda[0]
  244198464 blocks [2/2] [UU]
  [>]  resync =  1.9% (4682944/244198464)
finish=52.2min speed=76356K/sec bitmap: 2/2 pages [8KB], 65536KB chunk

unused devices: 

(1 hour later)

# cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb[1] sda[0]
  244198464 blocks [2/2] [UU]
  bitmap: 0/2 pages [0KB], 65536KB chunk

unused devices: 

# lsblk
NAME  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0   7:00 819.5M  1 loop  /run/archiso/sfs/airootfs
sda 8:00 232.9G  0 disk  
└─md0   9:00 232.9G  0 raid1 
sdb 8:16   0 232.9G  0 disk  
└─md0   9:00 232.9G  0 raid1 
sr011:01   871M  0 rom  

-

So far so good. Now partitions:

# fdisk /dev/md0

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x64998720.

Command (m for help): o
Created a new DOS disklabel with disk identifier 0xfe784f57.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-488396927, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-488396927, default
488396927): +220G

Created a new partition 1 of type 'Linux' and of size 220 GiB.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 
First sector (461375488-488396927, default 461375488): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (461375488-488396927,
default 488396927): +4G

Created a new partition 2 of type 'Linux' and of size 4 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.


# lsblk
NAME  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0   7:00 819.5M  1 loop  /run/archiso/sfs/airootfs
sda 8:00 232.9G  0 disk  
└─md0   9:00 232.9G  0 raid1 
  ├─md0p1 259:00   220G  0 part  
  └─md0p2 259:10 4G  0 part  
sdb 8:16   0 232.9G  0 disk  
└─md0   9:00 232.9G  0 raid1 
  ├─md0p1 259:00   220G  0 part  
  └─md0p2 259:10 4G  0 part  
sr011:01   871M  0 rom   


# mkfs -t ext4 /dev/md0p1
mke2fs 1.44.5 (15-Dec-2018)
Creating filesystem with 57671680 4k blocks and 14417920 inodes
Filesystem UUID: 511d0d07-4d55-4b6c-939e-d23ae2da1ce0
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208, 4096000, 7962624, 11239424, 2048, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done 

# mkswap /dev/md0p2 
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
no label, UUID=5667d007-0d3e-4b54-8a72-6ade52609adc

--

Mount would be root partition:

# mkdir /mnt/centos8
# mount -t ext4 /dev/md0p1 /mnt/centos8/

--

OK, I have what I need. Now log into virtualised CentOS 8 in Virtual
Box.

# rpm -q rsync
rsync-3.1.3-7.el8.x86_64
# rpm -q mdadm
mdadm-4.1-13.el8.x86_64

# rsync -vaxAXHSz --delete / 192.168.111.167:/mnt/centos8/
The authenticity of host