Score:0

Resize partitions Ubuntu 18.04 RAID 1

bs flag
This is the output of fdisk -l

    Disk /dev/sda: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3F81FC32-1FB9-4EE4-8226-95022D806E2C

Device          Start         End    Sectors  Size Type
/dev/sda1        4096    67112959   67108864   32G Linux RAID
/dev/sda2    67112960    68161535    1048576  512M Linux RAID
/dev/sda3    68161536  4291825663 4223664128    2T Linux RAID
/dev/sda4  4291825664 11721045134 7429219471  3.5T Linux RAID
/dev/sda5        2048        4095       2048    1M BIOS boot

Partition table entries are not in disk order.


Disk /dev/sdb: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 03C36C97-C821-4AC7-A1C4-26B1494E2BDD

Device          Start         End    Sectors  Size Type
/dev/sdb1        4096    67112959   67108864   32G Linux RAID
/dev/sdb2    67112960    68161535    1048576  512M Linux RAID
/dev/sdb3    68161536  4291825663 4223664128    2T Linux RAID
/dev/sdb4  4291825664 11721045134 7429219471  3.5T Linux RAID
/dev/sdb5        2048        4095       2048    1M BIOS boot

Partition table entries are not in disk order.


Disk /dev/md2: 2 TiB, 2162380767232 bytes, 4223399936 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md3: 3.5 TiB, 3803625095168 bytes, 7428955264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md0: 32 GiB, 34325135360 bytes, 67041280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md1: 511 MiB, 535822336 bytes, 1046528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

What I want to achieve is to shrink /dev/md3 from 3.5T to 100GB and to "give" all the other space to /dev/md2 (extend the /dev/md2 from 2TB to 5.4TB)

I cannot have physical access to server in order to use a Live CD so the whole thing has to be done from command line,using fdisk and resize2fs.

Any thoughts or advice?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.