Page 1 of 1

Software RAID-1 Using 4 TB Hard Drive

Posted: 2017/11/27 03:40:56
by etpoole60
I mentioned in another post that I am building a new machine and I thought I would save port space by getting larger hard drives ( 2 - 4 TB drives instead of 4 - 2 TB drives).

I learned the hard way that fdisk won't handle drives larger than 2 TB. I tried to use gdisk but when I got to the point to do the mdadm --create I wouldn't 'see' those gdisk created partitions (I also saw that there was no Extended partition).

What gives? Is there a 'step-by-step' document on how to do software raid-1 with large hard drives?

TIA
Gene

Re: Software RAID-1 Using 4 TB Hard Drive

Posted: 2017/11/27 10:37:39
by TrevorH
What is the output from gdisk -l /dev/sd[a-z] ?

Re: Software RAID-1 Using 4 TB Hard Drive

Posted: 2017/11/27 20:04:21
by etpoole60
OK, I may have solved my problem by putzing around with gdisk.

Here's what I did:
1. After creating the partition by entering the 'N' command and taking the defaults for partition number and starting location and 'FD00' for type.
2. I then entered 'R' to go to the 'Recovery' menu.
3. I entered 'H' to create a MBR - entered 'N' so I didn't override what is already there; default for 'FD'; and 'N' for not bootable.
4. I entered 'W' to write the configuration along with a 'Y' to continue.
5. Why I don't know why, I had to reboot the machine

After the reboot I entered 'ls -ltr /dev/sd*' and lo and behold there was all of the partitions I had created!

I then entered the following commands:
'mdadm --create /dev/md4 --level=raid1 --raid-devices=2 /dev/sdc1 /dev/sdd1'
'mdadm --create /dev/md5 --level=raid1 --raid-devices=2 /dev/sdc2 /dev/sdd2'
'mdadm --create /dev/md6 --level=raid1 --raid-devices=2 /dev/sdc3 /dev/sdd3'
'mdadm --create /dev/md7 --level=raid1 --raid-devices=2 /dev/sdc4 /dev/sdd4'

From this point I just did the LVM commands as required.

One question is - Why was a reboot required? Why did I have to do what I did? Am I the first to use large drives and software RAID?

TIA
Gene

Re: Software RAID-1 Using 4 TB Hard Drive

Posted: 2017/11/28 09:13:34
by jlehtone
etpoole60 wrote:One question is - Why was a reboot required?
The kernel does, on boot, read partition tables from disks. On some conditions the fdisk/gdisk/etc fails to update the in-kernel-memory tables to match changes made to the on-disk tables. There are tools like 'kpartx' to reread some partition tables, but as said, kernel is a git in some cases.

Re: Software RAID-1 Using 4 TB Hard Drive

Posted: 2017/11/29 04:15:06
by Whoever
You can always try "partprobe".