Man page - rpi-loop-device-namer(8)
Packages contas this manual
apt-get install rpi-loop-utils
Manual
| RPI-LOOP-DEVICE-NAMER(8) | System Manager's Manual | RPI-LOOP-DEVICE-NAMER(8) |
NAME
rpi-loop-device-namer - generate stable names for loop device symlinks
SYNOPSIS
rpi-loop-device-namer MINOR_NUMBER
DESCRIPTION
rpi-loop-device-namer is a utility script that generates stable symbolic link names for loop devices based on their backing files. It is primarily intended to be called by udev rules to create persistent device names.
The script takes a loop device minor number as input and outputs a systemd-escaped path suitable for use in /dev/disk/by-backingfile/ symlinks.
ARGUMENTS
- MINOR_NUMBER
- The minor device number of the loop device (e.g., "0" for /dev/loop0, "1" for /dev/loop1).
OUTPUT
If the specified loop device has an associated backing file, the script outputs:
disk/by-backingfile/ESCAPED_PATH
Where ESCAPED_PATH is the systemd-escaped version of the backing file path.
If the loop device has no backing file, no output is produced.
EXAMPLES
Loop device with backing file /var/swap:
$ rpi-loop-device-namer 0 disk/by-backingfile/var-swap
Loop device with backing file /home/pi/disk.img:
$ rpi-loop-device-namer 1 disk/by-backingfile/home-pi-disk.img
Unbound loop device:
$ rpi-loop-device-namer 2 (no output)
FILES
- /usr/lib/rpi-loop-utils/bin/rpi-loop-device-namer
- The script itself.
- /sys/block/loopN/loop/backing_file
- Kernel sysfs file containing the backing file path for loop device N.
SEE ALSO
70-rpi-symlink-loop-devices.rules(7), rpi-setup-loop@.service(8), losetup(8), systemd-escape(1), udev(7)
NOTES
This utility is typically called automatically by udev rules and is not intended for direct interactive use. The output format is specifically designed for use with udev's SYMLINK+= directive.
| rpi-loop-utils | rpi-loop-utils System Administration |