-   Linux - General (
-   -   assigning multiple device aliases to single drive (

cerealdaemon 07-24-2005 02:34 PM

assigning multiple device aliases to single drive
I've got two different cd drives, one is a regular cdrw, the other is a dvd/cdrw. I'm curious if in the rc.local file, if I add

ln -s hdc /dev/cdrom
ln -s hdc /dev/cdrw

if the multiple aliases for the same device will disrupt and functioning?

I'd be doing the same to the dvd/cdrw if it were ok to do.

ln -s hdd /dev/cdrw2
ln -s hdd /dev/dvd
ln -s hdd /dev/cdrom2

Any thoughts?

kencaz 07-24-2005 02:39 PM

Don't know if that would work but seems like your asking for trouble... Why not just re-mount the drives /hdc /hdd to different mount points depending on what's in the dirve at the time...


cerealdaemon 07-24-2005 03:09 PM

thats what I usually do, but its kinda a pain in the butt to have to do that all the time when I put a new media in

There has to be an automatic way to do it

jimdaworm 07-24-2005 03:15 PM

I donīt understand how it would cause problems linking the same device like that. The only thing is it might confuse you!:D I must admit I donīt quite understand what your trying to acomplish:confused:

cerealdaemon 07-24-2005 04:43 PM

I'm just wondering if I can get a single physical device be seen as multiple devices by the operating system

tylerl 07-25-2005 11:55 PM

Works just fine. Despite what others may tell you, it's actually fairly common practice. If you don't believe me, run "find /dev -type l" to see all the symbolic links in you /dev directory. If you're running a mainstream distro, you'll probably see a few.

If you wanted to, you could also copy /dev/hdd to /dev/cdrom with the same effect, but it could get confusing that way. Symlinks are the preferred method of aliasing devices.

Note that you don't have to alias the device *every time you boot* unless your /dev directory is stored on a ramdisk (like udev). Linking it once will do.

All times are GMT -5. The time now is 08:44 PM.