I have an external, USB connected, SATA drive divided into two partitions with labels SATA1, SATA2. I'd like to set up autofs to automount the drive when I plug it into the USB port and power it up.
In auto.master I have:
/mnt /etc/auto.misc --timeout 60
and in /etc/auto.misc I have:
sata1 -fstype=ext3 :SATA1 sata2 -fstype=ext3 :SATA2
I restarted autofs, no luck. Is there a way to automount my drive using just the labels?
Thanks - Tod
Tod Thomas wrote:
I have an external, USB connected, SATA drive divided into two partitions with labels SATA1, SATA2. I'd like to set up autofs to automount the drive when I plug it into the USB port and power it up.
In auto.master I have:
/mnt /etc/auto.misc --timeout 60
and in /etc/auto.misc I have:
sata1 -fstype=ext3 :SATA1 sata2 -fstype=ext3 :SATA2
I restarted autofs, no luck. Is there a way to automount my drive using just the labels?
Thanks - Tod
Dumb question - what error message do you get when you try do "cd /misc/sata1"? Automount does not mount anything until you try to access it. It does not mount your drive just because you plugged it in.
Mikkel
Mikkel L. Ellertson wrote:
Tod Thomas wrote:
I have an external, USB connected, SATA drive divided into two partitions with labels SATA1, SATA2. I'd like to set up autofs to automount the drive when I plug it into the USB port and power it up.
In auto.master I have:
/mnt /etc/auto.misc --timeout 60
and in /etc/auto.misc I have:
sata1 -fstype=ext3 :SATA1 sata2 -fstype=ext3 :SATA2
I restarted autofs, no luck. Is there a way to automount my drive using just the labels?
Thanks - Tod
Dumb question - what error message do you get when you try do "cd /misc/sata1"? Automount does not mount anything until you try to access it. It does not mount your drive just because you plugged it in.
Mikkel
No such file or directory, and that's doing a "cd /mnt/sata1" - I always mount to mnt, I just reused the /etc/auto.misc file.
Tod Thomas wrote:
Mikkel L. Ellertson wrote:
Dumb question - what error message do you get when you try do "cd /misc/sata1"? Automount does not mount anything until you try to access it. It does not mount your drive just because you plugged it in.
Mikkel
No such file or directory, and that's doing a "cd /mnt/sata1" - I always mount to mnt, I just reused the /etc/auto.misc file.
Oops - you are correct - I missed the change. If I remember correctly, the mount points need to exist - automount does not create them.
Mikkel
Mikkel L. Ellertson wrote:
Tod Thomas wrote:
Mikkel L. Ellertson wrote:
Dumb question - what error message do you get when you try do "cd /misc/sata1"? Automount does not mount anything until you try to access it. It does not mount your drive just because you plugged it in.
Mikkel
No such file or directory, and that's doing a "cd /mnt/sata1" - I always mount to mnt, I just reused the /etc/auto.misc file.
Oops - you are correct - I missed the change. If I remember correctly, the mount points need to exist - automount does not create them.
Mikkel
As it turns out there were two problems. The first was a typo. The second was trying to use -L to automount the partition by label. Instead in auto.misc I needed:
sata1 -fstype=ext3 :/dev/disk/by-label/SATA1 sata2 -fstype=ext3 :/dev/disk/by-label/SATA2
/dev/disk/by-label? How long has that been around?
Thanks Mikkel for helping out.
- Tod