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?

0 Answers0