On an Oracle Exadata Database Machine, the ‘/u01’ is defaulted to a size of 100Gb, which can easily fill up. Luckily this is just a Logical Volume and there’s normally lots of space available on the Logical Volume Group which is usually untapped.
Extending ‘/u01’
Identify how much space is used and free on ‘/u01’ using df:
[root@v1ex1dbadm01 ~]# df -h /u01 Filesystem Size Used Avail Use% Mounted on /dev/mapper/VGExaDb-LVDbOra1 99G 78G 17G 83% /u01 [root@v1ex1dbadm01 ~]#
Display the current logical volume configuration using the lvs command:
[root@v1ex1dbadm01 ~]# lvs -o lv_name,lv_path,vg_name,lv_size LV Path VG LSize LVDbOra1 /dev/VGExaDb/LVDbOra1 VGExaDb 100.00g LVDbSwap1 /dev/VGExaDb/LVDbSwap1 VGExaDb 24.00g LVDbSys1 /dev/VGExaDb/LVDbSys1 VGExaDb 30.00g LVDbSys2 /dev/VGExaDb/LVDbSys2 VGExaDb 30.00g LVDoNotRemoveOrUse /dev/VGExaDb/LVDoNotRemoveOrUse VGExaDb 1.00g [root@v1ex1dbadm01 ~]#
Check the online resize option is available using the tune2fs command:
[root@v1ex1dbadm01 ~]# tune2fs -l /dev/VGExaDb/LVDbOra1 | grep resize_inode Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize [root@v1ex1dbadm01 ~]#
If not available then the file system needs to be unmounted before resizing. Refer to documentation:
Verify there’s space available in the Logical Volume Group using vgdisplay command:
[root@v1ex1dbadm01 ~]# vgdisplay -s "VGExaDb" 1.63 TiB [185.00 GiB used / 1.45 TiB free] [root@v1ex1dbadm01 ~]#
Finally if there’s enough space, then extend the Logical Volume using lvextend command:
[root@v1ex1dbadm01 ~]# lvextend -L +100G /dev/VGExaDb/LVDbOra1 Size of logical volume VGExaDb/LVDbOra1 changed from 100.00 GiB (25600 extents) to 200.00 GiB (51200 extents). Logical volume LVDbOra1 successfully resized. [root@v1ex1dbadm01 ~]#
Followed by a resize of the file system using resize2fs command:
[root@v1ex1dbadm01 ~]# resize2fs /dev/VGExaDb/LVDbOra1 resize2fs 1.43-WIP (20-Jun-2013) Filesystem at /dev/VGExaDb/LVDbOra1 is mounted on /u01; on-line resizing required old_desc_blocks = 7, new_desc_blocks = 13 Performing an on-line resize of /dev/VGExaDb/LVDbOra1 to 52428800 (4k) blocks. The filesystem on /dev/VGExaDb/LVDbOra1 is now 52428800 blocks long. [root@v1ex1dbadm01 ~]#
You should now see ‘/u01’ with additional 100Gb less formatting:
[root@v1ex1dbadm01 ~]# df -h /u01 Filesystem Size Used Avail Use% Mounted on /dev/mapper/VGExaDb-LVDbOra1 197G 78G 110G 42% /u01 [root@v1ex1dbadm01 ~]#
Also see the Logical Volume is now 200Gb from 100Gb:
[root@v1ex1dbadm01 ~]# lvs -o lv_name,lv_path,vg_name,lv_size LV Path VG LSize LVDbOra1 /dev/VGExaDb/LVDbOra1 VGExaDb 200.00g LVDbSwap1 /dev/VGExaDb/LVDbSwap1 VGExaDb 24.00g LVDbSys1 /dev/VGExaDb/LVDbSys1 VGExaDb 30.00g LVDbSys2 /dev/VGExaDb/LVDbSys2 VGExaDb 30.00g LVDoNotRemoveOrUse /dev/VGExaDb/LVDoNotRemoveOrUse VGExaDb 1.00g [root@v1ex1dbadm01 ~]#
Documentation for reference:
If you found this blog post useful, please like as well as follow me through my various Social Media avenues available on the sidebar and/or subscribe to this oracle blog via WordPress/e-mail.
Thanks
Zed DBA (Zahid Anwar)