Difference between revisions of "System/LVM"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
dd if=filename.img of=/dev/vgname/lvname | dd if=filename.img of=/dev/vgname/lvname | ||
+ | |||
+ | == Creation d'un snapshot == | ||
+ | |||
+ | lvcreate -n snapname -L 1G lvname_to_snap | ||
+ | |||
+ | The size corresponds to the size of changes occuring since the snap was taken. | ||
== Suppression d'un LV == | == Suppression d'un LV == | ||
lvremove /dev/vgname/lvname | lvremove /dev/vgname/lvname |
Revision as of 13:18, 28 January 2012
Creation d'un VG
vgcreate vgname /dev/sda
Creation d'un LV
lvcreate -n lvname -L 65536000000b vgname
Exemple pour une migration d'une image de VM:
Récupération de la taille de l'image:
ls -l /var/lib/libvirt/images/filename.img
Création du LV au byte pres:
lvcreate -n lvname -L 65536000000b vgname
Copie de l'image sur la partition LVM:
dd if=filename.img of=/dev/vgname/lvname
Creation d'un snapshot
lvcreate -n snapname -L 1G lvname_to_snap
The size corresponds to the size of changes occuring since the snap was taken.
Suppression d'un LV
lvremove /dev/vgname/lvname