LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting specific hardware devices to specfic mount points (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-specific-hardware-devices-to-specfic-mount-points-120475/)

tallguy999 11-27-2003 11:26 AM

Mounting specific hardware devices to specfic mount points
 
I have 2 internal and 4 external USB ports that I use for various types of external storage (hard drives / USB Flash drives / Camera Compact Flash cards etc).

I understand that the device name these end up with is basically in order of detection, i.e. the first device that gets picked up will be /dev/sda1, the second /dev/sdb1, the third /dev/sdc1 etc.

At the moment I have several directories in my /mnt folder named, usbdrive1, usbdrive2, usbdrive3 etc and relevant entries in my /etc/fstab so that if any of these devices are present at boot, they'll get mounted. So sda1 will get mounted to usbdrive1, sdb1 will get mounted to usbdrive2 etc. This part I understand ;)

What I really want is to have more meaningful folder names in /mnt. But if I create a folder called /mnt/compactflash what do I put in /etc/fstab to ensure the compact flash card always gets mounted to that point, when it could potentially be allocated any of the device names listed above.

It maybe that this is impossible, but if there is a way to do it I would be very keen to find out! I've noticed the product/vendor info gets picked up in /var/log/messages as soon as the device is inserted. Is there anyway this can be used? I did start looking at the hotplug stuff but got totally confused!

LinuxLala 11-27-2003 12:31 PM

hi friend.

googling for linux mount points gave this. Check it out.

http://members.blue.net.au/felgall/lincmd2.htm

Hope this helps

tallguy999 11-27-2003 12:59 PM

thanks for the URL - took a look but it only really covers the bits I've already managed to work out. Apart from the fsck option for mount, but I don't think that's quite what I need.

Thanks anyway!

aaa 11-27-2003 02:07 PM

Make the directories you want to mount to, then just take a look in your /etc/fstab file. The part you need is pretty simple, each line in fstab has info on a certain filesystem. It'll be pretty easy to find the lines you're looking for, it'll start with /dev/sda1 and such. After that, you'll see the directory to be mounted to, and you can change this to whatever you want (like /mnt/compactflash instead of /mnt/usbdrive1).


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