Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > a412ceb851151854794ced2a242192bb > files > 1711

howto-html-fr-20080722-1mdv2010.0.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Créer un volume logique</title><link href="style.css" rel="stylesheet" type="text/css" /><meta content="DocBook XSL Stylesheets V1.73.2" name="generator" /><link rel="start" href="index.html" title="Guide pratique de LVM" /><link rel="up" href="ch11.html" title="Chapitre 11. Tâches courantes" /><link rel="prev" href="ch11s06.html" title="Supprimer un volume physique d'un groupe de volumes" /><link rel="next" href="ch11s08.html" title="Supprimer un volume logique" /></head><body><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Créer un volume logique</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="ch11s06.html">Précédent</a> </td><th align="center" width="60%">Chapitre 11. Tâches courantes</th><td align="right" width="20%"> <a accesskey="n" href="ch11s08.html">Suivant</a></td></tr></table><hr /></div><div class="sect1" lang="fr"><div class="titlepage"><div><div><h2 class="title"><a id="createlv" />Créer un volume logique</h2></div></div></div><p>
        Pour créer un LV « <span class="quote">testlv</span> » linéaire de 1 500 Mo et
        son périphérique spécial « <span class="quote">/dev/testvg/testlv</span> » :
      </p><pre class="screen">
# lvcreate -L1500 -ntestlv testvg
</pre><p>
        Pour créer un volume logique de 100 LE avec 2 blocs répartis
        et une taille de bloc de 4 Ko :
      </p><pre class="screen">
# lvcreate -i2 -I4 -l100 -nunautretestlv testvg
</pre><p>
        Pour créer un LV qui utilise tout le VG, utilisez vgdisplay
        pour trouver la valeur de « <span class="quote">Total PE</span> », puis utilisez-la
        avec lvcreate.
      </p><pre class="screen">
# vgdisplay testvg | grep "Total PE"
Total PE              10230
# lvcreate -l 10230 testvg -n monlv
</pre><p>

        Cela créera un LV appelé <span class="strong"><strong>monlv</strong></span> qui remplira la totalité du VG
        <span class="strong"><strong>testvg</strong></span>.

      </p><p>

        Si vous désirez allouer le volume logique sur un volume physique
        précis, il faut spécifier le nom du ou des PV à la fin de la
        commande lvcreate.

      </p><pre class="screen">
# lvcreate -L 1500 -ntestlv testvg /dev/sdg
</pre></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch11s06.html">Précédent</a> </td><td align="center" width="20%"><a accesskey="u" href="ch11.html">Niveau supérieur</a></td><td align="right" width="40%"> <a accesskey="n" href="ch11s08.html">Suivant</a></td></tr><tr><td valign="top" align="left" width="40%">Supprimer un volume physique d'un groupe de volumes </td><td align="center" width="20%"><a accesskey="h" href="index.html">Sommaire</a></td><td valign="top" align="right" width="40%"> Supprimer un volume logique</td></tr></table></div></body></html>