I have an existing Software RAID consisting of 4 partitions on a Server running Ubuntu 22. I want to decrease the size of the md2 partition and increase the size of the md3 partition.
How do achieve that without data loss? The partition to be decreased in size has sufficient space to do so.
root@Ubuntu-2204-jammy-arm64-base ~ # cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid10]
md3 : active raid6 nvme0n1p5[0] nvme1n1p5[1] nvme2n1p5[2] nvme3n1p5[3]
5378365440 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
[==========>..........] resync = 50.1% (1347715200/2689182720) finish=105.4min speed=212018K/sec
bitmap: 21/21 pages [84KB], 65536KB chunk
md2 : active raid6 nvme2n1p4[2] nvme0n1p4[0] nvme1n1p4[1] nvme3n1p4[3]
2111567872 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
resync=DELAYED
bitmap: 8/8 pages [32KB], 65536KB chunk
md0 : active raid1 nvme0n1p2[0] nvme3n1p2[3] nvme1n1p2[1] nvme2n1p2[2]
4189184 blocks super 1.2 [4/4] [UUUU]
md1 : active raid1 nvme1n1p3[1] nvme0n1p3[0] nvme2n1p3[2] nvme3n1p3[3]
1046528 blocks super 1.2 [4/4] [UUUU]
Disk sizes:
root@Ubuntu-2204-jammy-arm64-base ~ # df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 26G 2.4M 26G 1% /run
/dev/md2 2.0T 2.1G 1.9T 1% /
tmpfs 126G 0 126G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/md1 989M 129M 810M 14% /boot
/dev/nvme3n1p1 256M 340K 256M 1% /boot/efi
/dev/md3 5.0T 25G 4.7T 1% /home
tmpfs 26G 0 26G 0% /run/user/0
tmpfs 26G 0 26G 0% /run/user/1000