To move a disk between disk groups, remove the disk from one disk group and add it to the other.
For example, to move the physical disk c1t0d1 from disk group acct to disk group log_node1:
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 - - - |
Remove the volume to free up the c1t0d1 disk:
# vxedit -g acct -fr rm newvol |
The -f option forces an operation. The -r option makes the operation recursive.
Remove the c1t0d1 disk from the acct disk group:
# vxdg -g acct rmdisk c1t0d1 |
Add the c1t0d1 disk to the log_node1 disk group:
# vxdg -g log_node1 adddisk c1t0d1 |
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.
Do not use chmod or chgrp. The permissions and/or 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 directory /dev/vx/rdsk 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 ... |