rename a block device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

the udev rules prohibit renaming anything other than a network device : what is (would be) the way to really rename a block device (not just to create a symbolic link) ?

the objective behind this question is (would be) to give access to the block device through an associated read-only loop device (eg. as a logical forensic write-blocker).

here is the idea very roughly :
SUBSYSTEM=="block", NAME=".%k", RUN="/usr/local/bin/fakeblkdev %k" # this doesn't work :-(
and taking for example /dev/sda and /dev/loop0 :
instead of being called /dev/sda, the device would be called /dev/.sda (would be slightly "hidden"), it would be accessible through /dev/loop0 with losetup -r /dev/loop0 /dev/.sda and would finally be made "normal" with ln -s /dev/loop0 /dev/sda.
the script /usr/local/bin/fakeblkdev called by udev would do most of the association work between block device and loop device.

regards, lacsaP.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux