Software RAID-1 Using 4 TB Hard Drive

Issues related to hardware problems
Post Reply
etpoole60
Posts: 56
Joined: 2015/06/21 23:25:20

Software RAID-1 Using 4 TB Hard Drive

Post by etpoole60 » 2017/11/27 03:40:56

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
Happily Retired
Gene Poole
Woodstock, Georgia

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Software RAID-1 Using 4 TB Hard Drive

Post by TrevorH » 2017/11/27 10:37:39

What is the output from gdisk -l /dev/sd[a-z] ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

etpoole60
Posts: 56
Joined: 2015/06/21 23:25:20

Re: Software RAID-1 Using 4 TB Hard Drive

Post by etpoole60 » 2017/11/27 20:04:21

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
Happily Retired
Gene Poole
Woodstock, Georgia

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Software RAID-1 Using 4 TB Hard Drive

Post by jlehtone » 2017/11/28 09:13:34

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.

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Software RAID-1 Using 4 TB Hard Drive

Post by Whoever » 2017/11/29 04:15:06

You can always try "partprobe".

Post Reply