Forum Discussion

Shaun_Glass's avatar
10 years ago

Veritas Storage Foundation - Volume Disabled After 'rmdisk'

Dear All, I added a LUN to a specific volume and realised that I added it to the wrong volume. To remove the LUN the following command was run : "vxdg -g dg rmdisk vsp-xx-xx" I was then prom...
  • mikebounds's avatar
    10 years ago

    Just to explain:

    A diskgroup is a collection of disks (LUNs)

    A volume is created from the pool of LUNS in a diskgroup

    A filesystem is usually created on the volume.

    So the process to extend a filesystem is:

    1. Add disk/LUN to O/S
    2. Scan disks using "vxdtl enable" to add to volume manager control
    3. Initialise disk to create a public and private region using "vxdisksetup"
    4. Add disk to diskgroup using "vxdg addddisk"
    5. Add to volume and grow filesystem using "vxresize"

    So if you wanted to remove a LUN you added to extend a filesystem, you would do the reverse of some or all of these steps, so if you added to the wrong volume and the volume you wanted to add to was in the same diskgroup you would do JUST reverse of step 5 and if volume you wanted to add to was in a different diskgroup you would do the reverse of 5 and 4.

    The reverse steps are:

    5. Shrink filesystem using "vxresize"
    4. Remove disk from diskgroup using "vxdg rmdisk"
    3. Un-Initialise disk to remove public and private region using "vxdiskunsetup"
    2. Remove disk from volume manager control using "vxdisk rm"
    1. Remove disk from O/S
     

    So you jumped straight to reverse step 2, without doing 5 and 4 first.
    Note reverse steps 2 and 3 are not even normally done as if you remove disk from O/S, it doesn't need to have these steps done.

    Mike