vdev_id: multi-lun disks & slot num zero pad #16603
Open
+21
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add ability to generate disk names that contain both a slot number and a lun number in order to support multi-actuator SAS hard drives with multiple luns. Also add the ability to zero pad slot numbers to a desired digit length for easier sorting.
Motivation and Context
I manage many servers with ZFS pools comprised of dozens of Seagate Mach.2 dual-actuator SAS hard drives. These drives have two SCSI LUNs per physical drive, one per actuator, each giving access to half the storage capacity of the physical drive. Without these changes I can only configure vdev_id.conf to generate slot number based aliases for the first LUN of each drive, only half the capacity.
Description
This PR only introduces minor changes to the vdev_id script and associated documentation in the vdev_id.conf man page.
The first change is to add the option of generating disk names that include both a slot number and a lun number, this feature in enabled by adding one more value, 'bay_lun' to the list of values accepted by the 'slot' setting for vdev_id.conf.
The second little change is to add the option of requesting that disk names generated pad the slot number component to a specific number of digits using leading zeros. This is activated by a new 'zpad_slot' setting for vdev_id.conf whose value is the desired length, "zpad 3" could generate disk001, disk002, ...etc.
How Has This Been Tested?
I have RHEL 8 and Ubuntu 22.04 servers with dual-actuator SAS disks that have been using these changes for a couple years. I have not tested this for any other use cases but I figured it was time I offered to contribute my changes back to the community in case this enhancement was applicable to others.
Types of changes
Checklist:
Signed-off-by
.