Skip to content

Commit d1e7a7c

Browse files
author
sara hartse
committed
DLPX-67251 Device removal fails due to inconsistent device names
1 parent 26281af commit d1e7a7c

File tree

1 file changed

+25
-0
lines changed
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

1 file changed

+25
-0
lines changed

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,31 @@
439439
regexp: '(.*)\|xvd\*(.*)'
440440
line: '\1\2'
441441

442+
#
443+
# The default udev rules create two different by-id links for each storage
444+
# device on ESX, based the same serial number but with different prefixes.
445+
# The first is based on the bus type (scsi) and the second is a catch-all
446+
# "World Wide Name" (wwn). After migration, we import domain0 with the
447+
# "/dev/disk/by-id" path, but since udev runs asynchronously, we may end up
448+
# with a mix of wwn and scsi aliases. This causes problems when the DE tries to
449+
# match devices on the system to those in the pool, i.e. for removal.
450+
#
451+
# This moves the wwn links to the /dev/disk/by-id/wwn sub-directory, keeping it
452+
# available as a backup but limiting the /dev/disk/by-id namespace to one type
453+
# of id. We override the original rules in /lib/ with our new version in /etc/.
454+
#
455+
- copy:
456+
remote_src: yes
457+
src: /lib/udev/rules.d/60-persistent-storage.rules
458+
dest: /etc/udev/rules.d/60-persistent-storage.rules
459+
owner: root
460+
group: root
461+
mode: 0644
462+
- replace:
463+
path: /etc/udev/rules.d/60-persistent-storage.rules
464+
regexp: 'disk\/by-id\/wwn-'
465+
replace: 'disk/by-id/wwn/'
466+
442467
#
443468
# Enable CRA for external variants
444469
#

0 commit comments

Comments
 (0)