0

I currently have the following setup on my server:

nvme1n1                                 931.5G
├─nvme1n1p1                                 1M
├─nvme1n1p2           vfat                256M
├─nvme1n1p3           linux_raid_member     2G
│ └─md0               ext4                  2G /boot             boot
└─nvme1n1p4           linux_raid_member 929.3G                   k005981a:1
  └─md1               LVM2_member       929.1G
    ├─vgk005981a-swap swap               15.7G [SWAP]
    └─vgk005981a-root xfs                 9.1G /                 root
nvme0n1                                 931.5G
├─nvme0n1p1                                 1M
├─nvme0n1p2           vfat                256M
├─nvme0n1p3           linux_raid_member     2G
│ └─md0               ext4                  2G /boot             boot
└─nvme0n1p4           linux_raid_member 929.3G                   k005981a:1
  └─md1               LVM2_member       929.1G
    ├─vgk005981a-swap swap               15.7G [SWAP]
    └─vgk005981a-root xfs                 9.1G /                 root

md0 and md1 are in RAID1, but as you can see, most of md1 is unused. I wanted to reduce its size, and mount it as a separate volume. I assume that for this, I will have to reduce the size of md1, and then I can create a new partition in nvme0n1p4 and nvme1n1p4. But how? I have tried sudo resize2fs /dev/nvme0n1p4 and sudo resize2fs /dev/md1, but both report that the drive is in use - which is true. But I can hardly umount the root. What can I do if booting from a liveCD is not an option?

  • can you boot to a live USB or is the machine in a remote location? Alternately have you tried booting to command line in grub and unmounting there? Unless I am mistaken when you are at the grub command line you are still in "boot" an not the root partition. – rsr911 May 18 '21 at 04:24
  • @rsr911 Looks like I was able to boot into rescue mode remotely. However, this doesn't allow me to see the parts of nvme0n1p4, and I have to nuke it completely to dissolve raid1. Now, I need to figure out how to reinstall ubuntu from the commandline. – dockynodyerror May 18 '21 at 07:46
  • 1
    You can “install” a live CD and boot it using the procedure I posted about here. It adds Gparted to the GRUB menu. https://askubuntu.com/questions/1314402/how-to-modify-partitions-without-a-live-usb-cd – PonJar May 18 '21 at 07:49

0 Answers0