Bug #5101
Error symlinking to a block device using /dev/disk/by-path/
Status: | Pending | Start date: | 04/08/2017 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | Pull request: | |||
Affected Versions: | OpenNebula 5.2 |
Description
Hi,
I have defined a BLOCK datastore:
<DATASTORE> <ID>104</ID> <UID>0</UID> <GID>0</GID> <UNAME>oneadmin</UNAME> <GNAME>oneadmin</GNAME> <NAME>Equallogic - DAS</NAME> <PERMISSIONS> <OWNER_U>1</OWNER_U> <OWNER_M>1</OWNER_M> <OWNER_A>0</OWNER_A> <GROUP_U>1</GROUP_U> <GROUP_M>0</GROUP_M> <GROUP_A>0</GROUP_A> <OTHER_U>0</OTHER_U> <OTHER_M>0</OTHER_M> <OTHER_A>0</OTHER_A> </PERMISSIONS> <DS_MAD><![CDATA[dev]]></DS_MAD> <TM_MAD><![CDATA[dev]]></TM_MAD> <BASE_PATH><![CDATA[/var/lib/one//datastores/104]]></BASE_PATH> <TYPE>0</TYPE> <DISK_TYPE>2</DISK_TYPE> <STATE>0</STATE> <CLUSTERS> <ID>0</ID> </CLUSTERS> <TOTAL_MB>1</TOTAL_MB> <FREE_MB>1</FREE_MB> <USED_MB>0</USED_MB> <IMAGES> <ID>11</ID> <ID>13</ID> <ID>14</ID> </IMAGES> <TEMPLATE> <CLONE_TARGET><![CDATA[NONE]]></CLONE_TARGET> <DISK_TYPE><![CDATA[BLOCK]]></DISK_TYPE> <DS_MAD><![CDATA[dev]]></DS_MAD> <LN_TARGET><![CDATA[NONE]]></LN_TARGET> <RESTRICTED_DIRS><![CDATA[/]]></RESTRICTED_DIRS> <SAFE_DIRS><![CDATA[/var/tmp]]></SAFE_DIRS> <TM_MAD><![CDATA[dev]]></TM_MAD> <TYPE><![CDATA[IMAGE_DS]]></TYPE> </TEMPLATE> </DATASTORE>
Then I have defined an image
<IMAGE> <ID>11</ID> <NAME>b2-mgmt-backup-cb-sftp-data</NAME> <TYPE>2</TYPE> <DISK_TYPE>2</DISK_TYPE> <PERSISTENT>1</PERSISTENT> <REGTIME>1491689852</REGTIME> <SOURCE><![CDATA[/dev/disk/by-path/pci-0000:01:00.2-ip-172.16.2.150:3260-iscsi-iqn.2001-05.com.equallogic:0-1cb196-aa15f4557-17d0059e1bf58e8b-b2-mgmt-backup-cb-sftp-data-lun-0]]></SOURCE> <PATH><![CDATA[/dev/disk/by-path/pci-0000:01:00.2-ip-172.16.2.150:3260-iscsi-iqn.2001-05.com.equallogic:0-1cb196-aa15f4557-17d0059e1bf58e8b-b2-mgmt-backup-cb-sftp-data-lun-0]]></PATH> <FSTYPE><![CDATA[raw]]></FSTYPE> <DATASTORE_ID>104</DATASTORE_ID> <DATASTORE>Equallogic - DAS</DATASTORE> <VMS> <ID>17</ID> </VMS> <CLONES/> <APP_CLONES/> <TEMPLATE> <DEV_PREFIX><![CDATA[vd]]></DEV_PREFIX> <DRIVER><![CDATA[raw]]></DRIVER> </TEMPLATE> <SNAPSHOTS/> </IMAGE>
On instantiate, the link is not correct:
datastores/100/17/disk.2 -> 01:00.2-ip-172.16.2.150:3260-iscsi-iqn.2001-05.com.equallogic:0-1cb196-aa15f4557-17d0059e1bf58e8b-b2-mgmt-backup-cb-sftp-data-lun-0
"/dev/disk/by-path/pci-0000:" is missing.
I have not found why yet ...
Regards,
Nicolas.
History
#1 Updated by Anton Todorov about 4 years ago
In `.../remotes/tm/dev/ln` the first argument is the SRC disk. The script expect argument with format 'host:path' but in your case it looks like the 'host:' part is missing and the script strips to first colon the argument...