cockpit-ceph-deploy
cockpit-ceph-deploy copied to clipboard
device alias playbook problem
hello, trying to run this on ubuntu20 - third playbook ( device alias )gives an error
TASK [Get drive layout] *************************************************************************************
Monday 15 August 2022 09:18:58 +0000 (0:00:00.088) 0:00:56.839 *********
fatal: [ceph2]: FAILED! => changed=false
cmd:
- /usr/bin/python3
- /opt/45drives/tools/lsdev
- -n
delta: '0:00:00.058856'
end: '2022-08-15 09:18:59.264560'
msg: non-zero return code
rc: 1
start: '2022-08-15 09:18:59.205704'
stderr: ''
stderr_lines: <omitted>
stdout: Error opening /etc/vdev_id.conf. Run `dmap`.
stdout_lines: <omitted>
fatal: [ceph1]: FAILED! => changed=false
cmd:
- /usr/bin/python3
- /opt/45drives/tools/lsdev
- -n
delta: '0:00:00.062314'
end: '2022-08-15 09:18:59.330074'
msg: non-zero return code
rc: 1
start: '2022-08-15 09:18:59.267760'
stderr: ''
stderr_lines: <omitted>
stdout: Error opening /etc/vdev_id.conf. Run `dmap`.
stdout_lines: <omitted>
also on server when I run lsdev - I have this error
root@ceph1:~# lsdev
Error opening /etc/vdev_id.conf. Run dmap
.
after running dmap this is the result
Scan Results:
--------------------------------------------------------------------------------
{
"Motherboard": {
"Manufacturer": "?",
"Product Name": "?",
"Serial Number": "?"
},
"HBA": [],
"Hybrid": false,
"Serial": "?",
"Model": "?",
"Alias Style": "?",
"Chassis Size": "?",
"VM": true,
"Edit Mode": false,
"OS NAME": "Ubuntu",
"OS VERSION_ID": "20.04"
}
/opt/45drives/tools/server_identifier: !! WARNING !!
Unable to determine server model automatically.
Server Info File Path: (/etc/45drives/server_info/server_info.json)
You can edit the server_info file manually and run dmap again if using non-standard hardware.
If using standard 45Drives server hardware. Serialization should be performed before running dmap.
/opt/tools/45drives/dmap: Unable to determine hardware configuration, drive mapping (modifications to /etc/vdev_id.conf) skipped.
/opt/tools/45drives/dmap: Unable to determine hardware configuration, udevadm trigger skipped.
this is the content of the /etc/45drives/server_info/server_info.json file
{
"Motherboard": {
"Manufacturer": "?",
"Product Name": "?",
"Serial Number": "?"
},
"HBA": [],
"Hybrid": false,
"Serial": "?",
"Model": "?",
"Alias Style": "?",
"Chassis Size": "?",
"VM": true,
"Edit Mode": false,
"OS NAME": "Ubuntu",
"OS VERSION_ID": "20.04"
}
I am getting the same too. Is there a workaround?
I am getting the same too. Is there a workaround? @GodAtum360
I think this only works on their servers - if somehow we could know what info is needed, we could maybe provide them with a script
The aim of dmap is to make /etc/vdev_id.conf
This creates the necessary device aliases for each disk to be used for storage on a given server, eash osd to be used in this case.
/etc/vdev_id.conf
is a file that has device aliases. Here is an example vdev_id.conf file from a Storinator-AV15.
# This file was generated using dmap 2.0.4-1 (/opt/45drives/tools/dmap).
alias 1-1 /dev/disk/by-path/pci-0000:17:00.0-sas-phy2-lun-0
alias 1-2 /dev/disk/by-path/pci-0000:17:00.0-sas-phy3-lun-0
alias 1-3 /dev/disk/by-path/pci-0000:17:00.0-sas-phy1-lun-0
alias 1-4 /dev/disk/by-path/pci-0000:17:00.0-sas-phy0-lun-0
alias 1-5 /dev/disk/by-path/pci-0000:17:00.0-sas-phy6-lun-0
alias 1-6 /dev/disk/by-path/pci-0000:17:00.0-sas-phy7-lun-0
alias 1-7 /dev/disk/by-path/pci-0000:17:00.0-sas-phy5-lun-0
alias 1-8 /dev/disk/by-path/pci-0000:17:00.0-sas-phy4-lun-0
alias 1-9 /dev/disk/by-path/pci-0000:17:00.0-sas-phy18-lun-0
alias 1-10 /dev/disk/by-path/pci-0000:17:00.0-sas-phy19-lun-0
alias 1-11 /dev/disk/by-path/pci-0000:17:00.0-sas-phy17-lun-0
alias 1-12 /dev/disk/by-path/pci-0000:17:00.0-sas-phy16-lun-0
alias 1-13 /dev/disk/by-path/pci-0000:17:00.0-sas-phy22-lun-0
alias 1-14 /dev/disk/by-path/pci-0000:17:00.0-sas-phy23-lun-0
alias 1-15 /dev/disk/by-path/pci-0000:17:00.0-sas-phy21-lun-0
These correspond to the named drive slots in an AV15 Storinator. But if you want to make your own vdev_id.conf file on each osd node. Start by running this on all osd nodes first:
echo "# this is a placeholder vdev_id.conf to satisfy device-alias.yml" > /etc/vdev_id.conf
Then if you want to create your own device aliases, add them /etc/vdev_id.conf
in for each osd node in their respective files:
I highly suggest that you use the devices listed in /dev/disk/by-path/
and not /dev/sd?
if you go this route.
the device alias playbook will finish if you have /etc/vdev_id.conf
on each osd and it DOESN'T have 'dmap' in the first line. Otherwise it will run dmap again. If you don't have /etc/vdev_id.conf, it will just run dmap. And since you aren't running it on a 45drives server, it's not going to/designed to work automatically.
We have udev rules, and a script that runs when the rule fires that will reference /etc/vdev_id.conf
to create the required symlinks for each device in /dev/
(eg /dev/1-1
), and /dev/disk/by-vdev/
(eg /dev/disk/by-vdev/1-1
)
dmap, when successful, will also ensure that the required files are present and then run udevadm control --reload-rules
and udevadm trigger
.
Those files are as follows:
/usr/lib/udev/rules.d/68-vdev.rules
68-vdev.rules
/usr/lib/udev/vdev_id_45drives
vdev_id_45drives
So, in summary:
echo "# this is a placeholder vdev_id.conf to satisfy device-alias.yml" > /etc/vdev_id.conf
cd /usr/lib/udev/rules.d
curl -LO https://raw.githubusercontent.com/45Drives/tools/master/src/fakeroot/opt/45drives/tools/68-vdev.rules
cd /usr/lib/udev
curl -LO https://raw.githubusercontent.com/45Drives/tools/master/src/fakeroot/opt/45drives/tools/vdev_id_45drives
chmod +x /usr/lib/udev/vdev_id_45drives
Add any aliases to disks that you want to be used as osds by looking in /dev/disk/by-path/
and adding them to /etc/vdev_id.conf
eg: alias 1-1 /dev/disk/by-path/pci-0000:17:00.0-sas-phy2-lun-0
Then trigger the udev rules:
udevadm control --reload-rules
udevadm trigger
and as a sanity check, see that the devices show up in /dev/
and /dev/disk/by-vdev/
That should let the /opt/45drives/tools/generate-osd-vars.sh
to run as desired in the device-alias.yml playbook work as desired.
Hope that helps, sorry for taking so long to respond.