1

As I command multipath -ll, the output show like this.

ocr3 (149455400000000000000000001000000ca0200000d000000) dm-9 IET,VIRTUAL-DISK
[size=980M][features=0][hwhandler=0]
\_ round-robin 0 [prio=0][active]
 \_ 1:0:0:11 sdo 8:224 [active][ready]
\_ round-robin 0 [prio=0][enabled]
 \_ 1:0:0:10 sdn 8:208 [active][ready]

However, I want to modify the dm-9 to dm-1.
Is that possible?

finkfink
  • 21
  • 3

1 Answers1

0

Is the /dev/dm-1 device-mapper device currently in use by some other mapping, or is it free?

Run dmsetup ls -o blkdevname to check.

If dm-1 is currently the first unassigned dm-<n> number, and your /dev/mapper/ocr3 is not currently in use by anything, you could try:

multipath -f ocr3
multipath -v2

to free and then re-scan the ocr3 multipath map, in the hope that it will snatch the free dm-1 device for itself. But this is uncertain and will not persist over a reboot.

In general, you should not assume that the dm-<n> names will stay the same from one boot to the next. They are assigned in order to any disk mappings that are achieved using the device-mapper subsystem:

  • LVM logical volumes
  • dm-multipath devices
  • encrypted devices (cryptsetup)
  • some software RAID configurations (dmraid)

The dm-<n> names are for the device-mapper tools themselves to use: you, as the system administrator, should not use them directly. They are the machine-friendly names; you should use the corresponding human-friendly names instead, like /dev/mapper/ocr3 in this case.

telcoM
  • 4,153
  • 12
  • 23