IT Share NVP -ViettechgroupVN-Phuong Nguyen blog Viettechgroup.vn | Share make us stronger Knowledge is Sharing Viettechgroup- Sharing Make Us Stronger-Kiến thức CNTT là sự chia sẻ- NVP-Chia sẻ làm chúng ta mạnh hơn-Viettechgroup.vn Viettechgroup.com.vn| ITShareNVP Channel | Phương Nguyễn | Phuong Nguyen Blog| Lưu trữ kiến thức chia sẽ kinh nghiệm CNTT | Phương Nguyễn

VMFS Resignaturing

0

When you attempt to mount a device that contains a VMFS datastore copy/storage snapshot, you are given the option to either mount the datastore using the existing signature or you can assign the datastore a new signature.

ESX detects a lun as being a snapshot/copy by comparing the SCSI_DiskID information returned from the storage array, with the SCSI_DiskID information stored in the LVM header. If the two values do not match, the volume is deemed to be a snapshot/copy and is not mounted.

Looking in the vmkernel log you should see something like the following:

Jul 18 10:58:31 ServerB vmkernel: 0:14:17:59.787 cpu13:1046)LVM: 5670: Device vmhba1:0:5:1 is a snapshot:

Each VMFS 5 datastore contains a Universally Unique Identifier (UUID). The UUID is stored in the metadata of your file system called a superblock and is a unique hexadecimal number.

What is a UUID made up of?

The UUID is comprised of four components as you can see in this example VMFS UUID: 4fbfff40-d0358207-e61a-d067e5face92

  •  System Time (4fbfff40)
  • CPU Timestamp (d0358207)
  • Random Number (e61a)
  • MAC Address – Management Port uplink of the host used to resignature or create the datastore (d067e5face92)

When a LUN is duplicated by storage snapshot/replication the UUID is also duplicated. When you attempt to mount a duplicated data store you will be given two options:

  1. Keep the existing signature. You cannot mount two datastores with the same UUID on the same host.  ESX uses the UUID to reference the device. As such, two with the same UUID would cause all kinds of issues. However, you may unmount the initial datastore and bring the duplicate datastore with the same UUID online. You can however mount a snapshot/replicated lun, whilst keeping the existing signature, on a host that does not have access to the original lun (this is most commonly seen when carrying out a DR plan).
  2. Assign a new signature. This will change the UUID and allow it to be mounted.

These two options are available to you when you use the Add Storage wizard in the vSphere client:

Image 78

There are some things to bear in mind before you make your choice. Creating a new signature for a drive is irreversible – once you have applied the new signature you cannot get the old one back. A datastore with extents may only be resignatured if all extents are online. Finally, if a datastore is resignatured, the VMs that use a datastore must be reassociated with the disk in their respective configuration files. The virtual machines must also be re-registered within vCenter.

The most common scenario in which I come across having to deal with this issue is when working with a disaster recovery plan. When Site Recovery Manager isn’t it use, it is necessary to carry out the mounting of replicated/snapshot luns manually. In this situation it is usually ok to mount the lun without resignaturing  because the host to which you mount the lun is likely in a DR site, and as such doesn’t have access to the original lun. Basically, it’s fine not to perform the resignature when mounting the volume on a host that is unable to see the original disk. Resignaturing becomes important when you need to mount a replicated lun on the same host(s) that have the original mounted.

So, hows it done?

You can resignature a disk by using the vSphere Client or using the command line.

Using ESXCLI we can list all detected VMFS snapshot volumes with the following:

esxcli storage vmfs snapshot list

This will list the names of the VMFS datastores and their UUIDs. We can then mount the volumes using:

esxcli storage vmfs snapshot resignature –volume-label=<label>|–volume-uuid=<id>

As these commands are ran directly on a host, it is necessary to run them on each host in a cluster, if you want to make the volume available to each. NOTE: You will only be able to mount the volume if it has been enabled for Read/Write access – in most environments this will be handled by the storage guys.

As an alternative you can also use the esxcfg-* commands, as follows:

‘esxcfg-volume –l’ to see a list of copied volumes

Choose either;

‘esxcfg-volume –r to resignature the volume

‘esxcfg-volume –M to mount the volume without resignaturing (use lower case m for temporary mount rather than persistent).

The process using the vSphere client is as follows:

  1. On your chosen host, browse to the Configuration | Storage tab
  2. Click Add Storage
  3. Select Disk/LUN and click Next
  4. Select the device you wish to add add and click Next
  5. Select Assign new signature or keep existing signature, depending on your needs, and click Next
  6. Click finish. The volume should now be mounted and available in the datastores view.

Source: http://buildvirtual.net/vmfs-resignaturing/

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More