[Nottingham] Growing a RAID 1

Brian Pickford brian at brianpickford.co.uk
Wed Jan 18 10:28:16 UTC 2023


Hi,

I'm far from an expert here, but I have setup and used arrays for as long
as you have. Mine tend to fail more often though :(

When replacing an array, I'd set up a new array with a temporary mount
point say, /mnt/lib
mkdir /mnt/lib
set ownership as you need
rsync the current array data to the temp so /var/lib to /mnt/lib
use lsblk and blkid to get the UUID
boot using a liveUSB
alter my fstab to refer to the new UUID, keeping the old one either on a
temp mount point or commented out
check everything is OK, leave like this for a week or so, then remove the
old drives

Seems easier than trying to add disks of different sizes to your existing
array

Good luck

On Tue, 17 Jan 2023 at 23:58, J I via Nottingham <
nottingham at mailman.lug.org.uk> wrote:

> Hello everyone, hope you are keeping well.
>
> I have an old RAID setup using drives from 2011 and whilst I've not had
> issues, I am getting a bit nervous about them.
>
> At the moment both 2TB drives are in mdadm RAID1 (/dev/md0), and LVM sits
> on top of that, the actual FS is the unexciting Ext4:
> #lsblk
> ...
> sda                  8:0    0   1.8T  0 disk
> └─md0                9:0    0   1.8T  0 raid1
>  └─primary-varlib 253:0    0   1.8T  0 lvm   /var/lib
> sdb                  8:16   0   1.8T  0 disk
> └─md0                9:0    0   1.8T  0 raid1
>  └─primary-varlib 253:0    0   1.8T  0 lvm   /var/lib
> ...
> As you  can see they are not boot, just data really.
>
> I want to replace them both with new 4TB Seagate IronWolfs
>
> Can anyone point me at some instructions on how to do that? My search-fu
> is failing me and I have a feeling it's going to be more complicated than
> just replacing the drives one at a time with a rebuild (and then some magic
> to grow things to the full 4TB).
>
> Do I need to be overly concerned with /etc/fstab which seems to be using a
> UUID:
> /dev/disk/by-id/dm-uuid-LVM-47rf... /var/lib ext4 defaults 0 0
>
> This is all on Ubuntu Server 22.04.
>
> Cheers!
>
> J.
>
> Some more info if it helps:
> #file -sL /dev/primary/varlib
> /dev/primary/varlib: Linux rev 1.0 ext4 filesystem data...
>
> #mdadm --misc --detail /dev/md0
> /dev/md0:
>           Version : 1.2
>     Creation Time : Sun May 24 15:00:15 2020
>        Raid Level : raid1
>        Array Size : 1953382464 (1862.89 GiB 2000.26 GB)
>     Used Dev Size : 1953382464 (1862.89 GiB 2000.26 GB)
>      Raid Devices : 2
>     Total Devices : 2
>       Persistence : Superblock is persistent
>
>     Intent Bitmap : Internal
>
>       Update Time : Tue Jan 17 23:22:16 2023
>             State : clean
>    Active Devices : 2
>   Working Devices : 2
>    Failed Devices : 0
>     Spare Devices : 0
>
> Consistency Policy : bitmap
>
>              Name : ubuntu-server:0
>              UUID : 7df346bb:a3c7ee5a:aa7ea17b:09c1c352
>            Events : 88901
>
>    Number   Major   Minor   RaidDevice State
>       0       8        0        0      active sync   /dev/sda
>       1       8       16        1      active sync   /dev/sdb
> --
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/nottingham/attachments/20230118/37f74f9f/attachment.htm>


More information about the Nottingham mailing list