How to resize a CFS file system from any node within the cluster?

Article:TECH37254  |  Created: 2005-01-06  |  Updated: 2009-01-17  |  Article URL http://www.symantec.com/docs/TECH37254
Article Type
Technical Solution

Product(s)

Environment

Issue



How to resize a CFS file system from any node within the cluster?

Solution



Error Message:
vxvm:vxresize: ERROR: Problem running fsadm command for volume <volumename>, in disk group <diskgroupname>

'vxresize' command to resize a file system is a two step process. The volume is grown first (using vxassist command) and the file system is grown next (using fsadm command).

However in a CVM/CFS environment, volume should be grown on CVM master and file system should be grown on a CFS Primary.
If the system is both CVM master and CFS primary, then 'vxresize' command could be executed on the system without any issues.
However if CVM master is not CFS primary for the file system, vxresize would fail.

The idea of growing a volume on the CVM master server and growing a file system on the CFS primary server (separately) has been eliminated since version 3.5.

From 3.5 version, vxresize can be run on any nodes within the cluster provided 'HacliUserLevel' cluster attribute is set to 'COMMANDROOT'.
The default value of this attribute is 'NONE' which prevents user to run vxresize command from all the nodes in the cluster.

# /opt/VRTSvcs/bin/haclus -display | grep Hacli
HacliUserLevel      NONE


To change the value to COMMANDROOT, run:

# /opt/VRTSvcs/bin/haconf -makerw
# /opt/VRTSvcs/bin/haclus -modify HacliUserLevel COMMANDROOT
# /opt/VRTSvcs/bin/haconf -dump -makero

This change allows vxresize to call hacli command, which then allows any command to be run on any system within the cluster.


Example:

*** 'vxresize' command failing when HacliUserLevel is NONE

# haclus -display | grep Hacli
HacliUserLevel      NONE

# vxdctl -c mode
mode: enabled: cluster active - MASTER
master: sys_mas

# fsclustadm -v showprimary /oracle/database
sys_slave

# vxresize  -F vxfs -g studata oradata +100m
VxVM vxresize INFO V-5-1-2742 volume: oradata new_length=3152800 media=
usetype: fsgen old_length=2948000
vx_devname: /dev/vx/rdsk/studata/oradata blkname=/dev/vx/dsk/studata/oradata
VxVM vxresize INFO V-5-1-2737 filesystem type: VXFS
VxVM vxresize INFO V-5-1-2696 /dev/vx/rdsk/studata/oradata is mounted on /oracle/database
VxVM vxresize INFO V-5-1-2725 VXASSIST_CMD: /usr/sbin/vxassist  -g studata growto oradata 3152800  2>&1
VxVM vxresize INFO V-5-1-2727 VXASSIST_CMD: volume oradata, diskgroup studata is currently 2948000 sectors - size will grow to 3152800 sectors
VxVM vxresize INFO V-5-1-8579 VXFS_FSADM_CMD: /opt/VRTSvcs/bin/hacli -cmd "/usr/lib/fs/vxfs/fsadm -F vxfs -r "/dev/vx/rdsk/studata/oradata" -b 3152800 "/oracle/database"" -sys sys_slave
VxVM vxresize INFO V-5-1-0 VCS WARNING V-16-1-50112 hacli is disabled
VxVM vxresize ERROR V-5-1-7514 Problem running fsadm command for volume oradata, in diskgroup studata
VxVM vxresize INFO V-5-1-4855  Filesystem grow failed. Volume oradata, diskgroup studata will be restored to original size.  It is currently 2948000 sectors - size will shrink to 3152800 sectors
VxVM vxresize INFO V-5-1-2725 VXASSIST_CMD: /usr/sbin/vxassist  -f -g studata shrinkto oradata 2948000  2>&1
VxVM vxresize INFO V-5-1-2726 VXASSIST_CMD: volume oradata, diskgroup studata currently 3152800 sectors - size will shrink to 2948000 sectors


*** Changing HacliUserLevel to COMMANDROOT

# haclus -modify HacliUserLevel COMMANDROOT
# haclus -display | grep Hacli
HacliUserLevel      COMMANDROOT

*** Now the command completes successfully

# vxresize  -F vxfs -g studata oradata +100m
VxVM vxresize INFO V-5-1-2742 volume: oradata new_length=3152800 media=
usetype: fsgen old_length=2948000
vx_devname: /dev/vx/rdsk/studata/oradata blkname=/dev/vx/dsk/studata/oradata
VxVM vxresize INFO V-5-1-2737 filesystem type: VXFS
VxVM vxresize INFO V-5-1-2696 /dev/vx/rdsk/studata/oradata is mounted on /oracle/database
VxVM vxresize INFO V-5-1-2725 VXASSIST_CMD: /usr/sbin/vxassist  -g studata growto oradata 3152800  2>&1
VxVM vxresize INFO V-5-1-2727 VXASSIST_CMD: volume oradata, diskgroup studata is currently 2948000 sectors - size will grow to 3152800 sectors
VxVM vxresize INFO V-5-1-8579 VXFS_FSADM_CMD: /opt/VRTSvcs/bin/hacli -cmd "/usr/lib/fs/vxfs/fsadm -F vxfs -r "/dev/vx/rdsk/studata/oradata" -b 3152800 "/oracle/database"" -sys sys_slave
VxVM vxresize INFO V-5-1-0 sys_slave:
VxVM vxresize INFO V-5-1-0 UX:vxfs fsadm: INFO: V-3-25942: /dev/vx/rdsk/studata/oradata size increased from 2948000 sectors to 3152800 sectors
VxVM vxresize INFO V-5-1-0





Legacy ID



275053


Article URL http://www.symantec.com/docs/TECH37254


Terms of use for this information are found in Legal Notices