Jump to content
  • 0

XenServer: "The SR operation cannot be performed because a device underlying the SR is in use by the host" when adding USB disk to pool slave


Roberto Suárez

Question

Posted

Hi,

 

we're trying to configure a USB disk as storage repository in a pool slave, and the command that worked in the pool master brings up the error shown in the title: "The SR operation cannot be performed because a device underlying the SR is in use by the host". We're running XenServer 6.5.0-90233c (according to /etc/redhat-release).

 

The command we used was this:

 

Quote

 

xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/usb-ASMT_2115_00000000000000000000 name-label="USB Disk" host-uuid=73966ecc-74b6-4600-b542-0739c2be0599


 

 

There are errors in /var/log/SMlog when doing this:

 

Quote

Apr  4 17:19:49 xen02 SM: [16196] ['sginfo', '-s', '/dev/sdf']
Apr  4 17:19:49 xen02 SM: [16196]   pread SUCCESS
Apr  4 17:19:49 xen02 SM: [16196] ['scsi_id', '-g', '--device', '/dev/sdf']
Apr  4 17:19:49 xen02 SM: [16196] FAILED in util.pread: (rc 1) stdout: '', stderr: 'scsi_id: invalid option -- -
Apr  4 17:19:49 xen02 SM: [16196] '
Apr  4 17:19:49 xen02 SM: [16196] ['scsi_id', '-g', '--device', '/dev/sdf'] failed with ('Operation not permitted',)
Apr  4 17:19:49 xen02 SM: [16196] ['scsi_id', '-g', '-s', '/block/sdf']
Apr  4 17:19:49 xen02 SM: [16196]   pread SUCCESS
Apr  4 17:19:49 xen02 SM: [16196] Raising exception [16, The SR device is currently in use]
Apr  4 17:19:49 xen02 SM: [16196] lock: released /var/lock/sm/7ea52a51-fa52-e127-8a02-c3ec402c3ece/sr
Apr  4 17:19:49 xen02 SM: [16196] ***** generic exception: sr_create: EXCEPTION SR.SROSError, The SR device is current
ly in use
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 110, in run
Apr  4 17:19:49 xen02 SM: [16196]     return self._run_locked(sr)
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 159, in _run_locked
Apr  4 17:19:49 xen02 SM: [16196]     rv = self._run(sr, target)
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 296, in _run
Apr  4 17:19:49 xen02 SM: [16196]     return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/LVMSR", line 527, in create
Apr  4 17:19:49 xen02 SM: [16196]     raise xs_errors.XenError('SRInUse') 
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/xs_errors.py", line 52, in __init__
Apr  4 17:19:49 xen02 SM: [16196]     raise SR.SROSError(errorcode, errormessage)
Apr  4 17:19:49 xen02 SM: [16196] 
Apr  4 17:19:49 xen02 SM: [16196] ***** Local VHD on LVM: EXCEPTION SR.SROSError, The SR device is currently in use
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 345, in run
Apr  4 17:19:49 xen02 SM: [16196]     ret = cmd.run(sr)
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 110, in run
Apr  4 17:19:49 xen02 SM: [16196]     return self._run_locked(sr)
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 159, in _run_locked
Apr  4 17:19:49 xen02 SM: [16196]     rv = self._run(sr, target)
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/SRCommand.py", line 296, in _run
Apr  4 17:19:49 xen02 SM: [16196]     return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/LVMSR", line 527, in create
Apr  4 17:19:49 xen02 SM: [16196]     raise xs_errors.XenError('SRInUse') 
Apr  4 17:19:49 xen02 SM: [16196]   File "/opt/xensource/sm/xs_errors.py", line 52, in __init__
Apr  4 17:19:49 xen02 SM: [16196]     raise SR.SROSError(errorcode, errormessage)
Apr  4 17:19:49 xen02 SM: [16196] 
Apr  4 17:19:49 xen02 SM: [16196] lock: closed /var/lock/sm/7ea52a51-fa52-e127-8a02-c3ec402c3ece/sr


 

We've made sure that the disk is not being used by any VM in that host. Any hint about what could be happening, or any tip in helping to debug this problem?

 

Thanks in advance.

 

1 answer to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...