Find the answer to your Linux question:
Results 1 to 2 of 2
I have 2 optical drives but these auto mount under /media/**Name of the DVD disc ** and my real difficulty is many of the dvd disc I have were made ...
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    1

    how to mdefine where an optical mounts

    I have 2 optical drives
    but these auto mount under /media/**Name of the DVD disc **

    and my real difficulty is many of the dvd disc I have were made with a dvd appliance so they ALL have the same name DVD Video Recording

    this results in : if i put in 1 , a second will not mount.. because ( i figure ) they both ahve the same name

    My Goal is to do something with ...fstab??
    that will ensure that optical 1
    always mounts as something like

    optical 1 : sr0 always mounts as
    /media/01/**Name of disc volume**

    optical 2 : sr1 always mounts as
    /media/02/**Name of disc volume**

    regarding the **Name of disc volume**
    this means a dvd disc named dog placed in the second dvd drive mounts as
    /media/02/dog

    This way i will always know the path to the vobs
    as in /media/02/dog/VIDEO_TS/VTS*.VOB


    dev ls shows

    lrwxrwxrwx 1 root root 3 Jul 22 11:07 cdrom -> sr1
    lrwxrwxrwx 1 root root 3 Jul 22 11:07 dvd -> sr1
    lrwxrwxrwx 1 root root 3 Jul 22 11:07 scd1 -> sr1
    brw-rw----+ 1 root cdrom 11, 1 Jul 22 11:07 sr1
    drwxrwxrwt 2 root root 180 Jul 22 11:05 shm
    lrwxrwxrwx 1 root root 3 Jul 22 10:55 cdrom1 -> sr0
    lrwxrwxrwx 1 root root 3 Jul 22 10:55 cdrw1 -> sr0
    lrwxrwxrwx 1 root root 3 Jul 22 10:55 dvd1 -> sr0
    lrwxrwxrwx 1 root root 3 Jul 22 10:55 dvdrw1 -> sr0
    lrwxrwxrwx 1 root root 3 Jul 22 10:55 scd0 -> sr0
    brw-rw----+ 1 root cdrom 11, 0 Jul 22 10:55 sr0


    ----
    so I was thinking that i would do a
    mkdir /media/01
    mkdir /media/02

    chmod both those to 777

    MY Question is HOW to I make it such that
    dvd drive 1 sr0 mounts under /media/01/
    as /media/01/**Name of the dvd volume**
    &
    dvd drive 2 sr1 mounts under /media/02/
    as /media/02/**Name of the dvd volume**

    this last sticking point is all i have to solve


    so can i put something in the fstab -- and what would that be
    or can i do an explicit mount ( run a script )

    and i am thinking id a given dvd still auto mounts
    under /media/**Name of the dvd volume**

    then that is no harm
    my system OpenSuse 11.4 32bit 2 optical drives

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,845
    Does your system use hal/udev? Mine (Fedora) does, and I use custom udev rules to do this sort of thing. It requires no entries in /etc/fstab. The udev daemon listens for things to happen and when something does (usb device inserted, cd inserted, etc.) then it looks at its rules, and executes them, and if anything in any rule matches the device (which is totally customizable by you), that is done, instead of the default system action.

    I used this website to help me write rules.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...