User Tools

Site Tools


vmware:resignlun

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vmware:resignlun [2012/11/08 22:07] nickaccadvmware:resignlun [2014/09/10 15:36] (current) naccad
Line 30: Line 30:
    - force mount - temporarily (revert after reboot) ''esxcfg-volume -m VMFS_NAME'', or permanently: ''esxcfg-volume -M VMFS_NAME''    - force mount - temporarily (revert after reboot) ''esxcfg-volume -m VMFS_NAME'', or permanently: ''esxcfg-volume -M VMFS_NAME''
    - you can also resignature the LUN using ''esxcfg-volume -r VMFS_NAME''    - you can also resignature the LUN using ''esxcfg-volume -r VMFS_NAME''
 +   - you can resignature a forced mounted LUN as well, you have to unmount then resignature.
    - OR you can do it from the vSphere Client GUI, simply do an "Add Storage" and select to "Keep existing signature" or "Create new signature", it does the same thing but for all the ESX hosts in the cluster, which might be easier since ''esxcfg-volume'' operates on a single ESX host level.    - OR you can do it from the vSphere Client GUI, simply do an "Add Storage" and select to "Keep existing signature" or "Create new signature", it does the same thing but for all the ESX hosts in the cluster, which might be easier since ''esxcfg-volume'' operates on a single ESX host level.
  
 In case you want to do it from the command line, for example you have a large number of LUNs in that condition, I wrote a small one-liner that will do this for you, if you are doing a force mount, you will need to do it on each ESX host in the cluster, but it will save you a lot of time. In case you want to do it from the command line, for example you have a large number of LUNs in that condition, I wrote a small one-liner that will do this for you, if you are doing a force mount, you will need to do it on each ESX host in the cluster, but it will save you a lot of time.
  
-''for i in `esxcfg-volume -l | grep VMFS3 | cut -d ' ' -f 3 | cut -d '/' -f 2 `; do esxcfg-volume -M $i ; done''+''for i in `esxcfg-volume -l | grep VMFS | cut -d ' ' -f 3 | cut -d '/' -f 2 `; do esxcfg-volume -M $i ; done''
  
 Enjoy Enjoy
Line 40: Line 41:
 -nick -nick
  
 +== Update ==
 +
 +With the introduction of ''esxcli'' and ''localcli'' that replace multiple ''esxcfg-*'' commands, the same operations can be done using the following instead:
 +
 +
 +   - Get the list: ''localcli storage vmfs snapshot list''
 +   - Mount "-m": ''localcli storage vmfs mount --no-persist --volume-label''
 +   - Mount "-M": ''localcli storage vmfs mount --volume-uuid''
 +   - Resignature: ''localcli storage vmfs resignature --volume-label''
 +
 +
 +-nick
vmware/resignlun.1352412429.txt.gz · Last modified: 2012/11/08 22:07 by nickaccad