Note : LVM est plus recommander pour fournir le support disque des machines virtuel Xen

Créé une fichier « disque » temporaire

<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if=</span><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of=</span><span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>temp_expand <span style="color: #007800;">bs=</span>1024k <span style="color: #007800;">count=</span><span style="color: #000000;">1000</span>

Stopper votre machine virtuel, c’est obligatoire.

xm shutdown youki

Sauvegarder votre serveur

<span style="color: #c20cb9; font-weight: bold;">cp</span> -a <span style="color: #000000; font-weight: bold;">/</span>xen-images<span style="color: #000000; font-weight: bold;">/</span>youki.img <span style="color: #000000; font-weight: bold;">/</span>xen-images<span style="color: #000000; font-weight: bold;">/</span>youki.img.back

Ajouter le ficher disque temporaire au fichier disque du serveur virtuel. ATTENTION un double > est nécessaire, un simple > écraserait totalement et définitivement le disque de votre serveur virtuel. Une chose que vous ne voulez certainement pas.

<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>temp_expand <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>xen-images<span style="color: #000000; font-weight: bold;">/</span>youki.img

Prendre en compte le changement de taille.

resize2fs -f <span style="color: #000000; font-weight: bold;">/</span>xen-images<span style="color: #000000; font-weight: bold;">/</span>youki.img

Redémarrer le serveur virtuel

xm create -c <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xen<span style="color: #000000; font-weight: bold;">/</span>vm_youki.config.sxp

logger vous et vérifier la bonne prise en compte de l’espace disque (df -h)

© 2012 Karlesnine Suffusion theme by Sayontan Sinha