Hi guy’s, untuk tahap selanjutnya merupakan langkah untuk melakukan penambahan size pada file system yang menggunakan LVM, berikut step by step nya;

1. Pastikan terlebih dahulu partisi OS :

# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
 255 heads, 63 sectors/track, 9729 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes

Device         Boot    Start         End            Blocks      Id       System
 /dev/sda1       *         1          33            265041      83       Linux
 /dev/sda2                34        2710          21503002+     83       Linux
 /dev/sda3              2711        4112          11261565      83       Linux
 /dev/sda4              4113        9729          45118552+      5       Extended
 /dev/sda5              4113        4431           2562336      82       Linux swap / Solaris

Disk /dev/sdb: 5124 MB, 5124317184 bytes
 158 heads, 62 sectors/track, 1021 cylinders
 Units = cylinders of 9796 * 512 = 5015552 bytes

Device      Boot   Start      End     Blocks   Id    System
 /dev/sdb1             1     1021    5000827   8e    Linux LVM

Disk /dev/sdc: 5124 MB, 5124317184 bytes
 158 heads, 62 sectors/track, 1021 cylinders
 Units = cylinders of 9796 * 512 = 5015552 bytes

Device      Boot   Start      End     Blocks   Id    System 
/dev/sdc1              1     1021    5000827   8e    Linux LVM

2. Pastikan partisinya mempunyai partisi type LVM (8e)

Device     Boot    Start      End     Blocks   Id    System
 /dev/sdc1             1     1021    5000827   8e    Linux LVM

3. Membuat Physical Volume :

# pvcreate /dev/sdc1
 Physical volume "/dev/sdc1" successfully created

4. Menampilkan(PV) Physical Volume:

# pvdisplay
 "/dev/sdc1" is a new physical volume of "4.77 GB"
 --- NEW Physical volume ---
 PV Name /dev/sdc1
 VG Name 
 PV Size 4.77 GB
 Allocatable NO
 PE Size (KByte) 0
 Total PE 0
 Free PE 0
 Allocated PE 0
 PV UUID RCUITN9-dgJ5-p2n9-543K-OLsl-IiJO-uIGI3y

5. Extend(VG) Volume Group:

# vgextend vgtraining /dev/sdc1

6. Extend(LV) Logical Volume :

sesuaikan dengan free PE pada Volume Group

# lvextend -l +1220 /dev/vgtraining/lv_test

6. Rezise Filesystem :

# resize2fs /dev/vgtraining/lv_test

7. Check kembali size file system

# df -h

 

Semoga bermanfaat guy’s.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

ten + six =