LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 07-22-2004, 05:58 PM   #1
hellwyn
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 28

Rep: Reputation: 15
Cool One mount point, multiple filesystems - how?


I've just switched my entire home network to Linux - I love it!

Anyway, I have an external USB disk drive and a CF card reader, both of which I can mount OK. Whichever I connect first appears at /dev/sda1 - if I leave that connected, the second device then appears at /dev/sda2. So far, so good.

But the disk is ext3, and the CF reader is vfat. So how to I write my fstab so that the correct filesystem is chosen when I mount the devices regardless of mount order?

I had considered using the 'auto' fstype in fstab, but according to the mount manpages:
"Warning: the probing uses a heuristic (the presence of appropriate ‘magic’), and could recognize the wrong filesystem type, possibly with catastrophic consequences. If your data is valuable, don’t ask mount to guess."

The disk is a backup, so the data is 'valuable'. So what's the best way to do this?
 
Old 07-22-2004, 06:20 PM   #2
hellwyn
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 28

Original Poster
Rep: Reputation: 15
Correction:
...if I leave that connected, the second device then appears at /dev/sdb1.
 
Old 02-08-2005, 04:32 PM   #3
hellwyn
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 28

Original Poster
Rep: Reputation: 15
Upgraded to FC3. For USB removable media, I don't even need to add an entry to /etc/fstab. fstab-sync handles it all now, so problem solved.
 
Old 02-08-2005, 10:16 PM   #4
Travers
Member
 
Registered: Jul 2004
Location: Des Moines
Distribution: Gentoo
Posts: 111

Rep: Reputation: 15
FSTAB's are written like so: #

<fs> <mountpoint> <type> <opts> <dump/pass>

So, providing both CF and USB drive are fat32, you would make lines like so:
/dev/sda1 /mnt/sda1 vfat user,auto 0 0
/dev/sda2 /mnt/sda2 vfat user,auto 0 0

vfat is FAT32, user allows it to be mounted by users other than root, and auto mounts it when it is found by hotplug. So edit your fstab, plug in the drive and cd /mnt/sda1, and you're set.

This is my FSTAB for example:
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/hda1 / ext3 noatime 0 1
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /proc/bus/usb usbfs defaults 0 0
 
Old 02-15-2005, 04:15 PM   #5
hellwyn
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks, Travers. But:
"So, providing both CF and USB drive are fat32..."

- the point of my original problem is that I had one vfat device and one ext3 device. The entries in fstab would only work if I hotplugged the devices in a particular order. But it is a moot point now, because in FC3 the fstab-sync daemon adds and removes fstab entries automagically whenever a USB device is attached/removed. At last, true plug'n'play! Still need to have a card in the CF reader on insertion, though. Thx for the info anyway.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
Multiple mount --bind's to 1 mount point ? Etraman Slackware 6 12-23-2004 07:18 PM
Gentoo stage3 tarball won't work with multiple filesystems GrimCracker Linux - Distributions 2 03-08-2004 05:41 PM
Multiple devices on the same mount point Knotz Linux - Hardware 3 05-15-2003 03:27 AM


All times are GMT -5. The time now is 12:23 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration