cancel
Showing results for 
Search instead for 
Did you mean: 

Veritas Storage Foundation - Volume Disabled After 'rmdisk'

Shaun_Glass
Level 2

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 prompted to run the " -k" option to remove the disk.

However after re-running the command with the " -k" option :

"vxdg -g dg -k rmdisk vsp-xx-xx"

... the volume went into a disabled state.

Fortunately no data was lost once the "vxmend" was completed on the volume.

I would just like to know if this was to be expected when running the above with the " -k" option ?

Regards

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

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

View solution in original post

4 REPLIES 4

TonyGriffiths
Level 6
Employee Accredited Certified

Hi,

It looks like you attempted to remove a disk/LUN from a diskgroup, though the disk was still being used as storage for a volume.

 

After using "-k" the the disk was removed, though the volume now has some storage mapped to using that disk. To remove a disk from a disk group, it should first be freed up from any volume use.

 

cheers

tony

mikebounds
Level 6
Partner Accredited

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

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Oh dear! 

I hope you have a backup of this volume... 

Or else you might be able to find a good copy of diskgroup backup and restore diskgroup/volume with vxconfigrestore.

See this TN: http://www.symantec.com/docs/TECH201366  

If all is fine after diskgroup restore, follow the 'reverse' steps in Mike's post.

starflyfly
Level 6
Employee Accredited Certified

Hi, 

question 1: if -k is a good option for you: 

 

Refer manual about vxdg -k rmdisk:

 rmdisk    Removes the specified disk or disks  from  a  disk
               group.  It is not possible to remove the last disk
               containing a valid disk group configuration or log
               copy from its disk group.

               Typically, the rmdisk operation fails  if  subdisk
               records  point  to  the  named disk media records.
               However, if the -k option is specified,  the  disk
               media  records  are  kept,  although  in a removed
               state, and the  subdisk  records  still  point  to
               them.   The subdisks, and any plexes that refer to
               them, remain unusable until the disk  is  re-added
               using  the  -k  option  to  the adddisk operation.
               VxVM disables volumes when all plexes become unus-
               able.

 

so with -k option rmdisk, mean  you will use -k option to add disk back: 

 

 if the -k option is specified,  the  disk
               media  records  are  kept,  although  in a removed
               state, and the  subdisk  records  still  point  to
               them.   The subdisks, and any plexes that refer to
               them, remain unusable until the disk  is  re-added
               using  the  -k  option  to  the adddisk operation.

 

 

In your situation,  -k is not needed.

 

question 2: volume disable:

   VxVM disables volumes when all plexes become unus-
               able.

  if you like remove disk from dg , must make sure the disk is not used by any volume.

 You can use vxeva  to get that.

 

 

Regards