1

I have a test server running XenServer 6.5, which precisily is the version 6.5.0-90233c. By now I have two linux (Debian and Ubuntu) VMs smoothly running. I have attached a 1TB USB drive in which I successfuly set the whole disk as a storage repository (SR).
What I want is to create virtual disk images to be attached to the VMs. My problem begun when I tried to create a virtual disk image (VDI). It doesn't matter the size of the VDI I try to create, it just fails.

(Command issued in order to create the VDI): xe vdi-create sr-uuid=[my SR's UUID] name-label="Virtual Disk 01 USB SR" type=user virtual-size=15GiB

Error message returned: Error code: SR_BACKEND_FAILURE_78 Error parameters: VDI Creation failed [opt=error 22]

I've tried to recreate the Storage Repository with its type set to EXT3, which by default was LVM, but it doesn't matter, it fails either way.

Looking further into /var/log/SMlog, when it fails, it produces the following: xensvr0 SM: [24602] ['uuidgen', '-r'] xensvr0 SM: [24602] pread SUCCESS xensvr0 SM: [24602] lock: opening lock file /var/lock/sm/[my SR-uuid's value]/sr xensvr0 SM: [24602] lock: acquired /var/lock/sm/[my SR-uuid's value]/sr xensvr0 SM: [24602] vdi_create {'sr_uuid': '[my SR-uuid's value]', 'subtask_of': 'DummyRef:|dad93ce4-adf8-b4de-9df5-1b3a912bb9d3|VDI.create', 'vdi_type': 'user', 'args': ['5368709120', 'Virtual Disk 01 USB SR', '', '', 'false', '19700101T00:00:00Z', '', 'false'], 'o_direct': False, 'host_ref': 'OpaqueRef:cf883175-4885-7efc-a35c-3a8967bc447b', 'session_ref': 'OpaqueRef:d379b1bf-8d01-6143-053c-2312312b4988', 'device_config': {'device': '/dev/disk/by-id/usb-OEM_Ext_Hard_Disk_00000000D2066881-part1', 'SRmaster': 'true'}, 'command': 'vdi_create', 'sr_ref': 'OpaqueRef:54604806-2115-d3eb-55ca-43ffd2a15687', 'local_cache_sr': '28117830-ec01-f5cf-f8be-5b3c31eb7507', 'vdi_sm_config': {}} xensvr0 SM: [24602] ['/usr/sbin/td-util', 'create', 'vhd', '5120', '/var/run/sr-mount/[my SR-uuid's value]/2598c91f-fdca-40a0-a900-92a28adc6743.vhd'] xensvr0 SM: [24602] FAILED in util.pread: (rc 22) stdout: '', stderr: '' xensvr0 SM: [24602] Raising exception [78, VDI Creation failed [opterr=error 22]] xensvr0 SM: [24602] lock: released /var/lock/sm/[my SR-uuid's value]/sr xensvr0 SM: [24602] ***** generic exception: vdi_create: EXCEPTION SR.SROSError, VDI Creation failed [opterr=error 22] xensvr0 SM: [24602] File "/opt/xensource/sm/SRCommand.py", line 110, in run xensvr0 SM: [24602] return self._run_locked(sr) xensvr0 SM: [24602] File "/opt/xensource/sm/SRCommand.py", line 159, in _run_locked xensvr0 SM: [24602] rv = self._run(sr, target) xensvr0 SM: [24602] File "/opt/xensource/sm/SRCommand.py", line 215, in _run xensvr0 SM: [24602] return target.create(self.params['sr_uuid'], self.vdi_uuid, long(self.params['args'][0])) xensvr0 SM: [24602] File "/opt/xensource/sm/FileSR.py", line 521, in create xensvr0 SM: [24602] opterr='error %d' % inst.code) xensvr0 SM: [24602] File "/opt/xensource/sm/xs_errors.py", line 52, in init xensvr0 SM: [24602] raise SR.SROSError(errorcode, errormessage) xensvr0 SM: [24602] xensvr0 SM: [24602] lock: closed /var/lock/sm/[my SR-uuid's value]/sr

Any ideas about what I could possibly be missing?

1 Answers1

0

I think you tried to create your file on a system that doesn't support o_direct. Are you using ZFS? You have the 'o_direct' parameter set to false in the log, but actually td-util does not open the file without passing O_DIRECT, its source code doesn't allow to pass an argument to avoid O_DIRECT.

nraynaud
  • 101
  • 2