lvm snapshot failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Most of the time I try to take a snapshot it failed with the following error message:
lpaulin@
File descriptor 5 left open
Setting chunksize to 16 sectors.
Finding volume group "vg1"
Archiving volume group "vg1" metadata (seqno 34).
Creating logical volume snap1
Creating volume group backup "/etc/lvm/
Found volume group "vg1"
Creating vg1-snap1
Loading vg1-snap1 table
Resuming vg1-snap1 (254:2)
Clearing start of logical volume "snap1"
Found volume group "vg1"
LV vg1/snap1 in use: not deactivating
Couldn't deactivate new snapshot.
System is running feisty with kernel 2.6.20-16-generic
Problem seem to be related to https:/
Hello,
same thing here.
Environment Ubuntu 7.04: ------- ------- ------- ------
-------
Linux titan 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux
ii dmsetup 1.02.08-1ubuntu10 The Linux Kernel Device Mapper userspace library
ii libdevmapper1.02 1.02.08-1ubuntu10 The Linux Kernel Device Mapper userspace library
ii libvolume-id0 108-0ubuntu4 volume identification library
ii lvm2 2.02.06-2ubuntu9 The Linux Logical Volume Manager
ii mdadm 2.5.6-7ubuntu5 tool to administer Linux MD arrays (software RAID)
ii udev 108-0ubuntu4 rule-based device node and kernel event manager
ii volumeid 108-0ubuntu4 volume identification tool
Example: opt_0.backup
+ lvcreate -A n -s -n opt_0.backup -L 1G /dev/vgsys/opt
LV vgsys/opt_0.backup in use: not deactivating
Couldn't deactivate new snapshot.
+ sleep 1
+ lvremove -A n -f /dev/vgsys/
+ lvcreate -A n -s -n opt_0.backup -L 1G /dev/vgsys/opt
=> one second after first lvcreate failed it worked fine
I had same problem with openSuSE 10.1 very often /bugzilla. novell. com/show_ bug.cgi? id=178321),
(see https:/
with Ubuntu it's less often but from time to it also happens.
So I use this workaround in my backup script:
sleep $((sleepint= sleepint+ 1))
lvremove -A n -f "$VGBASE/$snapname"
i=$VGRETRYC
sleepint=0
while ! lvcreate -A n -s -n "$snapname" -L 1G "$VGBASE/$lvname"; do
let i-- || break
done
test $i -lt 0 && return 1
Kind regards,
Roland