[ubuntu@o78sv2 ~]$ sudo fdisk -l /dev/lxc_luns/asm_data_201_00
Disk /dev/lxc_luns/asm_data_201_00: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 524288 bytes[ubuntu@o78sv2 ~]$ ls -lh /dev/lxc_luns/
total 0
brw-rw----. 1 grid asmadmin 252, 9 Aug 1 17:36 asm_data_201_00
brw-rw----. 1 grid asmadmin 252, 10 Aug 1 17:36 asm_mgmt_201_00
brw-rw----. 1 grid asmadmin 252, 11 Aug 1 17:36 asm_sysd_201_00
And then here is the UDEV rule that creates these devices. This UDEV rule was created so that these devices could be introduced into LXC containers without having to deal with the default soft link system that is now the default standard. This naming has worked perfectly with LXC containers, but now trying to get them to work with LXD.
Container-Friendly Multipath Naming (from the /etc/udev/rules.d/99-grid.rules file):
KERNEL==“dm-*”, SUBSYSTEM==“block”, PROGRAM==“/lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/%k”, RESULT==“2353163346332372d”, RUN+="/bin/sh -c '/bin/mkdir -p /dev/lxc_luns; /bin/mknod /dev/lxc_luns/asm_data_201_00 b $major $minor; chown grid:asmadmin /dev/lxc_luns/asm_data_201_00; chmod 0660 /dev/lxc_luns/asm_data_201_00
So we actually offer three different device naming options on the LXC/D hosts:
“Default”:
[root@o78sv2 rules.d]# ls -lh /dev/mapper/asm*
lrwxrwxrwx. 1 root root 7 Aug 1 17:36 /dev/mapper/asm_data_201_00 → …/dm-9
lrwxrwxrwx. 1 root root 8 Aug 1 17:36 /dev/mapper/asm_mgmt_201_00 → …/dm-10
lrwxrwxrwx. 1 root root 8 Aug 1 17:36 /dev/mapper/asm_sysd_201_00 → …/dm-11
Two “custom” options (custom soft-link, and non-linked devices (“LXC friendly” option)
[root@o78sv2 rules.d]# ls -lh /dev/asm
total 0
lrwxrwxrwx. 1 root root 7 Aug 1 17:36 asm_data_201_00 → …/dm-9
lrwxrwxrwx. 1 root root 8 Aug 1 17:36 asm_mgmt_201_00 → …/dm-10
lrwxrwxrwx. 1 root root 8 Aug 1 17:36 asm_sysd_201_00 → …/dm-11
[root@o78sv2 rules.d]# ls -lh /dev/lxc_luns/
total 0
brw-rw----. 1 grid asmadmin 252, 9 Aug 1 17:36 asm_data_201_00
brw-rw----. 1 grid asmadmin 252, 10 Aug 1 17:36 asm_mgmt_201_00
brw-rw----. 1 grid asmadmin 252, 11 Aug 1 17:36 asm_sysd_201_00