You are not logged in.

#1 2021-09-07 09:19:40

mrwsl
Member
Registered: 2019-10-16
Posts: 11

[Solved] Resize xfs partition for windows installation

Hi,

the worst case happened and I need to install Windows on my laptop. I'm limited to the nvme which is 1 TB. When installing arch I didn't think that I would ever touch Windows again - so I encrypted a partition for home and root which are LVM volumes. My problem is that I can't resize the volgroup0-lv_home volume since it is formatted as xfs. Is there any way that I'm missing to free some space for windows? If there isn't, my only soluton is to reinstall, is it? Thanks in  advance!

lsblk -f
NAME                 FSTYPE FSVER LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1
├─nvme0n1p1          vfat   FAT32       5497-7F08
├─nvme0n1p2          ext2   1.0         d04ca46d-6f69-4d47-b5fc-e0d4d68f825c    279,8M    23% /boot
└─nvme0n1p3          crypto 2           203cb7dd-04f7-4d3f-91f7-03864af33962
  └─volgroup0        LVM2_m LVM2        xLGhHT-IegW-tAj8-Gj0z-0ZfA-a3fC-DUdVmJ
    ├─volgroup0-lv_root
    │                ext4   1.0         d0cb5c46-bf9a-4828-ba43-a7b840781e53     22,7G    56% /
    └─volgroup0-lv_home
                     xfs                88aaa90f-8899-4413-9152-2cdaacf8135f    864,1G     3% /home

EDIT: I found this. Does that mean I xfsdump the entire home, wipe the volume and apply the backup to it?

Last edited by mrwsl (2021-09-07 10:02:22)

Offline

#2 2021-09-07 09:44:38

frostschutz
Member
Registered: 2013-11-15
Posts: 1,651

Re: [Solved] Resize xfs partition for windows installation

You could install Windows in a VM and thus avoid the repartitioning.

Otherwise yeah the only sane option is to copy the files off (with rsync -a or similar - make sure to preserve all important file attributes), repartition / reformat, and copy files back.

Can't shrink XFS, there are some ways around that but they're risky and prone to losing data. With LVM+XFS it's better to start out with a smaller volume and grow it as needed.

Last edited by frostschutz (2021-09-07 09:46:23)

Offline

#3 2021-09-07 10:02:07

mrwsl
Member
Registered: 2019-10-16
Posts: 11

Re: [Solved] Resize xfs partition for windows installation

Thanks for answering my questions! I will follow the backup, repartition/reformat path. Also good advice to start small with xfs smile

Offline

Board footer

Powered by FluxBB