Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Resizing a File System

If you need to extend or shrink a VxFS file system, you can use the fsadm command.

If a VxFS file system requires more space, you can use this procedure to extend the size of the file system. If a VxFS File System is too large and you need the space elsewhere, you can use this procedure to shrink the file system.


Note   Note    If you are using the command line, remember to increase the size of the underlying device or volume before increasing the size of the file system. See the VERITAS Volume Manager Administrator's Guide for more information.

Prerequisites

  • This task requires a mounted file system.
  • You must know either the desired size or the amount of space to add to or subtract from the file system size.


Usage Notes

  • See the fsadm_vxfs(1M) manual pages for more details.

  To resize a file system using the command line

Use fsadm command as follows:


# /opt/VRTS/bin/fsadm -F vxfs [-b newsize] \
[-r
rawdev] /mount_point

where:

    • newsize is the size (in sectors) to which the file system will increase or shrink
    • rawdev specifies the name of the raw device if there is no entry in /etc/fstab and fsadm cannot determine the raw device
    • /mount_point is the location where the file system is mounted


Example

To extend the file system /db01 to 2 GB:


    # /opt/VRTS/bin/fsadm -F vxfs -b 2g /db01
Note   Note    See the VERITAS File System Administrator's Guide and fsadm_vxfs(1M) manual page for information on how to perform common file system tasks using fsadm.

Resizing a File System and the Underlying Volume

The vxresize command offers the advantage of automatically resizing certain types of file systems as well as the underlying volume.


Prerequisites

  • You must know the new desired size of the file system.
  • In some situations, you must first unmount the file system before resizing it. The following table shows which operations are permitted and whether the file system must first be unmounted before resizing it:

    Online JFS
    (Full VxFS)
    Base JFS
    (Lite VxFS)
    HFS

    Mounted File System

    Grow and shrink

    Not allowed

    Not allowed

    Unmounted File System

    Grow only

    Grow only

    Grow only


Usage Notes

  • vxresize works with VxFS, JFS (derived from VxFS), and HFS file systems only.
  • When resizing large volumes, vxresize may take a long time to complete.
  • Resizing a volume with a usage type other than FSGEN or RAID5 can result in data loss. If such an operation is required, use the -f option to forcibly resize such a volume.
  • You cannot resize a volume that contains plexes with different layout types.
  • See the vxresize(1M) manual page for more details.


Example

To extend a 1-gigabyte volume, homevol, that contains a VxFS file system, to 10 gigabytes, enter:


    # /etc/vx/bin/vxresize -b -F vxfs -t homevolresize homevol 10g

The -b option specifies that this operation runs in the background. Its progress can be monitored by specifying the task tag homevolresize to the vxtask command.

Growing a File System Automatically Using VxDBA Monitoring Agent

You can use the VxDBA Monitoring Agent to monitor file system space, and when the space usage reaches a configured threshold value, a predefined action script automatically grows the file system. See Managing File System Space for more information.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com