
donc tu vois pas d'infos de partition puisque le soft lvm passe par dessus

Code : Tout sélectionner
vzrestore 101
Here is how I eventually managed to do the conversion:
On the openvz host, create an image (in my case, I need 20GB):
[cpp]dd if=/dev/zero of=test.img bs=516096c count=40000[/cpp]
Create a partition table in the image:
[cpp] fdisk test.img[/cpp]
Type:
[cpp]o n p 1 2048 w[/cpp]
Mount the image using the offset corresponding to the partition table (in our case, 2048*512=1048576):
[cpp] losetup -o1048576 /dev/loop0 test.img
mke2fs -b1024 /dev/loop0
tune2fs -j /dev/loop0
mount /dev/loop0 /mnt[/cpp]
Retrieve the UUID of the partition. Note it somewhere, you will need it several times:
[cpp] blkid /dev/loop0[/cpp]
Copy the container files to the image. I used rsync to exclude some data that were too big. Make sure to use --numeric-ids to prevent bad mapping of UIDs:
[cpp] rsync -av --exclude 'somedir' --numeric-ids /vz/root/1234/ /mnt[/cpp]
Install grub on the disk:
[cpp] grub-install --root-directory /mnt /dev/loop0[/cpp]
Chroot into the mounted partition:
[cpp] chroot /mnt[/cpp]
Install a kernel and grub (using apt for example):
[cpp] apt-get install linux-image-foobar #adapt to your kernel version
apt-get install grub-pc[/cpp]
Give a password to root:
[cpp] passwd[/cpp]
Change inittab to add the ttys:
[cpp] 1respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6[/cpp]
Create an /etc/fstab file (change the UUID with yours):
[cpp] proc /proc proc nodev,noexec,nosuid 0 0
UUID=7925e5b1-f2ad-4cdc-95f9-984d25378194 / ext4 errors=remount-ro 0 1[/cpp]
Umount the image and convert it to a vmdk image:
[cpp] umount /mnt
kvm-img convert -f raw test.img -O vmdk test.vmdk[/cpp]
Boot the machine on the virtual disk with VMWare or Virtualbox. You should get a grub prompt (adapt with your UUID). In grub2, you can use autocompletion for the Linux kernel and the initrd image:
[cpp] grub> insmod ext2
grub> set root='(hd0,msdos1)'
grub> linux /boot/vmlinuz-foobar root=UUID=7925e5b1-f2ad-4cdc-95f9-984d25378194 ro
grub> initrd /boot/initrd-foobar
grub> boot[/cpp]
Log in to the machine and run
[cpp]update-grub[/cpp]
Adapt your network settings
Je vais t'occuper moi si t'as rien à faireJe sais pas quoi faire demain soir, tu veux que je code une galerie photo ? Ce serait quoi les specs ?
je donne déjà des coups de main : traduction, documentation, rapports de bugs, patches, "advocating"Sérieusement Z si tu as du temps, y'a pleins de projets libres qui accepteraient volontiers un coup de main.
ou mosie t'a volé ton clavier ?themartel: t'as pris l'apéro avec biour ou quoi?
Code : Tout sélectionner
mount -t zfs /STOCKAGE/PHOTOproliant /opt/xamp/htdocs/igalerie/albums
=> fonctionne pas :/zfs mount /STOCKAGE/PHOTOproliant /opt/xampp/htdocs/igalerie/albums
Code : Tout sélectionner
zfs set mountpoint /opt/xampp/htdocs/igalerie/albums STOCKAGE/PHOTOproliant
Ah ? ... C'est ZFS mountpoint /destination source ??Logiquement c'est
Code : Tout sélectionner
zfs set mountpoint /opt/xampp/htdocs/igalerie/albums STOCKAGE/PHOTOproliant
cannot mount '/opt/xampp/htdocs/igalerie/albums/': directory is not empty
property may be set but unable to remount filesystem
C'était le casIl faut que /opt/xampp/htdocs/igalerie/albums/ soit vide