我正在嘗試新增的 SATA 磁碟機 (SSD) 作為本機 SR。 XenServer 以前可能見過該驅動器,但我不記得每次都用它做任何事情。我正在嘗試運行這個命令:
xe sr-create content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_OCZ-VERTEX2_3.5OCZ-9G0363DTJ6JSCBJ1 name-label="Local Storage SSD 1" type=ext
XenCenter 中瞬間出現一個新的 SR(我沒有時間閱讀它的內容),然後收到錯誤:
The SR operation cannot be performed because a device underlying the SR is in use by the host.
這是來自 的日誌/var/log/SMlog
,減去時間戳記:
lock: creating lock file /var/lock/sm/20d58608-bebb-64a8-0cae-d3d36b3f2d7d/sr
lock: acquired /var/lock/sm/20d58608-bebb-64a8-0cae-d3d36b3f2d7d/sr
sr_create {'sr_uuid': '20d58608-bebb-64a8-0cae-d3d36b3f2d7d', 'subtask_of': 'DummyRef:|7f60f5ae-9a40-6550-f587-c28cbe4c4926|SR.create', 'args': ['0'], 'host_ref': 'OpaqueRef:3d304cee-dac2-2eb3-80d9-6e8a166c1135', 'session_ref': 'OpaqueRef:c5a8fc26-cec6-eeb9-09ed-f36604bdfc77', 'device_config': {'device': '/dev/disk/by-id/scsi-SATA_OCZ-VERTEX2_3.5OCZ-9G0363DTJ6JSCBJ1', 'SRmaster': 'true'}, 'command': 'sr_create', 'sr_ref': 'OpaqueRef:7dd401ca-b41d-b606-6612-3dd3919b0773', 'local_cache_sr': '16cbaddd-05db-11b9-d5f9-5933d3192243'}
['sginfo', '-s', '/dev/sdb']
pread SUCCESS
['scsi_id', '-g', '-s', '/block/sdb']
pread SUCCESS
['/usr/sbin/vgs', 'XSLocalEXT-20d58608-bebb-64a8-0cae-d3d36b3f2d7d']
FAILED in util.pread: (rc 5) stdout: '', stderr: ' Volume group "XSLocalEXT-20d58608-bebb-64a8-0cae-d3d36b3f2d7d" not found
'
Raising exception [16, The SR device is currently in use [opterr=Device /dev/disk/by-id/scsi-SATA_OCZ-VERTEX2_3.5OCZ-9G0363DTJ6JSCBJ1 in use, please check your existing SRs for an instance of this device]]
lock: released /var/lock/sm/20d58608-bebb-64a8-0cae-d3d36b3f2d7d/sr
***** generic exception: sr_create: EXCEPTION SR.SROSError, The SR device is currently in use [opterr=Device /dev/disk/by-id/scsi-SATA_OCZ-VERTEX2_3.5OCZ-9G0363DTJ6JSCBJ1 in use, please check your existing SRs for an instance of this device]
File "/opt/xensource/sm/SRCommand.py", line 106, in run
return self._run_locked(sr)
File "/opt/xensource/sm/SRCommand.py", line 153, in _run_locked
return self._run(sr, target)
File "/opt/xensource/sm/SRCommand.py", line 278, in _run
return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))
File "/opt/xensource/sm/EXTSR", line 188, in create
lvutil.createVG(self.root, self.vgname)
File "/opt/xensource/sm/lvutil.py", line 302, in createVG
opterr=('Device %s in use, please check your existing ' \
File "/opt/xensource/sm/xs_errors.py", line 49, in __init__
raise SR.SROSError(errorcode, errormessage)
lock: closed /var/lock/sm/20d58608-bebb-64a8-0cae-d3d36b3f2d7d/sr
更新
我全新安裝了最新的 XenServer 版本 (6.2.0)。安裝過程中該磁碟不在伺服器中。使用精簡配置 (ext3)。
安裝完成後,我立即新增磁碟並重新啟動伺服器。然後我運行了以下命令:
xe sr-create name-label='Local SSD 1' device-config:device=/dev/disk/by-id/scsi-SATA_OCZ-VERTEX2_3.5OCZ-9G0363DTJ6JSCBJ1 type=ext
這導致了同樣的錯誤。
答案1
您是否嘗試過從 mpathutil 中刪除 SCSI id?看http://support.citrix.com/article/CTX122233有關如何執行此任務的說明。
答案2
至此,我只想宣布SSD已死。它不適用於全新安裝。我知道它以前可以工作,所以這可能不是驅動程式問題。是時候去買 SSD 了。如果您遇到類似問題,請在另一台電腦上測試您的磁碟機。
更新(4年後):是的,SSD已經死了。在得到這個答案後不久,幾乎所有我插入的東西甚至都不會承認有一個設備存在。我應該注意到,該錯誤訊息似乎非常通用,因此,如果您是透過搜尋引擎來到這裡的,那麼最好不要假設您處於與我相同的情況。