2

First of all, I am an absolute beginner with Ubuntu Server. I decided to build my own server and running it with 4x 3TB drives in a software RAID mounted as /home and an SSD with the OS on it.

When I first created the Raid it reported the correct size, but after a reboot /dev/md0 went missing. So I rebuilt again.

But this time, the size of /dev/md0 is 1 disk less than previously

lsblk outputs:

NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   2.7T  0 disk
└─sda1    8:1    0   2.7T  0 part
  └─md0   9:0    0   5.5T  0 raid5 /home
sdb       8:16   0   2.7T  0 disk
└─sdb1    8:17   0   2.7T  0 part
  └─md0   9:0    0   5.5T  0 raid5 /home
sdc       8:32   0   2.7T  0 disk
└─sdc1    8:33   0   2.7T  0 part
  └─md0   9:0    0   5.5T  0 raid5 /home
sdd       8:48   0   2.7T  0 disk
└─sdd1    8:49   0   2.7T  0 part
  └─md0   9:0    0   5.5T  0 raid5 /home
sde       8:64   0  55.9G  0 disk
├─sde1    8:65   0   512M  0 part  /boot/efi
├─sde2    8:66   0  39.5G  0 part  /
└─sde3    8:67   0  15.9G  0 part  [SWAP]

sd[abcd]1 are obviously 2.7T, how come mdadm created the array with one drive missing?

cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sdb1[1] sda1[4](S) sdd1[3] sdc1[2]
      5860267008 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

Any advice is appreciated

1 Answer 1

1

Ok, looks like I just didn't understand how a RAID 5 works.

I had always selected 3+1 without really knowing about the Hot Spare mechanism in RAID 5, which then always resulted in 3 TB x ((3 - 1) - 1) = 6 TB total space

https://en.wikipedia.org/wiki/Hot_spare

The missing dev/md0 was due to a falsely generated mdadm.conf

Cheers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .