Is it possible to change the file name in /sys filesystem?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 5
  • Red Hat Enterprise Linux (RHEL) 6
  • udev

Issue

  • In /sys filesystem, why the names are still unchanged?
  • I have created following udev rule, but i can see that in /sys file system, the names are still unchanged.
# cat /etc/udev/rules.d/10-local.rules ACTION=="add",KERNEL=="st[0-9]*",SUBSYSTEM=="scsi_tape",IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode",NAME="st-$env{ID_SCSI_SERIAL}" ACTION=="add",KERNEL=="nst[0-9]*",SUBSYSTEM=="scsi_tape",IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode",NAME="nst-$env{ID_SCSI_SERIAL}" ACTION=="add",SUBSYSTEM=="scsi_generic",ATTRS{type}=="8",IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode",NAME="sg-$env{ID_SCSI_SERIAL}"

Root Cause

  • /sys is temporary and an internal virtual file system. So rename can not reflect on the /sys file system.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.