Tone Montone via plug on 16 Dec 2021 15:06:26 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Growing a RAID 5 (sorry about the missend)


The initial 2 device raid5 was 1TB.

You then added two new devices, 1TB each, and attempted to grow the raid5, but it still says 1TB?  Am I reading the output correctly?

Usually, I would have created a raid5 with at least 3 devices.  Although two worked, I don’t know how parity would work when one device is lost.  I have seen odd behavior when the disks are not exactly the same.  Are they the same make and model?



Sent from my iPhone

On Dec 16, 2021, at 5:44 PM, Adam Zion via plug <plug@lists.phillylinux.org> wrote:


Let's try that again...

I had a 1 TB RAID 5 consisting of 2 1TB drives (yes, that works). To double its capacity, I purchased two more 1TB drives. They were mounted as /dev/sdc and /dev/sdd, and I created an ext4 partition on each so that I had /dev/sdc1 and /dev/sdd1.

Then, I needed to issue commands to grow the RAID. I did as follows:

sudo --grow --raid-devices=4 /dev/md0
and
sudo mdadm --grow --raid-devices=4 /dev/md0

I had expected that the second command would take a LONG time to complete. But, it seemed to finish in <1 min. Now, sudo mdadm --detail /dev/md0 yields the following:

/dev/md0:
           Version : 1.2
     Creation Time : Thu Dec  9 23:50:04 2021
        Raid Level : raid5
        Array Size : 976627712 (931.38 GiB 1000.07 GB)
     Used Dev Size : 976627712 (931.38 GiB 1000.07 GB)
      Raid Devices : 4
     Total Devices : 4
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Thu Dec 16 22:40:07 2021
             State : clean, reshaping
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 512K

Consistency Policy : bitmap

    Reshape Status : 0% complete
     Delta Devices : 2, (2->4)

              Name : home-nas:0  (local to host home-nas)
              UUID : 41dcee9c:5feb3a19:d1d7ce0e:905f749d
            Events : 12742

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       2       8        1        1      active sync   /dev/sda1
       4       8       49        2      active sync   /dev/sdd1
       3       8       33        3      active sync   /dev/sdc1

Obviously, from the array size at the top, this has not completed adding the new drives to the RAID. But, at the bottom, mdadm clearly shows that it has done so.

Thoughts?

--
Adam+Zion, MSIS
Registered Linux User #471910
http://www.adamzion.com
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug