Why do I encounter an Incorrect Rotational Flag for Azure SSD in Ceph OSD?
Issue Description
An Azure known issue incorrectly shows the rotational flag enabled for the Azure SSD disk. As a result, the Azure disk is not marked as SSD, and the following error occurs when trying to configure the Objectstore disk:
[ERROR][2022-08-18T05:26:35+0000]: Rotational device: '/dev/sdf' is not recommended for ceph OSD
Root Cause
Azure SSD disks are sometimes incorrectly labelled as rotational. This prevents Ceph from recognizing them as SSDs, impacting performance and functionality. Additionally, if an incorrect device is marked (e.g., sdf instead of sdd), the issue may persist despite configuration changes.
Resolution
To fix this issue and mark the Azure SSD disk as non-rotational, follow these steps:
- Run the Following Commands to Update the Rotational Flag
echo "0" > "/sys/block/{raw_device_name}/queue/rotational"echo "KERNEL=="${raw_device_name}", ATTR{queue/rotational}="0"" >> "/etc/udev/rules.d/99-ceph-raw-osd-mark-ssd.rules"
udevadm control --reload
udevadm trigger
Example:
echo "0" > "/sys/block/sdf/queue/rotational"echo "KERNEL=="sdf", ATTR{queue/rotational}="0"" >> "/etc/udev/rules.d/99-ceph-raw-osd-mark-ssd.rules"
udevadm control --reload
udevadm trigger
- Verify the Disk Mapping
Run the following commands to check which devices are mapped:
ls -l /dev/uipath/ceph/
lsblk -o NAME,KNAME,TYPE,MOUNTPOINT,LABEL
Now, for example, If /dev/uipath/ceph/sdf is incorrectly pointing to sdf instead of sdd(assuming sdd was rotational flag enabled for the Azure SSD disk and accidentally, sdf was marked which causes issues during installation/prereq check), continue to the next step.
- Correct the Symlink If Necessary
If the output confirms an incorrect symlink, remove and recreate it:
rm -f /dev/uipath/ceph/sdf
ln -s /dev/sdd /dev/UiPath/ceph/sdd
Verify the changes:
ls -l /dev/uipath/ceph/
- Reload Udev Rules and Apply Changes
Since the file /etc/udev/rules.d/99-ceph-raw-osd-mark-ssd.rules was updated, reload and apply udev rules:
udevadm control --reload-rules
udevadm trigger
Confirm the changes:
cat /sys/block/sdf/queue/rotational
cat /sys/block/sdd/queue/rotational
Expected results:
-
sdf should show 1 (indicating an HDD)
-
sdd should show 0 (indicating an SSD)
If sdf still shows 0, reset it manually:
echo "1" > /sys/block/sdf/queue/rotational
- Reboot the System If Necessary
If changes do not reflect properly, reboot the machine:
sudo reboot
Following these steps will ensure that the correct disk is identified as an SSD and Ceph OSD can be configured without errors.