- Prepare disk with gparted:
- Terminal:
-
sudo DISPLAY=:5 gparted
- Device > Create Partition Table:
- Partition table type:
gpt
- Partition > New:
- Create as:
Primary Partition
- File system:ext4
- Edit > Apply All Operations
- Partition > Manage flags:
- Enable:
raid
- Prepare RAID device:
- Disable write-intent bitmap:
-
sudo mdadm --grow --bitmap=none /dev/md0
- Grow the RAID device:
- Add new disk to RAID:
-
sudo mdadm --add /dev/md0 /dev/sdh1
- Grow RAID to new number of device with dated backup file:
-
sudo mdadm --grow --raid-devices=7 --backup-file=/grow_md0-2014-11-21.bak /dev/md0
- Wait, a potentially really long time (1-5 days).
- Grow the filesystem on RAID device:
- Stop all services using the mounted RAID device:
- Everything in Monit.
-
sudo service docker stop
-sudo service dropbox stop
- Unmount the RAID device:
-
sudo umount /mnt/raid
- Check filesystem before resize:
-
sudo e2fsck -f /dev/md0
- Resize the filesystem:
-
sudo resize2fs -p /dev/md0
- Re-mount the RAID device:
-
sudo mount /dev/md0 /mnt/raid
- Start all services again:
- Everything in Monit.
-
sudo service docker start
-sudo service dropbox start
- Finish off and cleanup:
- Re-enable write-intent bitmap:
-
sudo mdadm --grow --bitmap=internal /dev/md0
Last active
August 29, 2015 14:14
-
-
Save jimeh/4e5cfe288f7339b2663f to your computer and use it in GitHub Desktop.
Personal notes from last time I added a disk to my RAID, so I've one got compact place to find all steps next time.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment