LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Home server with raid0 and raid1 issue after reboot (https://www.linuxquestions.org/questions/linux-software-2/home-server-with-raid0-and-raid1-issue-after-reboot-4175682306/)

karcio 09-17-2020 03:36 PM

Home server with raid0 and raid1 issue after reboot
 
Hi Guys,

Trying to set home server on centos8. I've installed os on raid0 with 2x120GB ssd. Also I did setup raid1 2x500GB disks.
So after that all was correct

Code:

[root@localhost karcio]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.3G    0  7.3G  0% /dev
tmpfs          7.3G    0  7.3G  0% /dev/shm
tmpfs          7.3G  8.8M  7.3G  1% /run
tmpfs          7.3G    0  7.3G  0% /sys/fs/cgroup
/dev/md126      49G  1.8G  45G  4% /
/dev/sda2      976M  141M  769M  16% /boot
/dev/md125      151G  61M  143G  1% /home
/dev/sda1      599M  6.9M  592M  2% /boot/efi
tmpfs          1.5G    0  1.5G  0% /run/user/1000
/dev/md0        458G  73M  434G  1% /mnt/raid1

my fstab looks like

Code:

UUID=59c2c137-52eb-4842-9c63-8d788e33484b /                      ext4    defaults        1 1
UUID=9e6f2deb-411d-4277-bdd1-08dbd46fa338 /boot                  ext4    defaults        1 2
UUID=BED2-6553          /boot/efi              vfat    umask=0077,shortname=winnt 0 2
UUID=54a02e7b-f6a8-4a75-bd17-2de277b1ba15 /home                  ext4    defaults        1 2
UUID=34b70f95-9b7b-471b-be5f-92381f5b59cc swap                    swap    defaults        0 0
UUID=d92f879d-d0c0-44c8-bd7a-1a7a534609c4    /mnt/raid1  ext4  defaults  0  0

but after reboot I can see that:
- mount /mnt/raid1 is failing
- dependency failed for /home
- dependency failed for Local File system

and system does not start. I guess I did somewhere mistake, not sure where :(

Please have a look in screenshot

https://i.postimg.cc/MT9NZH9T/photo-2020-09-17-21-21-35.jpg

lvm_ 09-18-2020 03:01 AM

What is in your /etc/mdadm/mdadm.conf file? What is the contents of /proc/mdstat? What happens when you start the array manually? (also you have three, not two arrays) What happens when you run 'mdadm -s -A'?

karcio 09-18-2020 10:03 AM

Hi please have a look on results

Quote:

What happens when you start the array manually?
-

https://i.postimg.cc/gkL9sqZd/photo5...8708264979.jpg

https://i.postimg.cc/fWmX41Xr/photo5...8708264977.jpg

https://i.postimg.cc/28JVVw4Z/photo5...8708264976.jpg

berndbausch 09-18-2020 03:32 PM

I'd also like to see the result of lsblk -f and/or blkid if these commands are available.

lvm_ 09-19-2020 04:47 AM

Your mdadm.conf is a mess: multiple lines for same arrays, missing swap. I recommend re-creating it from scratch, could be the reason why the system is not booting. Start with basic

Code:

DEVICE partitions
HOMEHOST <system>
MAILADDR root

run 'mdadm --detail --scan >> /etc/mdadm/mdadm.conf' to add array descriptions and edit array names if needed. Ok, backup the original file first.

Also, I made a mistake: 'mdadm -A -s', not 'mdadm -s -A' - sorry. If it start all arrays it means that arrays are fine but configuration files are not.

syg00 09-19-2020 05:07 AM

Root on RAID0 - seriously ?. See my sigline.

karcio 09-19-2020 05:31 AM

Hi please have a look in commands output

https://i.postimg.cc/W4pN4DtK/photo5...8521950172.jpg

https://i.postimg.cc/c1Pf8WRT/photo5...8521950171.jpg

Looks like I have duplicated MD device names in config file, for create file I was using follow command

Quote:

mdadm --detail --scan --verbose | sudo tee -a /etc/mdadm.conf
please notice that config file has different location in centos8

@syg00 what do you mean about root on raid0, is it wrong practice? Please explain, this is my first attempt to raid, so if I doing something wrong please explain what, or share a link I can read,

Thank you all for your help

syg00 09-19-2020 05:50 AM

Read the first couple of sentences of this - you cannot afford the risk; the root doesn't need any purported speed increase RAID0 supposedly offers.

lvm_ 09-19-2020 06:07 AM

Every practice has its place. RAID0 is fast and has no overhead but also has no redundancy and will fail if any of the disk fail, it is quite all right to use it if performance is essential while reliability is not and you don't mind restoring non-booting system from a backup now and then. Not something I would do though.

karcio 09-21-2020 04:06 PM

Hi guys, thank you for all your suggestion.

recreate mdadm config file help me and machine could boot
Code:

mdadm --detail --scan >> /etc/mdadm.conf
https://i.postimg.cc/pTHGSGCN/photo-...1-22-01-31.jpg

but after I've read https://en.wikipedia.org/wiki/Standa..._levels#RAID_0

Decided not to do raid0 on my 2x120GB disks. Instead this I did LVM.

Now it is looks like:

Code:

[root@localhost karcio]# df -h
Filesystem          Size  Used Avail Use% Mounted on
devtmpfs            7.3G    0  7.3G  0% /dev
tmpfs                7.3G    0  7.3G  0% /dev/shm
tmpfs                7.3G  8.8M  7.3G  1% /run
tmpfs                7.3G    0  7.3G  0% /sys/fs/cgroup
/dev/mapper/cl-root  49G  1.8G  45G  4% /
/dev/sda2            976M  143M  766M  16% /boot
/dev/mapper/cl-home  153G  61M  145G  1% /home
/dev/sda1            599M  6.9M  592M  2% /boot/efi
tmpfs                1.5G    0  1.5G  0% /run/user/1000
/dev/md0            458G  73M  434G  1% /mnt/raid1

Regards
karcio


All times are GMT -5. The time now is 05:24 PM.