To add a disk to an existing volume group 

Step #1 Check  volume group  ( VolGroup00 Free PE / Size is zero)
[root@ogg1 ~]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               49.88 GB
  PE Size               32.00 MB
  Total PE              1596
  Alloc PE / Size       1596 / 49.88 GB
  Free  PE / Size       0 / 0   
  VG UUID               bdcYDq-Msey-8EgM-jTLE-Hvew-k97w-debY0o

 PE Szie 32.00MB * 1596 (Total PE) = 49.88 GB


Step #2  create the LVM Using  physical volumes
[root@ogg1 ~]# pvcreate /dev/sdb1
physcial volume "/dev/sdb1" successfully created


Step #3 add /dev/sdb1 to  VolGroup00 
 [root@ogg1 ~]# vgextend VolGroup00 /dev/sdb1


[root@ogg1 ~]# lvdisplay
--- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                Vecg7i-pBi3-nqYk-4GAS-A9Fk-shmM-PbjPUc
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5.81 GB
  Current LE             186
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1


Step #4 
  CASE#1)   LVM resize: Change the size of the logical volumes ( SIZE = 32.00MB * 320 = 10G )    

 

  [root@ogg1 ~]#
 lvextend -l 320 /dev/mapper/VolGroup00-LogVol01   

  CASE#2)  LVM Create:  Create Logical Volumes
  [root@ogg1 ~]# lvcreate -l 20 -n LogVol02  VolGroup00  (size PE Size * 20)  => Create LogVol02 Volumes
  [root@ogg1 ~]# mkfs.ext4 /dev/mapper/VolGroup00-LogVol02
  [root@ogg1 ~]# mkdir /backup
  [root@ogg1 ~]# mount /dev/mapper/VolGroup00-LogVol02 /backup
  [root@ogg1 ~] vi /etc/fstab 
 /dev/VolGroup00/LogVol02  /backup                       ext3    defaults        1 2





사업자 정보 표시
(주)블루원 | 김홍태 | 서울특별시 용산구 원효로 4가 135 금홍 2빌딩 | 사업자 등록번호 : 106-86-76684 | TEL : 02-3272-7200 | Mail : support_ora@blueone.co.kr | 사이버몰의 이용약관 바로가기

+ Recent posts