Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ For example, add the following to your udev rules:

.. code-block::

KERNEL=="sd*", PROGRAM="/usr/bin/sas_sd_snic_alias %k", SYMLINK+="%c"
ENV{DEVTYPE}=="disk", KERNEL=="sd*", PROGRAM="/usr/bin/sas_sd_snic_alias %k", SYMLINK+="%c"
ENV{DEVTYPE}=="partition", KERNEL=="sd*", PROGRAM="/usr/bin/sas_sd_snic_alias %k", SYMLINK+="%cp%n"


This should generate udev aliases made of the device subenclosure nickname followed by the bay identifier. In the following case, *io1-jbod1-0* is the subenclosure nickname (here SIM 0 of JBOD #1).

Expand Down
2 changes: 1 addition & 1 deletion sasutils/cli/sas_sd_snic_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def sas_sd_snic_alias(blkdev):

# Instantiate SASBlockDevice object from block device sysfs node
# eg. /sys/block/sdx/device
blkdev = SASBlockDevice(sysfs.node('block').node(blkdev).node('device'))
blkdev = SASBlockDevice(sysfs.node('block').node(blkdev.rstrip('0123456789')).node('device'))
sasdev = blkdev.end_device.sas_device

if blkdev.array_device:
Expand Down