[Users] trouble volume size (lvm) in host after stop ve
Greg
diffusion at bulot-fr.com
Sun Jan 10 06:57:41 EST 2010
Hi,
When i'm stop VE (were some mount with bind option), after ve stop,
host df commande report bad size for www & home ! (see size below)
i'll try both 202.umount & 202.stop batch without any change for volume
size after ve stopped
Good size before ve stop :
-------------------------
# df -h | grep mnt | grep sata
10G 2,4G 7,7G 24% /mnt/satavol1/lvm-ftp
20G 8,7G 12G 44% /mnt/satavol1/lvm-www
80G 34G 47G 42% /mnt/satavol1/lvm-home
Bad size after ve stop (look the 1.9G instead more than 20G !!)
----------------------
vzctl stop 202 ; df -h | grep mnt | grep sata
umount external directory into vps
umount: /vz/root/202/home: not found
umount: /vz/root/202/var/www: not found
Stopping VE ...
VE was stopped
umount external directory into vps
VE is unmounted
10G 2,4G 7,7G 24% /mnt/satavol1/lvm-ftp
1,9G 243M 1,6G 14% /mnt/satavol1/lvm-www
1,9G 243M 1,6G 14% /mnt/satavol1/lvm-home
So i'll try umount the two wrong size volume :
# umount /mnt/satavol1/lvm-www ; umount /mnt/satavol1/lvm-home
umount: /dev/mapper/satavol1-lvm--www: not mounted
umount: /dev/mapper/satavol1-lvm--www: not mounted
umount: /dev/mapper/satavol1-lvm--home: not mounted
umount: /dev/mapper/satavol1-lvm--home: not mounted
# umount /mnt/satavol1/lvm-www ; umount /mnt/satavol1/lvm-home
umount: /mnt/satavol1/lvm-www: not mounted
umount: /mnt/satavol1/lvm-home: not mounted
i mount the two volume
# mount /mnt/satavol1/lvm-www ; mount /mnt/satavol1/lvm-home
the two volume were had the good size back !:
# df -h | grep mnt | grep sata
10G 2,4G 7,7G 24% /mnt/satavol1/lvm-ftp
20G 8,7G 12G 44% /mnt/satavol1/lvm-www
80G 34G 47G 42% /mnt/satavol1/lvm-home
# cd /etc/vz/conf ; for script in 202.mount 202.umount 202.stop ; do
echo ""; echo $script; echo "==========" ; cat $script | grep -v "^#" ;
done
202.mount
==========
echo " $0 mount external directory into vps"
mount --bind /mnt/satavol1/lvm-home /vz/root/202/home
mount --bind /mnt/satavol1/lvm-www /vz/root/202/var/www
202.umount
==========
echo "umount external directory into vps"
umount /vz/root/202/home
umount /vz/root/202/var/www
exit 0
202.stop
==========
echo "umount external directory into vps"
umount /vz/root/202/home
umount /vz/root/202/var/www
exit 0
# dpkg -l vzctl lvm2 mdadm | grep ii | awk ' { print $2" "$3 } '
lvm2 2.02.39-7
mdadm 2.6.7.2-3
vzctl 3.0.22-14
# uname -srv
Linux 2.6.26-2-openvz-686 #1 SMP Wed Nov 4 22:06:32 UTC 2009
More information about the Users
mailing list