You might need a highly available file system to remain available while you are modifying the resource that represents the file system. For example, you might need the file system to remain available because storage is being provisioned dynamically. In this situation, modify the resource that represents the highly available file system while the resource is online.
In the Sun Cluster environment, a highly available file system is represented by an HAStoragePlus resource. Sun Cluster enables you to modify an online HAStoragePlus resource as follows:
Adding file systems to the HAStoragePlus resource
Removing file systems from the HAStoragePlus resource
Sun Cluster does not enable you to rename a file system while the file system is online.
When you add a file system to an HAStoragePlus resource, the HAStoragePlus resource treats a local file system differently from a global file system.
The HAStoragePlus resource always automatically mounts a local file system.
The HAStoragePlus resource automatically mounts a global file system only if the AffinityOn extension property of the HAStoragePlus resource is True.
For information about the AffinityOn extension property, see Synchronizing the Startups Between Resource Groups and Disk Device Groups.
On one node of the cluster, become superuser.
In the /etc/vfstab file on each node of the cluster, add an entry for the mount point of each file system that you are adding.
For each entry, set the mount at boot field and the mount options field as follows:
Set the mount at boot field to no.
If the file system is a global file system, set the mount options field to contain the global option.
Retrieve the list of mount points for the file systems that the HAStoragePlus resource already manages.
# scha_resource_get -O extension -R hasp-resource -G hasp-rg \ FileSystemMountPoints |
Specifies the HAStoragePlus resource to which you are adding file systems
Specifies the resource group that contains the HAStoragePlus resource
Modify the FileSystemMountPoints extension property of the HAStoragePlus resource to contain the following mount points:
The mount points of the file systems that the HAStoragePlus resource already manages
The mount points of the file systems that you are adding to the HAStoragePlus resource
# scrgadm -c -j hasp-resource -x FileSystemMountPoints="mount-point-list" |
Specifies the HAStoragePlus resource to which you are adding file systems
Specifies a comma-separated list of mount points of the file systems that the HAStoragePlus resource already manages and the mount points of the file systems that you are adding
Confirm that you have a match between the mount point list of the HAStoragePlus resource and the list that you specified in Step 4.
# scha_resource_get -O extension -R hasp-resource -G hasp-rg \ FileSystemMountPoints |
Specifies the HAStoragePlus resource to which you are adding file systems
Specifies the resource group that contains the HAStoragePlus resource
Confirm that the HAStoragePlus resource is online and not faulted.
If the HAStoragePlus resource is online and faulted, validation of the resource succeeded, but an attempt by HAStoragePlus to mount a file system failed.
# scstat -g |
This example shows how to add a file system to an online HAStoragePlus resource.
The HAStoragePlus resource is named rshasp and is contained in the resource group rghasp.
The HAStoragePlus resource named rshasp already manages the file system whose mount point is /global/global-fs/fs1.
The mount point of the file system that is to be added is /global/global-fs/fs2.
The example assumes that the /etc/vfstab file on each cluster node already contains an entry for the file system that is to be added.
# scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints STRINGARRAY /global/global-fs/fs1 # scrgadm -c -j rshasp \ -x FileSystemMountPoints="/global/global-fs/fs1,/global/global-fs/fs2" # scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints STRINGARRAY /global/global-fs/fs1 /global/global-fs/fs2 # scstat -g -- Resource Groups and Resources -- Group Name Resources ---------- --------- Resources: rghasp rshasp -- Resource Groups -- Group Name Node Name State ---------- --------- ----- Group: rghasp node46 Offline Group: rghasp node47 Online -- Resources -- Resource Name Node Name State Status Message ------------- --------- ----- -------------- Resource: rshasp node46 Offline Offline Resource: rshasp node47 Online Online |
When you remove a file system from an HAStoragePlus resource, the HAStoragePlus resource treats a local file system differently from a global file system.
The HAStoragePlus resource always automatically unmounts a local file system.
The HAStoragePlus resource automatically unmounts a global file system only if the AffinityOn extension property of the HAStoragePlus resource is True.
For information about the AffinityOn extension property, see Synchronizing the Startups Between Resource Groups and Disk Device Groups.
Before removing a file system from an online HAStoragePlus resource, ensure that no applications are using the file system. When you remove a file system from an online HAStoragePlus resource, the file system might be forcibly unmounted. If a file system that an application is using is forcibly unmounted, the application might fail or hang.
On one node of the cluster, become superuser.
Retrieve the list of mount points for the file systems that the HAStoragePlus resource already manages.
# scha_resource_get -O extension -R hasp-resource -G hasp-rg \ FileSystemMountPoints |
Specifies the HAStoragePlus resource from which you are removing file systems
Specifies the resource group that contains the HAStoragePlus resource
Modify the FileSystemMountPoints extension property of the HAStoragePlus resource to contain only the mount points of the file systems that are to remain in the HAStoragePlus resource.
# scrgadm -c -j hasp-resource -x FileSystemMountPoints="mount-point-list" |
Specifies the HAStoragePlus resource from which you are removing file systems.
Specifies a comma-separated list of mount points of the file systems that are to remain in the HAStoragePlus resource. This list must not include the mount points of the file systems that you are removing.
Confirm that you have a match between the mount point list of the HAStoragePlus resource and the list that you specified in Step 3.
# scha_resource_get -O extension -R hasp-resource -G hasp-rg \ FileSystemMountPoints |
Specifies the HAStoragePlus resource from which you are removing file systems
Specifies the resource group that contains the HAStoragePlus resource
Confirm that the HAStoragePlus resource is online and not faulted.
If the HAStoragePlus resource is online and faulted, validation of the resource succeeded, but an attempt by HAStoragePlus to unmount a file system failed.
# scstat -g |
(Optional) From the /etc/vfstab file on each node of the cluster, remove the entry for the mount point of each file system that you are removing.
This example shows how to remove a file system from an online HAStoragePlus resource.
The HAStoragePlus resource is named rshasp and is contained in the resource group rghasp.
The HAStoragePlus resource named rshasp already manages the file systems whose mount points are as follows:
/global/global-fs/fs1
/global/global-fs/fs2
The mount point of the file system that is to be removed is /global/global-fs/fs2.
# scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints STRINGARRAY /global/global-fs/fs1 /global/global-fs/fs2 # scrgadm -c -j rshasp -x FileSystemMountPoints="/global/global-fs/fs1" # scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints STRINGARRAY /global/global-fs/fs1 # scstat -g -- Resource Groups and Resources -- Group Name Resources ---------- --------- Resources: rghasp rshasp -- Resource Groups -- Group Name Node Name State ---------- --------- ----- Group: rghasp node46 Offline Group: rghasp node47 Online -- Resources -- Resource Name Node Name State Status Message ------------- --------- ----- -------------- Resource: rshasp node46 Offline Offline Resource: rshasp node47 Online Online |
If a fault occurs during a modification of the FileSystemMountPoints extension property, the status of the HAStoragePlus resource is online and faulted. After the fault is corrected, the status of the HAStoragePlus resource is online.
Determine the fault that caused the attempted modification to fail.
# scstat -g |
The status message of the faulty HAStoragePlus resource indicates the fault. Possible faults are as follows:
The device on which the file system should reside does not exist.
An attempt by the fsck command to repair a file system failed.
The mount point of a file system that you attempted to add does not exist.
A file system that you attempted to add cannot be mounted.
A file system that you attempted to remove cannot be unmounted.
Correct the fault that caused the attempted modification to fail.
Repeat the step to modify the FileSystemMountPoints extension property of the HAStoragePlus resource.
# scrgadm -c -j hasp-resource -x FileSystemMountPoints="mount-point-list" |
Specifies the HAStoragePlus resource that you are modifying
Specifies a comma-separated list of mount points that you specified in the unsuccessful attempt to modify the highly available file system
Confirm that the HAStoragePlus resource is online and not faulted.
# scstat -g |
This example shows the status of a faulty HAStoragePlus resource. This resource is faulty because an attempt by the fsck command to repair a file system failed.
# scstat -g -- Resource Groups and Resources -- Group Name Resources ---------- --------- Resources: rghasp rshasp -- Resource Groups -- Group Name Node Name State ---------- --------- ----- Group: rghasp node46 Offline Group: rghasp node47 Online -- Resources -- Resource Name Node Name State Status Message ------------- --------- ----- -------------- Resource: rshasp node46 Offline Offline Resource: rshasp node47 Online Online Faulted - Failed to fsck: /mnt. |