Sun Cluster 2.2 System Administration Guide

Administering Disk Groups

For VxVM, it is most convenient to create and populate disk groups from the active node that is the default master of the particular disk group. In an N+1 configuration, each of these default master nodes shares multihost disk connectivity with only one other node in the cluster, the hot-standby node. By using these nodes to populate the disk groups, you avoid the risk of generating improperly configured groups.

Creating a Disk Group (VxVM)

You can use either the vxdiskadm menus or the graphical user interface to create a new disk group. Alternately, you can use the command-line utility vxdg init.

Once the disk groups have been created and populated, each one should be deported by using the vxdg deport command. Then, each group should be imported onto the hot-standby node by using the -t option. The -t option is important, as it prevents the import from persisting across the next boot. All VxVM plexes and volumes should be created, and volumes started, before continuing.

Moving a Disk to a Different Disk Group (VxVM)

Use the following procedure to move a disk to a different disk group.

How to Move a Disk to a Different Disk Group (VxVM)

To move a disk between disk groups, remove the disk from one disk group and add it to the other.

This example moves the physical disk c1t0d1 from disk group acct to disk group log_node1 by using command-line utilities.

  1. Use the vxprint(1M) command to determine if the disk is in use.


    # vxprint -g acct
    TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
    dg acct         acct         -        -        -        -        -       -
    
    dm c1t0d0       c1t0d0s2     -        2050272  -        -        -       -
    dm c1t0d1       c1t0d1s2     -        2050272  -        -        -       -
    dm c2t0d0       c2t0d0s2     -        2050272  -        -        -       -
    dm c2t0d1       c2t0d1s2     -        2050272  -        -        -       -
    
    v  newvol       gen          ENABLED  204800   -        ACTIVE   -       -
    pl newvol-01    newvol       ENABLED  205632   -        ACTIVE   -       -
    sd c1t0d1-01    newvol-01    ENABLED  205632   0        -        -       -
    pl newvol-02    newvol       ENABLED  205632   -        ACTIVE   -       -
    sd c2t0d1-01    newvol-02    ENABLED  205632   0        -        -       -
    
    v  vol01        gen          ENABLED  1024000  -        ACTIVE   -       -
    pl vol01-01     vol01        ENABLED  1024128  -        ACTIVE   -       -
    sd c1t0d0-01    vol01-01     ENABLED  1024128  0        -        -       -
    pl vol01-02     vol01        ENABLED  1024128  -        ACTIVE   -       -
    sd c2t0d0-01    vol01-02     ENABLED  1024128  0        -        -       -

  2. Use the vxedit(1M) command to remove the volume to free up the c1t0d1 disk.

    You must run the vxedit command from the node mastering the shared disk group.


    # vxedit -g acct -fr rm newvol
    

    The -f option forces an operation. The -r option makes the operation recursive.

  3. Remove the c1t0d1 disk from the acct disk group.

    You must run the vxdg command from the node mastering the shared disk group.


    # vxdg -g acct rmdisk c1t0d1
    

  4. Add the c1t0d1 disk to the log_node1 disk group.


    # vxdg -g log_node1 adddisk c1t0d1
    


    Caution - Caution -

    This procedure does not save the configuration or data on the disk.


    This is the acct disk group after c1t0d1 is removed.


    # vxprint -g acct
    TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
    dg acct         acct         -        -        -        -        -       -
    
    dm c1t0d0       c1t0d0s2     -        2050272  -        -        -       -
    dm c2t0d0       c2t0d0s2     -        2050272  -        -        -       -
    dm c2t0d1       c2t0d1s2     -        2050272  -        -        -       -
    
    v  vol01        gen          ENABLED  1024000  -        ACTIVE   -       -
    pl vol01-01     vol01        ENABLED  1024128  -        ACTIVE   -       -
    sd c1t0d0-01    vol01-01     ENABLED  1024128  0        -        -       -
    pl vol01-02     vol01        ENABLED  1024128  -        ACTIVE   -       -
    sd c2t0d0-01    vol01-02     ENABLED  1024128  0        -        -       -

    This is the log_node1 disk group after c1t0d1 is added.


    # vxprint -g log_node1 
    TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
    dg log_node1    log_node1    -        -        -        -        -       -
    
    dm c1t0d1       c1t0d1s2     -        2050272  -        -        -       -
    dm c1t3d0       c1t3d0s2     -        2050272  -        -        -       -
    dm c2t3d0       c2t3d0s2     -        2050272  -        -        -       -
    # 

    To change permissions or ownership of volumes, you must use the vxedit command.


    Caution - Caution -

    Do not use chmod or chgrp. The permissions and ownership set by chmod or chgrp are automatically reset to root during a reboot.


    Here is an example of the permissions and ownership of the volumes vol01 and vol02 in the /dev/vx/rdsk directory before a change.


    # ls -l 
    crw-------		 	 1	 	root 	root	 nnn,nnnnn		date 	time 	vol01
    crw-------		 	 1	 	root	 root 	nnn,nnnnn		date 	time 	vol02
    ...

    This an example for changing the permissions and ownership for vol01.


    # vxedit -g group_name set mode=755 user=oracle vol01
    

    After the edit, note how the permissions and ownership have changed.


    # ls -l 
    crwxr-xr-x		 	 1 	oracle	 root	 nnn,nnnnn	 	date 	time 	vol01
    crw-------		 	 1	 root	 root	 nnn,nnnnn 		date 	time 	vol02
    ...