Posts

Showing posts from November, 2007

vzdump --snapshot revisited

[root@svr~]# vzdump --snapshot 101
/dev/cdrom: open failed: No medium found
starting backup for VPS 101 (/vz/private/101)
Thu Jul 12 06:53:52 2007 creating backup for VPS 101 failed
(0.00 minutes): unable to dump into snapshot
(use option --dumpdir) at /usr/bin/vzdump line 450.

What is going on?

Here is the answer


Prepare a stock centos HN to do vzdumps using LVM snapshots

Situation:

- Stock Centos 4 system with OpenVZ kernel + utilities installed. One big /vz partition, using LVM.

Trying to make a backup using:

vzdump --dumpdir /var/ --snapshot 101
Error message received:
Insufficient free extents (1) in volume group
VolGroup00: 16 requiredWhat does that mean?

It means that you don't have enough free space in the VG (Volume Group) to create an LVM snapshot.

What is the solution? Reduce the size of one partition, then resize one LV (logical volume). This is easily done if you don't have only one big / partition. I usually always make a separate partition for /var and for /vz.

To determine what logical volume needs to be resized, you can use the df -h command. Mine showed:

/dev/mapper/VolGroup00-LogVol05
119G 16G 99G 14% /vz

To resize it:

Make backups of your VM to be sure
Stop the vz service (service vz stop)umount /vze2fsck -f /dev/VolGroup00/LogVol05
Use resize2fs /dev/VolGroup00/LogVol05 110GUse lvresize to reduce the LV sizey…

A little mail server admin joke

I was trying to debug someone by e-mail and I think he was a little "slow". Then I thought, silently:

His brain returned "452 4.3.1 Insufficient system resources"