Proxmox et OpenVZ

De Linux Server Wiki
Aller à la navigation Aller à la recherche

Pour commencer, partitionnez votre disque. Faites une partition / de 15Go, un swap, et enfin, une partition LVM2 avec l'espace restant.

Nous allons maintenant créer notre architecture LVM puis le système de fichier :

pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created
vgcreate pve /dev/sda3
  Volume group "pve" successfully created
vgdisplay -v pve
    Using volume group(s) on command line
    Finding volume group "pve"
  --- Volume group ---
  VG Name               pve
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               215.09 GB
  PE Size               4.00 MB
  Total PE              55064
  Alloc PE / Size       0 / 0   
  Free  PE / Size       55064 / 215.09 GB
  VG UUID               AenAEU-jdG2-RUh1-4khe-R990-MInR-cdRIe0
   
  --- Physical volumes ---
  PV Name               /dev/sda3     
  PV UUID               CsIxAk-xa18-1W2q-jm1Y-fVqg-VSnW-KMaXvx
  PV Status             allocatable
  Total PE / Free PE    55064 / 55064
   
lvcreate -l55064 -n data pve
  Logical volume "data" created
lvdisplay -v /dev/pve/data
    Using logical volume(s) on command line
  --- Logical volume ---
  LV Name                /dev/pve/data
  VG Name                pve
  LV UUID                KlFCb8-yE7K-NYCN-RNnN-LEV3-maIw-mDtZZq
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                215.09 GB
  Current LE             55064
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
mkfs.ext3 /dev/pve/data
mount /dev/sda1 /mnt
debootstrap --arch=amd64 lenny /mnt
...
I: Base system installed successfully.