LVM: Couldn't create temporary archive name

Resize an LVM volume when space is exhausted

LVM (Logical Volume Management) is and has always been a great solution to dynamically provide storage for different purposes. Volumes can be extended online without a downtime. See here if you want need to know more of it.

Normally, if you want to provide more storage to a volume, you just execute

$ lvresize -L 6g /dev/mapper/system-root

After that, the filesystem can be extended to the new size of the volume:

$ xfs_growfs /dev/mapper/system-root

Or you tell lvextend to do that itself by using the -r parameter:

$ $ lvresize -r -L 6g /dev/mapper/system-root

But when the volume space is completely exhausted, LVM is not able to do a metadata backup. It will fail like that:

$ lvresize -r -L 6g /dev/mapper/system-root
Size of logical volume system/root changed from 5.00 GiB (1280 extents) to 6.00 GiB (1536 extents). Couldn't create temporary archive name.

This can be solved by switching off the autobackup:

$ lvresize -An -L 6g /dev/mapper/system-root
Size of logical volume system/root changed from 5.00 GiB (1280 extents) to 6.00 GiB (1536 extents). Logical volume system/root successfully resized. WARNING: This metadata update is NOT backed up.

After that, it's possible to extend the filesystem (see above). Or again, you use the -r prameter to do that from within the lvextend command.

But as you disable the metadata autobackup by using lvextend -An, it could be a problem. Be sure to manually do the metadata backup:

$ vgcfgbackup
Volume group "system" successfully backed up.

Or do an additional lvextend without changing the size of the volume.

Subscribe to Martin's Blog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe