Criação de filesystem no lvm

Criaremos, como exemplo, um Filesystem de 10G montado no /var/lib/pgsql

  1. Verificar o espaço disponível no VG.
      [root@install ~]# vgdisplay
        --- Volume group ---
        VG Name               vg00
        System ID             
        Format                lvm2
        Metadata Areas        1
        Metadata Sequence No  14
        VG Access             read/write
        VG Status             resizable
        MAX LV                0
        Cur LV                8
        Open LV               8
        Max PV                0
        Cur PV                1
        Act PV                1
        VG Size               232,64 GB
        PE Size               4,00 MB
        Total PE              59555
        Alloc PE / Size       9344 / 36,50 GB
        Free  PE / Size       50211 / 196,14 GB
        VG UUID               VeHwbH-Fmvy-Hr7m-MBac-h0EF-pZW2-EIkvai
      
  2. Verificar os LV's que já existem.
    [root@srv31 root]# ll /dev/vg00/*
    
    /dev/vg00/1@  
    /dev/vg00/2@    
    /dev/vg00/3@    
    /dev/vg00/4@   
    /dev/vg00/5@
    /dev/vg00/6@ 
    /dev/vg00/7@       
    
  3. Criar, seguindo a sequência, o LV. No nosso caso, criaremos o LV 8 com 10G e montaremos no /var/lib/pgsql
    [root@srv31 root]# lvcreate -L10G -n 8 vg00
    [root@srv31 root]# mkreiserfs /dev/vg00/8
    [root@srv31 root]# mkdir /var/lib/pgsql
    
  4. Criar uma entranda no fstab
      /dev/vg00/8 /var/lib/pgsql reiserfs notail 1 2
      
  5. Montar o filesystem
      [root@srv31 root]# mount -a
      
IP
3.229.142.91