0

I need to expand my LUKS encrypted XFS volume but I'm not sure where to start as this is about a non-LVM device, its a simple block storage from a cloud provider that I extended from 150GB to 200GB ... Now I need to resize the underlining filesystems but I don't know how to do this, can smb. help? All guides I have found so far use LVM somehow and I don't.

Devices and mount:

/dev/mapper/block0                                      150G  4.4G  146G   3% /mnt/block0

fdisk output:

Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 45AEF9E3-DC59-40D1-A276-67AA9C504466

lsblk:

sdb                    8:16   0  200G  0 disk  
└─sdb1                 8:17   0  150G  0 part  
  └─block0           253:3    0  150G  0 crypt /mnt/block0

If I do :

xfs_growfs /dev/mapper/block0

nothing changes for me...

The volume has been created using the following cmd:

parted /dev/sdb --script mklabel gpt mkpart primary 0% 100% align-check opt 1

Thanks in advance

V O
  • 101
  • 1

1 Answers1

0

Before you can resize the XFS filesystem, you must resize the LUKS block device on which it resides.

sudo cryptsetup resize block0 -v

And before you do that, you must resize the partition sdb1 in fdisk or parted. You also skipped this step.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940