File system resizing not supported: fs utilities do not support renamed devices

leonidas_o

Member
Apr 17, 2022
68
5
8
Running on Proxmox 7.4-16
The VM's on Rocky Linux 9.2
So far I could resize a VM's disk like described in: https://pve.proxmox.com/wiki/Resize....28s.29_in_the_partitions_on_the_virtual_disk

so basically:
Bash:
# Enlarge the partition
parted /dev/sda
print
resizepart 2 100%
quit
# Enlarge the file system
pvresize /dev/sda2
vgs
lvresize --extents +100%FREE --resizefs /dev/rl/root


But on my Kubernetes worker node VMs the lvresize command is not working, it outputs the following:
Code:
  LV /dev/mapper/rl-root mounted at / may have been renamed (from /dev/mapper/rl-root).
  LV /dev/mapper/rl-root mounted at /var/lib/containers/storage/overlay may have been renamed (from /dev/mapper/rl-root).
  LV /dev/mapper/rl-root mounted at /var/lib/kubelet/pods/43374cce-2fcc-4af9-8479-f30c5bb6d0ec/volume-subpaths/hooks-scripts/postgresql/1 may have been renamed (from /dev/mapper/rl-root).
  LV /dev/mapper/rl-root mounted at /var/lib/kubelet/pods/43374cce-2fcc-4af9-8479-f30c5bb6d0ec/volume-subpaths/hooks-scripts/postgresql/2 may have been renamed (from /dev/mapper/rl-root).
  LV /dev/mapper/rl-root mounted at /var/lib/kubelet/pods/5a76c0dd-5a63-4bac-a891-e1e335d62fb1/volume-subpaths/hooks-scripts/postgresql/1 may have been renamed (from /dev/mapper/rl-root).
  File system resizing not supported: fs utilities do not support renamed devices.

Every command before seems to work, only the last command is causing trouble. Appreciate any help.
 
and what was the exact command you used?
@LnxBil what do you mean? The exact commands are in the post. So the last command was lvresize --extents +100%FREE --resizefs /dev/rl/root

I guess the kubernetes volume mounts somehow mess around with the whole procedure.
I left some commands out in the initial post but if you want to see all of them it is:

Bash:
sudo su -
lsblk
dmesg | grep sda
fdisk -l /dev/sda | grep ^/dev
# Resize the partition, in this case, partition "2 (LVM PV)" to occupy the whole remaining space of the hard drive)
parted /dev/sda
print
resizepart 2 100%
quit
# Print the current partition table
fdisk -l /dev/sda | grep ^/dev
# Enlarge the file system
pvresize /dev/sda2
# Display the volume group
vgs
# Use all the remaining space on the volume group
lvresize --extents +100%FREE --resizefs /dev/rl/root
 
@LnxBil what do you mean? The exact commands are in the post. So the last command was lvresize --extents +100%FREE --resizefs /dev/rl/root
Oh sorry, I did not read the --resizefs and thought you missed the command to resize the fs. I wasn't aware that this is possible now. I just did it in two steps, first resize the lvm and afterwards resize the fs itself. Have you tried that?
 
Ahh ok, don't worry, no need to apologise, I'm really happy that someone replied so fast to help me. I appreciate that.
No, unfortunately my knowledge regarding partitioning and file systems is not even beginner level. So I really sticked to the mentioned proxmox "resize disks" doc word by word.
Can you please provide your commands with a little bit explanation?
 
We first try to resize the LVM, so it's the same command except the --resizefs part. If that works (no error is shown), we resize the fs afterwards.

Code:
lvresize --extents +100%FREE  /dev/rl/root

In order to resize the fs, we need to know what fs it is, please run df -T /.
 
  • Like
Reactions: leonidas_o
Okay, the first command was working:
Code:
# lvresize --extents +100%FREE  /dev/rl/root
  Size of logical volume rl/root changed from <6.20 GiB (1586 extents) to <10.20 GiB (2610 extents).
  Logical volume rl/root successfully resized.

The second command shows the following:
Code:
# df -T /.
Filesystem          Type 1K-blocks    Used Available Use% Mounted on
/dev/mapper/rl-root xfs    6486016 4653140   1832876  72% /
 
uh, I think that worked, at least no errors, and data blocks increased, df -h also shows /dev/mapper/rl-root 11G 4.5G 5.8G 44% /. So that's it right, no further things to do?

Code:
# xfs_growfs /dev/mapper/rl-root
meta-data=/dev/mapper/rl-root    isize=512    agcount=4, agsize=406016 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=1 inobtcount=1
data     =                       bsize=4096   blocks=1624064, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 1624064 to 2672640
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!