Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Modifying Online the Resource for a Highly Available File System

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:


Note –

Sun Cluster software does not enable you to rename a file system while the file system is online.


ProcedureHow to Add File Systems Other Than Solaris ZFS to an Online HAStoragePlus Resource

When you add a local or global file system to a HAStoragePlus resource, the HAStoragePlus resource automatically mounts the file system.

  1. On one node of the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. 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:

    • For local file systems

      • Set the mount at boot field to no.

      • Remove the global flag.

    • For cluster file systems

      • If the file system is a global file system, set the mount options field to contain the global option.

  3. 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
    
    -R hasp-resource

    Specifies the HAStoragePlus resource to which you are adding file systems

    -G hasp-rg

    Specifies the resource group that contains the HAStoragePlus resource

  4. 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


    # clresource set -p FileSystemMountPoints="mount-point-list" hasp-resource
    
    -p FileSystemMountPoints="mount-point-list"

    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. The format of each entry in the list is LocalZonePath:GlobalZonePath. In this format, the global path is optional. If the global path is not specified, the global path is the same as the local path.

    hasp-resource

    Specifies the HAStoragePlus resource to which you are adding file systems.

  5. 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
    
    -R hasp-resource

    Specifies the HAStoragePlus resource to which you are adding file systems.

    -G hasp-rg

    Specifies the resource group that contains the HAStoragePlus resource.

  6. 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.


    # clresource status hasp-resource
    

Example 2–36 Adding a File System to an Online HAStoragePlus Resource

This example shows how to add a file system to an online HAStoragePlus resource.

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/fs
# clresource set  \
-p FileSystemMountPoints="/global/global-fs/fs,/global/local-fs/fs"
# scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints rshasp
STRINGARRAY
/global/global-fs/fs
/global/local-fs/fs
# clresource status rshasp


=== Cluster Resources ===

Resource Name          Node Name      Status        Message
--------------        ----------      -------       --------
   rshasp               node46       Offline         Offline
                        node47       Online          Online

ProcedureHow to Remove File Systems Other Than Solaris ZFS From an Online HAStoragePlus Resource

When you remove a file system from an HAStoragePlus resource, the HAStoragePlus resource treats a local file system differently from a global file system.


Caution – Caution –

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.


  1. On one node of the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. 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
    
    -R hasp-resource

    Specifies the HAStoragePlus resource from which you are removing file systems.

    -G hasp-rg

    Specifies the resource group that contains the HAStoragePlus resource.

  3. 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.


    # clresource set -p FileSystemMountPoints="mount-point-list" hasp-resource
    
    -p FileSystemMountPoints="mount-point-list"

    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.

    hasp-resource

    Specifies the HAStoragePlus resource from which you are removing file systems.

  4. 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
    
    -R hasp-resource

    Specifies the HAStoragePlus resource from which you are removing file systems.

    -G hasp-rg

    Specifies the resource group that contains the HAStoragePlus resource.

  5. 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.


    # clresource status hasp-resource
    
  6. (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.


Example 2–37 Removing a File System From an Online HAStoragePlus Resource

This example shows how to remove a file system from an online HAStoragePlus resource.


# scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints
STRINGARRAY
/global/global-fs/fs
/global/local-fs/fs
# clresource set -p FileSystemMountPoints="/global/global-fs/fs"
# scha_resource_get -O extension -R rshasp -G rghasp FileSystemMountPoints rshasp
STRINGARRAY
/global/global-fs/fs
 # clresource status rshasp


=== Cluster Resources ===

Resource Name          Node Name      Status        Message
--------------        ----------      -------       --------
   rshasp               node46       Offline         Offline
                        node47       Online          Online

ProcedureHow to Add a Solaris ZFS Storage Pool to an Online HAStoragePlus Resource

When you add a Solaris ZFS (Zettabyte File System) storage pool to an online HAStoragePlus resource, the HAStoragePlus resource does the following:

  1. On any node in the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Determine the ZFS storage pools that the HAStoragePlus resource already manages.


    # clresource show -g hasp-resource-group -p Zpools hasp-resource
    
    -g hasp-resource-group

    Specifies the resource group that contains the HAStoragePlus resource.

    hasp-resource

    Specifies the HAStoragePlus resource to which you are adding the ZFS storage pool.

  3. Add the new ZFS storage pool to the existing list of ZFS storage pools that the HAStoragePlus resource already manages.


    # clresource set -p Zpools="zpools-list" hasp-resource
    
    -p Zpools="zpools-list"

    Specifies a comma-separated list of existing ZFS storage pool names that the HAStoragePlus resource already manages and the new ZFS storage pool name that you want to add.

    hasp-resource

    Specifies the HAStoragePlus resource to which you are adding the ZFS storage pool.

  4. Compare the new list of ZFS storage pools that the HAStoragePlus resource manages with the list that you generated in Step 2.


    # clresource show -g hasp-resource-group -p Zpools hasp-resource
    
    -g hasp-resource-group

    Specifies the resource group that contains the HAStoragePlus resource.

    hasp-resource

    Specifies the HAStoragePlus resource to which you added the ZFS storage pool.

  5. Confirm that the HAStoragePlus resource is online and not faulted.

    If the HAStoragePlus resource is online but faulted, validation of the resource succeeded. However, an attempt by the HAStoragePlus resource to import and mount the ZFS failed. In this case, you need to repeat the preceding set of steps.


    # clresourcegroup status hasp-resource
    

ProcedureHow to Remove a Solaris ZFS Storage Pool From an Online HAStoragePlus Resource

When you remove a Solaris ZFS (Zettabyte File System) storage pool from an online HAStoragePlus resource, the HAStoragePlus resource does the following:

  1. On any node in the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Determine the ZFS storage pools that the HAStoragePlus resource already manages.


    # clresource show -g hasp-resource-group -p Zpools hasp-resource
    
    -g hasp-resource-group

    Specifies the resource group that contains the HAStoragePlus resource.

    hasp-resource

    Specifies the HAStoragePlus resource from which you are removing the ZFS storage pool.

  3. Remove the ZFS storage pool from the list of ZFS storage pools that the HAStoragePlus resource currently manages.


    # clresource set -p Zpools="zpools-list" hasp-resource
    
    -p Zpools="zpools-list"

    Specifies a comma-separated list of ZFS storage pool names that the HAStoragePlus resource currently manages, minus the ZFS storage pool name that you want to remove.

    hasp-resource

    Specifies the HAStoragePlus resource from which you are removing the ZFS storage pool.

  4. Compare the new list of ZFS storage pools that the HAStoragePlus resource now manages with the list that you generated in Step 2.


    # clresource show -g hasp-resource-group -p Zpools hasp-resource
    
    -g hasp-resource-group

    Specifies the resource group that contains the HAStoragePlus resource.

    hasp-resource

    Specifies the HAStoragePlus resource from which you removed the ZFS storage pool.

  5. Confirm that the HAStoragePlus resource is online and not faulted.

    If the HAStoragePlus resource is online but faulted, validation of the resource succeeded. However, an attempt by the HAStoragePlus resource to unmount and export the ZFS failed. In this case, you need to repeat the preceding set of steps.


    # clresourcegroup status SUNW.HAStoragePlus +
    

ProcedureHow to Recover From a Fault After Modifying the a FileSystemMountPoints Property of a HAStoragePlus Resource

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.

  1. Determine the fault that caused the attempted modification to fail.


    # clresource status hasp-resource
    

    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.

  2. Correct the fault that caused the attempted modification to fail.

  3. Repeat the step to modify the FileSystemMountPoints extension property of the HAStoragePlus resource.


    # clresource set -p FileSystemMountPoints="mount-point-list" hasp-resource
    
    -p FileSystemMountPoints="mount-point-list"

    Specifies a comma-separated list of mount points that you specified in the unsuccessful attempt to modify the highly available file system

    hasp-resource

    Specifies the HAStoragePlus resource that you are modifying

  4. Confirm that the HAStoragePlus resource is online and not faulted.


    # clresource status
    

Example 2–38 Status of a Faulty HAStoragePlus Resource

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.


# clresource status

  === Cluster Resources ===

  Resource Name     Node Name     Status       Status Message
  --------------    ----------    -------      -------------
  rshasp            node46        Offline      Offline
                    node47        Online       Online Faulted - Failed to fsck: /mnt.

ProcedureHow to Recover From a Fault After Modifying the Zpools Property of a HAStoragePlus Resource

If a fault occurs during a modification of the Zpools 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.

  1. Determine the fault that caused the attempted modification to fail.


    # clresource status hasp-resource
    

    The status message of the faulty HAStoragePlus resource indicates the fault. Possible faults are as follows:

    • The ZFS mount point property of the file system of the zpool is set to legacy.

    • The ZFS pool zpool failed to import.

    • The ZFS pool zpool failed to export.

  2. Correct the fault that caused the attempted modification to fail.

  3. Repeat the step to modify the zpools extension property of the HAStoragePlus resource.


    # clresource set -p Zpools="zpools-list" hasp-resource
    
    -p Zpools="zpools-list"

    Specifies a comma-separated list of ZFS storage pool names that the HAStoragePlus currently manages, minus the ZFS storage pool name that you want to remove.

    hasp-resource

    Specifies the HAStoragePlus resource that you are modifying

  4. Confirm that the HAStoragePlus resource is online and not faulted.


    # clresource status
    

Example 2–39 Status of a Faulty HAStoragePlus Resource

This example shows the status of a faulty HAStoragePlus resource. This resource is faulty because the ZFS pool zpool failed to import.


# clresource status hasp-resource

  === Cluster Resources ===

  Resource Name     Node Name     Status            Status Message
  --------------    ----------    -------           -------------
  hasp-resource     node46        Online            Faulted - Failed to import:hazpool
                    node47        Offline           Offline