Bug#549691:
James Robertson
j at mesrobertson.com
Wed Aug 21 00:34:54 UTC 2013
I am using a new up to date Wheezy system and was having very poor
success with lvmremove - specifically with mylvmbackup. I needed this
to be reliable and it was probably failing roughly 70-80% of the time.
As a test I built the version in Sid (as of 21/08/2013) on my Wheezy
machine and this appears to have solved it.
I elaborated on Anis' test as follows so I could emulate closely what
mylvmbackup was doing
#!/bin/bash
for i in $(seq 1 50) ; do
echo -n "[$i] "
date
lvcreate -n mysql_snapshot -L 512m -s vgedJY67/mysql || break
mount /dev/vgedJY67/mysql_snapshot /mnt/mysql_snapshot && echo
"Mounted /mnt/mysql_snapshot" || break
tar -czf /tmp/mysql.tar.gz /mnt/mysql_snapshot 2> /dev/null &&
echo "Backed up MYSQL" || break
umount /mnt/mysql_snapshot && echo "Unmounted /mnt/mysql_snapshot" || break
lvremove -f vgedJY67/mysql_snapshot || break
sleep 1
done
Using the version in Wheezy I ran this script 10 times and the
furthest it got was to the 3rd loop with it mostly failing on the 1st!
Terrible...
After using the Sid version (after a reboot) it seems to work 100%. I
decided to up the retries of the loop to 500 just to be certain. It
passed all 500... Great!
-- System Information:
Debian Release: 7.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lvm2 depends on:
ii dmsetup 2:1.02.77-5.jamesr1
ii initscripts 2.88dsf-41
ii libc6 2.13-38
ii libdevmapper-event1.02.1 2:1.02.77-5.jamesr1
ii libdevmapper1.02.1 2:1.02.77-5.jamesr1
ii libreadline5 5.2+dfsg-2~deb7u1
ii libudev0 175-7.2
ii lsb-base 4.1+Debian8+deb7u1
-- Versions:
> apt-cache policy libdevmapper1.02.1 libdevmapper-event1.02.1 dmsetup lvm2
libdevmapper1.02.1:
Installed: 2:1.02.77-5.jamesr1
Candidate: 2:1.02.77-5.jamesr1
Version table:
*** 2:1.02.77-5.jamesr1 0
100 /var/lib/dpkg/status
2:1.02.74-7 0
500 http://ftp.iinet.net.au/debian/debian/ wheezy/main amd64 Packages
libdevmapper-event1.02.1:
Installed: 2:1.02.77-5.jamesr1
Candidate: 2:1.02.77-5.jamesr1
Version table:
*** 2:1.02.77-5.jamesr1 0
100 /var/lib/dpkg/status
2:1.02.74-7 0
500 http://ftp.iinet.net.au/debian/debian/ wheezy/main amd64 Packages
dmsetup:
Installed: 2:1.02.77-5.jamesr1
Candidate: 2:1.02.77-5.jamesr1
Version table:
*** 2:1.02.77-5.jamesr1 0
100 /var/lib/dpkg/status
2:1.02.74-7 0
500 http://ftp.iinet.net.au/debian/debian/ wheezy/main amd64 Packages
lvm2:
Installed: 2.02.98-5.jamesr1
Candidate: 2.02.98-5.jamesr1
Version table:
*** 2.02.98-5.jamesr1 0
100 /var/lib/dpkg/status
2.02.95-7 0
500 http://ftp.iinet.net.au/debian/debian/ wheezy/main amd64 Packages
More information about the pkg-lvm-maintainers
mailing list