Growing filesystem using LVM

Hi,

I have a LUN presented to a Linux system and would like to ask if someone can advise if the logical volume /dev/mapper/VGOra-LVOra 12G 11G 659M 95% /usr/app/oracle can be extended. Is there any free space to allocate.... The LUN (25G) has been configured as follows:

 
LUN - ROOT... /dev/mapper/VGRoot-LVRoot = 6.6G
                   /dev/mapper/VGOra-LVOra = 12G
                   /dev/mapper/VGRoot-LVVar = 2.4G
                   /dev/mapper/VGRoot-LVTmp = 512mb
 
[root@jdcbpeltst6 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VGRoot-LVRoot
                      6.6G  4.2G  2.2G  67% /
/dev/mapper/VGOra-LVOra
                       12G   11G  659M  95% /usr/app/oracle
/dev/mapper/VGRoot-LVVar
                      2.4G  397M  1.9G  18% /var
/dev/mapper/VGRoot-LVTmp
                      496M   23M  448M   5% /tmp
/dev/mapper/VGLogs-LVLogs
                      4.9G  2.4G  2.3G  52% /Logs
/dev/mapper/mpath0p1   99M   21M   74M  22% /boot
tmpfs                  16G     0   16G   0% /dev/shm
 

[root@jdcbpeltst6 ~]# fdisk -l
Disk /dev/sda: 27.9 GB, 27917287424 bytes
255 heads, 63 sectors/track, 3394 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        1823    14538825   8e  Linux LVM
/dev/sda3            1824        3394    12619057+  8e  Linux LVM
Disk /dev/sdb: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1018     5238597   8e  Linux LVM
Disk /dev/sdc: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/dm-0: 27.9 GB, 27917287424 bytes
255 heads, 63 sectors/track, 3394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
     Device Boot      Start         End      Blocks   Id  System
/dev/dm-0p1   *           1          13      104391   83  Linux
/dev/dm-0p2              14        1823    14538825   8e  Linux LVM
/dev/dm-0p3            1824        3394    12619057+  8e  Linux LVM
Disk /dev/dm-1: 106 MB, 106896384 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 14.8 GB, 14887756800 bytes
255 heads, 63 sectors/track, 1810 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3: 12.9 GB, 12921914880 bytes
255 heads, 63 sectors/track, 1571 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-3 doesn't contain a valid partition table
[root@jdcbpeltst6 ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdc doesn't contain a valid partition table
 
[root@jdcbpeltst6 ~]# pvdisplay
  /dev/sdc: read failed after 0 of 4096 at 16106061824: Input/output error
  /dev/sdc: read failed after 0 of 4096 at 16106119168: Input/output error
  /dev/sdd: read failed after 0 of 4096 at 0: Input/output error
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               VGLogs
  PV Size               5.00 GB / not usable 3.82 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              1278
  Free PE               23
  Allocated PE          1255
  PV UUID               7dcLZ2-LWRr-nVVn-O7NM-sCxq-VW8m-yQ0UBj
  --- Physical volume ---
  PV Name               /dev/dm-3
  VG Name               VGOra
  PV Size               12.03 GB / not usable 3.30 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              385
  Free PE               0
  Allocated PE          385
  PV UUID               i3jy7e-IBxh-B2wv-AUAJ-X63p-VbU5-p3n7Ce
  --- Physical volume ---
  PV Name               /dev/dm-2
  VG Name               VGRoot
  PV Size               13.87 GB / not usable 22.07 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              443
  Free PE               0
  Allocated PE          443
  PV UUID               OFzM1X-33se-FqO7-gppr-hoZp-Bwhg-UuT0YM
[root@jdcbpeltst6 ~]# lvdisplay
  /dev/sdd: read failed after 0 of 4096 at 0: Input/output error
  --- Logical volume ---
  LV Name                /dev/VGLogs/LVLogs
  VG Name                VGLogs
  LV UUID                W4tItu-wysf-EPsl-Bfs9-7OH3-BmCJ-ODvem5
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.90 GB
  Current LE             1255
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:8
  --- Logical volume ---
  LV Name                /dev/VGOra/LVOra
  VG Name                VGOra
  LV UUID                AWlpy7-uUrX-h7w5-n2YN-abVa-72zG-17GhhG
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                12.03 GB
  Current LE             385
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:9
  --- Logical volume ---
  LV Name                /dev/VGRoot/LVRoot
  VG Name                VGRoot
  LV UUID                aLqA0w-IJYL-kzO3-T7Lm-XBfQ-D2lA-0hyt9g
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                6.81 GB
  Current LE             218
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4
  --- Logical volume ---
  LV Name                /dev/VGRoot/LVVar
  VG Name                VGRoot
  LV UUID                osdJtX-0Vau-xQzK-CxfX-hXnR-sCTK-poI4JY
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.44 GB
  Current LE             78
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5
  --- Logical volume ---
  LV Name                /dev/VGRoot/LVTmp
  VG Name                VGRoot
  LV UUID                2f4eMe-WuFo-zMRV-PDoc-smcr-DrLt-ae3M0E
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                512.00 MB
  Current LE             16
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:6
  --- Logical volume ---
  LV Name                /dev/VGRoot/LVSwap
  VG Name                VGRoot
  LV UUID                DF3U0J-B07Z-6RTx-gjkX-7t7I-Dnm4-15P0Bk
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.09 GB
  Current LE             131
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:7
 

[root@jdcbpeltst6 ~]# vgdisplay
  /dev/sdd: read failed after 0 of 4096 at 0: Input/output error
  --- Volume group ---
  VG Name               VGLogs
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.99 GB
  PE Size               4.00 MB
  Total PE              1278
  Alloc PE / Size       1255 / 4.90 GB
  Free  PE / Size       23 / 92.00 MB
  VG UUID               VSSDGd-Iuqf-6L8C-Upl9-pMS6-T5FF-Lwn1Ty
  --- Volume group ---
  VG Name               VGOra
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               12.03 GB
  PE Size               32.00 MB
  Total PE              385
  Alloc PE / Size       385 / 12.03 GB
  Free  PE / Size       0 / 0
  VG UUID               wd3qqh-x14z-p9qG-1k0F-zxph-70o4-q7R3sm
  --- Volume group ---
  VG Name               VGRoot
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               4
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               13.84 GB
  PE Size               32.00 MB
  Total PE              443
  Alloc PE / Size       443 / 13.84 GB
  Free  PE / Size       0 / 0
  VG UUID               SGtzfk-Q00M-v9g6-LOWP-8awS-Rdl0-fIyijR

I think you have free 16 GB on /dev/sdc

root@jdcbpeltst6 ~]# fdisk -l
.
.
.
Disk /dev/sdc: 16.1 GB, 16106127360 bytes
64 heads, 32 sectors/track, 15360 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
.
.

you can configure a physical volume there and then add it to LVOra and VGOra.

Sun Fire thanks for the response. I will have a look at this disk and try as you suggest. Can I complete this without rebooting?

yes for LVM does notrequire a reboot

It can be done without a reboot by extending the logical volume, but I really recommend a full backup (tested) before you do this activitiy on a production machine