Xenserver and missing Disk Serial number

Warning! Disk unusable as pool member - serial number is not legitimate or unique.
Disk names may change unfavourably upon reboot leading to inadvertent drive reallocation and potential data loss. This error is caused by the source of these disks such as your Hypervisor or SAN. Please ensure that disks are provided with unique serial numbers before proceeding further.

What is the solution for this issue?

Best regards
Thorsten

@Thorsten_Schollmeyer Welcome to the Rockstor community forum.

As indicated this issue is down to no, or no unique, disk serials being passed by the hypervisor to the VM Rockstor is running on.

We do have an open issue to add this to our minimum system requirements:

Hope that helps.

thanks for the Link but i dont find a solution for my problem, with the xenserver.

i didnt find any solution to set serials on the Xen virtual disks

Should i switch now to freenas?

Hi Thorsten,

I do understand the concern about “Disk names may change unfavourably upon reboot(…).”, because it happens in LInux, but this is not the case with XEN (PV). You actually tell on the hypervisor side what name it should get in the VM and it stays that way:

From the vm.cfg on the hypervisor:
disk = ['file:/OVS/Repositories/0004fb00000300006530d635cb3eb558/VirtualDisks/0004fb0000120000937930df5c202a35.img,xvdb,w']

This will become /dev/xvdb in the VM, because you told it to be /dev/xvdb. If you move the disk to an other ‘slot’ manually, yes, the ‘unique-path’ changes, but I think that would be acceptable.

Also personally I think the ‘uniqueness’ of the UUID on volume level would be sufficient, because when a disk is completely empty (like an empty bucket), it starts to matter which disk it is when you put something in/on it.

I’m willing to take the risk of ‘unfavourably disk name changes’ for XEN, is there any work around for this? I have created ‘unique’ symlinks in /dev/disk/by-id: “xvdb -> …/…/xvdb” and also I see a some ‘fake-serial-’ being created.

Regards, Ian.

A unique disk ID is possible to get when you install the xenstore tools. It’s available in the xen-runtime package in CentOS7 repo: http://mirror.centos.org/centos/7/virt/x86_64/xen/

With this you can get the filename of the backend-file which is mounted as disk from the VM. This does also not change between reboots, unless you rename it manually.

xenstore-read domid
40

cat /sys/block/xvdk/device/nodename | awk -F "/" '{print $3}'
51872

xenstore-ls -f /local/domain/0/backend/vbd/40/51872 | grep "params ="
(...0004fb0000120000a70eefd5395e52e3.img)

xenstore-ls -f /local/domain/0/backend/vbd/`xenstore-read domid`/`cat /sys/block/xvdk/device/nodename | awk -F "/" '{print $3}'` | grep "params =" | awk -F "/" '{print $NF}' | awk -F "." '{print $1}'
0004fb0000120000a70eefd5395e52e3

Using the device name xvdk in the last command, one can make it a variable and use it in a script and in UDEV:

[root@rockstor ~]# ./xen_vbd_serial.sh xvdk
0004fb0000120000a70eefd5395e52e3

When using Oracle VM, the default names can be transformed to UUID’s.
Don’t trust the value from the node name (51872) it’s as unique as the device name (xvdk), persistent between reboots, unless you move it to a different ‘slot’.

Regards, Ian.