Another XFS + LVM2 snapshots problems
Hello,
Although I often read in the mailing archive that XFS and snapshots aren't good friends, this filesystem is the best for my use (a file server with ~2.5M files and files > 2GB). Now is the time to do snapshots. Here many problems occurs :
[hardware detail & software versions on the bottom]
- creating a snapshot with lvcreate -L 10G -n my_backup -s /dev/myvg/xfs_storage is OK without using xfs_freeze.
- BUT lvremove the "my_backup" LV (snapshot LV) freeze completely the snapshotted LV (xfs_storage in this case). Some days after testing this, i found that a simple "dmsetup resume myvg-my_backup" unlock the whole thing and lvremove completes.
At this point I was happy to add/remove snapshots freely (but have not tried to make multiple snapshot, which kills performances), but now i have a snapshot, i can't mount it... here is the scenario :
- lvcreate as shown above
- mount -o nouuid /dev/myvg/my_backup /backups/snapshot
syslog says :
Apr 22 15:14:47 filer1 kernel: XFS mounting filesystem dm-2 Apr 22 15:14:48 filer1 kernel: Starting XFS recovery on filesystem: dm-2 (logdev: internal)
and nothing else. The I/O activity shown by iostat is the same (no increase due to a real XFS recovery) trying mount -o nouuid,ro does the same. when strace-ing the mount command, the last lines are :open("/dev/myvg/my_backup", O_RDONLY) = 3lseek(3, 0, SEEK_SET) = 0read(3, "XFSB\0\0\20\0\0\0\0\0\4\260\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 576) = 576 close(3) = 0
mount("/dev/myvg/my_backup", "/backups/snapshot/", "xfs", MS_RDONLY|0xc0ed0000, 0x517b60 <unfinished ...>
now, i can't kill the mount command initiated neither soft reboot the server. I only want to create a snapshot to xfsdump - it , xfsrestore it on another backup server, then delete the snapshot.
Does someone here get the same problems ?
Hardware detail:
RAID 10 with 64K stripe on a
3ware 9500S-12 controller and 12x250GB system is not installed on the LVM (separate RAID 1)
Software versions:
Linux kernel 2.6.16.1
LVM & mapper version 2.01.15 (library 1.01.15, driver version 4.5.0) XFS utils version 2.7.11
no patches applied, all tools compiled from the official sources
LVM config :
1 VG created from 1 PV (the RAID array is known to the system by /dev/sdb) some LVs. the LV sizes i want to snapshot are ~200GB each.
Signature · 2 lines
Gabriel Barazer <[email protected]> OXEVA
Quoted 2 lines · Gabriel Barazer
Linux kernel 2.6.16.1
LVM & mapper version 2.01.15 (library 1.01.15, driver version 4.5.0)
As you discovered, those versions are not compatible.
You upgraded your kernel to a recent one: you need to upgrade your dm & lvm2 packages to correspond with that kernel. (1.02.* & 2.02.*)
Alasdair
Signature · 1 line
[email protected]
Quoted 7 lines · Alasdair G Kergon
Quoted 2 lines · Gabriel Barazer
Linux kernel 2.6.16.1
LVM & mapper version 2.01.15 (library 1.01.15, driver version 4.5.0)As you discovered, those versions are not compatible.
You upgraded your kernel to a recent one: you need to upgrade your dm & lvm2 packages to correspond with that kernel. (1.02.* & 2.02.*)
sorry,
is there a documented compatibility matrix between dm driver version and device-mapper library version?
Regards,
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
Quoted 2 lines · Luca Berra
is there a documented compatibility matrix between dm driver version and device-mapper library version?
The general rule is that the version of libdevmapper should be at least as new as the latest one available at the time when the upstream kernel you're using was released. And lvm2 should normally be at least as new as libdevmapper.
In brief, new libdevmappers will normally work with older kernels, but new kernels won't necessarily work with older libdevmappers, though incompatibilities are rare. When possible, we add support for kernel changes to the userspace tools some time before the features themselves hit the upstream kernel to allow time for the new tools to propagate. (A current example is dm mirror block_on_error support.)
Alasdair
Signature · 1 line
[email protected]