1

I don't understand the inclination towards using udev rules for raw devices. Example for Oracle ASM devices, it recommends using udev rules for naming raw devices, as the device order can be inconsistent, but nowhere it is said that /dev/disk/by-uuid/ can also be used.

Can I use /dev/disk/by-uuid in /etc/fstab or in other places?

And also why the user, owner and permissions are set for raw device in udev rules, instead of for the filesystem?

  • It would probably be best to post the second question (permissions) separately. – TooTea Apr 5 at 8:56
1

No idea if there are any special considerations for Oracle ASM, but in general, you can use /dev/disk/by-*/* anywhere in place of the real device. The only place where this breaks is with badly written scripts that don't handle symlinks well, but those are hopefully pretty rare.

But that still means using udev rules. The symlinks in /dev/disk/by-*/* are created by udev according to /usr/lib/udev/rules.d/60-persistent-storage.rules (and a few others). It's just that someone already wrote the rules for you.

0

Certainly one answer would be that you have a dependency on legacy software, mtx in our case. mtx requires a tape changing robot device to be accessible via /dev/changer, but no such device exists unless you create a udev rule creating a symlink from the appropriate scsi device to /dev/changer.

0

UUIDs are provided by the content of the disk. Eg: UUIDs are provided by GPT partition tables. But I don't believe MBR tables have them, so partitions might not have a UUID. They would still have a "PARTUUID" assuming the file system on the partition provides a UUID. It's also possible to have disks with duplicate UUIDs. This will happen if you dd one disk to another.

There needs to be at least one way to uniquely identify a disk irrespective of content... Thus udev rules are still useful.

Using UUIDs in fstab is encouraged as it produces stable results assuming no duplicates. In /etc/fstab you would usually specify UUID=... instead of /dev/disk/by-uuid/...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.