2

We have a Dell PowerEdge R740 server running CentOS7 with raid disks configured via PERC H730P Mini controller. On each reboot the device names (sda, sdb ...) for the vdisks are assigned out of the order the vdisks were created (see below) and each time differently. This is kind of expected as the naming order depends on the readiness of the devices during the boot, which may vary. But anyway is there a way to make the order, in which the vdisk devices appear in the system, consistent e.g. via some controller option? (Provided the physical devices are not changed)

# omreport storage vdisk controller=0  -fmt ssv | awk -F';' '{print $1, $3, $11}'
List of Virtual Disks on Controller PERC H730P Mini (Embedded)  
  
Controller PERC H730P Mini (Embedded)  
  
ID Name Device Name
0 OS_DISK /dev/sda
1 Virtual Disk1 /dev/sdc
2 Virtual Disk2 /dev/sdb
3 Virtual Disk3 /dev/sdg
4 Virtual Disk4 /dev/sde
5 Virtual Disk5 /dev/sdd
6 Virtual Disk6 /dev/sdh
7 Virtual Disk7 /dev/sdf
8 Virtual Disk8 /dev/sdi
9 Virtual Disk9 /dev/sdj
10 Virtual Disk10 /dev/sdk
11 Virtual Disk11 /dev/sdl
12 Virtual Disk12 /dev/sdm
13 Virtual Disk13 /dev/sdn
14 Virtual Disk14 /dev/sdp
15 Virtual Disk15 /dev/sdo
16 Virtual Disk16 /dev/sdq
17 Virtual Disk17 /dev/sdr
18 Virtual Disk18 /dev/sds
19 Virtual Disk19 /dev/sdt
20 Virtual Disk20 /dev/sdu
21 Virtual Disk21 /dev/sdy
22 Virtual Disk22 /dev/sdv
23 Virtual Disk23 /dev/sdw
24 Virtual Disk24 /dev/sdx

1 Answer 1

2

Consistency of /dev/sd* device names can not be guaranteed. Full stop.

If you have an application which requires a consistent name, such as actually mounting a filesystem, use its ID or WWN instead. You can find symlinks with consistent names in the /dev/disk/by-id directory which you can use instead of /dev/sd*. (And note that WWNs of a RAID array are virtual and can only be guaranteed unique on the controller to which they're attached.) And the virtual disk UUID can be used in /etc/fstab instead of the device path.

1
  • No, the app doesn't require consistent naming. But it's good to have it. E.g. for analyzing HW issues it would be nice if the same disk had the same dev name in the logs for a given period even across reboots. And yes, I understand that the order is not guaranteed by linux. But maybe there's an option to make this particular raid controller introduce devices in a consistent order, which by itself would make the naming consistent? That's what I was asking for.
    – amosk
    Jan 10, 2021 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .