You are not logged in.

#1 2025-03-22 06:07:03

scott_fakename
Member
Registered: 2012-08-15
Posts: 109

Can't mount LVM snapshot of XFS volume if snapshot taken while mounted

Hello,

I have a NAS running arch, with XFS on LVM; If I take an LVM snapshot of the XFS volume with:

$ lvcreate -s -pr -nsnapshot-name -l1%VG VolumeGroup/logical-volume

while it's mounted, and attempt to mount with:

$ sudo mount -o ro,nouuid /dev/VolumeGroup/snapshot-name /mnt/mountpoint

I get a mount failure and dmesg says:

[14688.965160] XFS (dm-4): Mounting V5 Filesystem b15d9f35-85cb-44c1-ad81-bd0a6e3b4b62
[14689.150721] XFS (dm-4): recovery required on read-only device.
[14689.150740] XFS (dm-4): write access unavailable, cannot proceed.
[14689.150745] XFS (dm-4): log mount/recovery failed: error -30
[14689.151167] XFS (dm-4): log mount failed

I tried manually running xfs_freeze first but same result; Is it possible to snapshot an XFS volume without first unmounting it?

Offline

#2 2025-03-22 06:10:41

scott_fakename
Member
Registered: 2012-08-15
Posts: 109

Re: Can't mount LVM snapshot of XFS volume if snapshot taken while mounted

(I should probably have put this in a different forum, i thought "server" made the most sense but maybe not).

Offline

#3 2025-03-22 08:29:40

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

Re: Can't mount LVM snapshot of XFS volume if snapshot taken while mounted

You can try mount -o loop,ro,norecovery,nouuid

With LVM snapshots, fsfreeze should happen by default so no need for manual fsfreeze / xfs_freeze.

If it still doesn't work... not sure, try again with a new snapshot?

Last edited by frostschutz (2025-03-22 08:31:19)

Offline

Board footer

Powered by FluxBB