giovedì 22 luglio 2010

xenserver xe sr-create error The SR operation cannot be performed because a device underlying the SR is in use by the host

This error looks to me to come mainly from the xenserver SR database.

If entering command like

xe sr-create shared=true device-config:device="/dev/drbd1" name-label="DRBD-SR1" type=lvm

exits and returns

The SR operation cannot be performed because a device underlying the SR is in use by the host.

you'd better verify that drbd1 is not already part of the xenserver SR database and if the case, remove it (obviously if you really deleted it in your drbd experimentations)

That is the clean solution... otherwise I'm quite sure (not tested) that choosing a different device name, would work like a charm but this would make not much sense.

Please note that playing with drbd may result in such situation where you already used any drbd resource name to provide some SR to xenserver and next, you forget it...

Robert

1 commento:

Alex ha detto...

Heelo
I get this error
xe sr-create host-uuid=20792514-77c7-4611-8586-fbd10f2f46f4 type="lvm" name-label="DRBD-SR" device-config:device="/dev/drbd/by-res/r0" shared=true
The SR operation cannot be performed because a device underlying the SR is in use by the host.

When I use
xe sr-create host-uuid=20792514-77c7-4611-8586-fbd10f2f46f4 type="lvm" name-label="DRBD-SR" device-config:device="/dev/drbd1" It's ok
but it creates drbd on one host not shared
I previously have lvm partition to full disk then i resize it with parted. After that i create new sda7 disk. and create there resource drbd by this config
resource r0 {
device /dev/drbd1;
disk /dev/sda7;
meta-disk internal;
on xcp-ng-master {
address 10.1.1.31:7789;
}
on xcp-ng-slave {
address 10.1.1.32:7789;
}
}
after that i resize volumes vgresize and pvresize
But i have same error