---------------------------------------------------------------------------- Añadimos una nueva partición: [root@lcgwiki01 ~]# fdisk Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (392-2610, default 392): Using default value 392 Last cylinder or +size or +sizeM or +sizeK (392-2610, default 2610): Using default value 2610 Command (m for help): p Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 391 3036285 8e Linux LVM /dev/sda3 392 2610 17824117+ 8e Linux LVM Command (m for help): ---------------------------------------------------------------------------- Ejecutar partprobe (inform the OS of partition table changes) [root@lcgwiki01 ~]# partprobe ---------------------------------------------------------------------------- Creamos el volumen físico: [root@lcgwiki01 ~]# pvcreate -M2 /dev/sda3 Physical volume "/dev/sda3" successfully created ---------------------------------------------------------------------------- Añadimos la partición creada en el grupo de volúmenes: [root@lcgwiki01 ~]# vgextend VolGroup00 /dev/sda ---------------------------------------------------------------------------- Comprobamos la ampliación del grupo: [root@lcgwiki01 ~]# vgdisplay --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 19.84 GB PE Size 32.00 MB Total PE 635 Alloc PE / Size 92 / 2.88 GB Free PE / Size 543 / 16.97 GB VG UUID SECnZp-0Rf6-2nVl-J55r-XThG-6mS6-11pO2a ---------------------------------------------------------------------------- Ampliamos el volumen lógico con 15GB más: [root@lcgwiki01 ~]# lvextend -L +15G /dev/VolGroup00/LogVol00 Extending logical volume LogVol00 to 16.94 GB Logical volume LogVol00 successfully resized ---------------------------------------------------------------------------- Comprobamos que ha ampliado el volumen lógico: [root@lcgwiki01 ~]# lvdisplay --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID jMwLTY-gMA3-lzev-IZ3X-3MTR-Q1mg-UeXgOI LV Write Access read/write LV Status available # open 1 LV Size 16.94 GB Current LE 542 Segments 2 Allocation inherit Read ahead sectors 0 Block device 253:0 ---------------------------------------------------------------------------- Ampliamos el sistema de ficheros: [root@lcgwiki01 ~]# resize2fs /dev/VolGroup00/LogVol00 resize2fs 1.39 (29-May-2006) Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required Performing an on-line resize of /dev/VolGroup00/LogVol00 to 4440064 (4k) blocks. The filesystem on /dev/VolGroup00/LogVol00 is now 4440064 blocks long. [root@lcgwiki01 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 17G 1.8G 14G 12% / /dev/sda1 99M 16M 79M 17% /boot tmpfs 252M 0 252M 0% /dev/shm [root@lcgwiki01 ~]# [root@lcgwiki01 ~]# lvdisplay --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID jMwLTY-gMA3-lzev-IZ3X-3MTR-Q1mg-UeXgOI LV Write Access read/write LV Status available # open 1 LV Size 16.94 GB Current LE 542 Segments 2 Allocation inherit Read ahead sectors 0 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV UUID 3Xdiyt-xLrL-iz1J-fGf4-vyeB-5OLf-86RaRL LV Write Access read/write LV Status available # open 1 LV Size 960.00 MB Current LE 30 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:1 [root@lcgwiki01 ~]# [root@lcgwiki01 ~]# [root@lcgwiki01 ~]# [root@lcgwiki01 ~]# vgdisplay --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 19.84 GB PE Size 32.00 MB Total PE 635 Alloc PE / Size 572 / 17.88 GB Free PE / Size 63 / 1.97 GB VG UUID SECnZp-0Rf6-2nVl-J55r-XThG-6mS6-11pO2a