where would i configure an external HD to be automounted?
more specifically, on an old lenny system, when an external maxtor (1-touch) HD was plugged in via USB, it was *apparently* mounted automatically under /mnt/maxtor, for the purposes of backups later in the evening. i have a full backup of /etc from that old system, and i'm trying to figure out where that would have been configured so i can add it to the new system. i've checked things related to autofs but i don't see it. hint? i'm sure it's obvious, i just haven't found it yet. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
I would check with mount how the filesystem was mounted, then add it to /etc/fstab. Is that the case? -- Vinícius Massuchetto http://vinicius.soylocoporti.org.br On Thu, Sep 24, 2009 at 9:19 AM, Robert P. J. Day rpj...@crashcourse.ca wrote: more specifically, on an old lenny system, when an external maxtor (1-touch) HD was plugged in via USB, it was *apparently* mounted automatically under /mnt/maxtor, for the purposes of backups later in the evening. i have a full backup of /etc from that old system, and i'm trying to figure out where that would have been configured so i can add it to the new system. i've checked things related to autofs but i don't see it. hint? i'm sure it's obvious, i just haven't found it yet. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, 24 Sep 2009, Robert P. J. Day wrote: more specifically, on an old lenny system, when an external maxtor (1-touch) HD was plugged in via USB, it was *apparently* mounted automatically under /mnt/maxtor, for the purposes of backups later in the evening. i have a full backup of /etc from that old system, and i'm trying to figure out where that would have been configured so i can add it to the new system. i've checked things related to autofs but i don't see it. hint? i'm sure it's obvious, i just haven't found it yet. and to preempt the obvious question, lsusb does show that the hard drive is connected. it's just the automount/autofs i need to activate so that it's mounted when it's plugged in. rday p.s. i'm *assuming* that some sort of auto-mounting was happening there, since there's nothing in the backup script that involves a manual mount of that drive. -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, 24 Sep 2009, Vinicius Massuchetto wrote: I would check with mount how the filesystem was mounted, then add it to /etc/fstab. Is that the case? nope, found it: an entry in /etc/auto.usb. i *figured* it was an automount/autofs issue of some kind. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, 24 Sep 2009, Robert P. J. Day wrote: On Thu, 24 Sep 2009, Vinicius Massuchetto wrote: I would check with mount how the filesystem was mounted, then add it to /etc/fstab. Is that the case? nope, found it: an entry in /etc/auto.usb. i *figured* it was an automount/autofs issue of some kind. hmm ... that didn't solve it and, in the process of debugging, i ran across something *very* unfamiliar but apparently easily fixable. to get the maxtor USB HD to automount when plugged in, i copied over the old autofs-related config files so that the system now has: /etc/auto.master: /var/autofs/misc/etc/auto.misc --timeout=5 /var/autofs/net /etc/auto.net /mnt/etc/auto.usb --timeout=2 /etc/auto.usb: usbdrive-fstype=ext3,rw,sync :/dev/sdb1 usbdrive2 -fstype=ext3,rw,sync :/dev/sdc1 looks good so far? and i can verify with fdisk that the drive appears as /dev/sdc, with a single linux partition of /dev/sdc1. i verified that i can manually mount that partition at an arbitrary directory i created under /tmp. and after i restarted autofs, i get: = # /etc/init.d/autofs status Configured Mount Points: /usr/sbin/automount --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --timeout=2 /mnt file /etc/auto.usb Active Mount Points: /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_misc.pid --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_net.pid --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --pid-file=/var/run/autofs/_mnt.pid --timeout=2 /mnt file /etc/auto.usb = would that normally be sufficient? have i forgotten anything? because i had someone unplug the drive, then plug it back in again and ... nothing. so i tried to *manually* mount the drive under /mnt, but i was unable to manually create a directory mount point under /mnt. # mkdir /mnt/rday mkdir: cannot create directory `/mnt/rday': No such file or directory # huh? then i looked more closely: # ls -ld /mnt drwxr-xr-x 2 root root 0 2009-09-24 09:04 /mnt # a directory size of zero? does that mean that there is no real /mnt directory (similar to /proc and /sys)? i'm confused since i'm used to /mnt being a real but empty directory. and i'm confused as to why the drive isn't being mounted at plug-in time. have i missed something? all of the above looks reasonable. to what log file would autofs diagnostics go? i can't find any error msgs. this looked so straightforward. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
Quoting Robert P. J. Day rpj...@crashcourse.ca: On Thu, 24 Sep 2009, Robert P. J. Day wrote: On Thu, 24 Sep 2009, Vinicius Massuchetto wrote: I would check with mount how the filesystem was mounted, then add it to /etc/fstab. Is that the case? nope, found it: an entry in /etc/auto.usb. i *figured* it was an automount/autofs issue of some kind. hmm ... that didn't solve it and, in the process of debugging, i ran across something *very* unfamiliar but apparently easily fixable. to get the maxtor USB HD to automount when plugged in, i copied over the old autofs-related config files so that the system now has: /etc/auto.master: /var/autofs/misc/etc/auto.misc --timeout=5 /var/autofs/net /etc/auto.net /mnt/etc/auto.usb --timeout=2 /etc/auto.usb: usbdrive-fstype=ext3,rw,sync :/dev/sdb1 usbdrive2 -fstype=ext3,rw,sync :/dev/sdc1 looks good so far? and i can verify with fdisk that the drive appears as /dev/sdc, with a single linux partition of /dev/sdc1. i verified that i can manually mount that partition at an arbitrary directory i created under /tmp. and after i restarted autofs, i get: = # /etc/init.d/autofs status Configured Mount Points: /usr/sbin/automount --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --timeout=2 /mnt file /etc/auto.usb Active Mount Points: /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_misc.pid --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_net.pid --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --pid-file=/var/run/autofs/_mnt.pid --timeout=2 /mnt file /etc/auto.usb = would that normally be sufficient? have i forgotten anything? because i had someone unplug the drive, then plug it back in again and ... nothing. so i tried to *manually* mount the drive under /mnt, but i was unable to manually create a directory mount point under /mnt. # mkdir /mnt/rday mkdir: cannot create directory `/mnt/rday': No such file or directory # huh? then i looked more closely: # ls -ld /mnt drwxr-xr-x 2 root root 0 2009-09-24 09:04 /mnt # a directory size of zero? does that mean that there is no real /mnt directory (similar to /proc and /sys)? i'm confused since i'm used to /mnt being a real but empty directory. and i'm confused as to why the drive isn't being mounted at plug-in time. have i missed something? all of the above looks reasonable. to what log file would autofs diagnostics go? i can't find any error msgs. this looked so straightforward. rday -- It should be pretty easy. I have a USB drive that mounts automatically (sometimes even when I don't want it to). 1. Create a directory for your drive to mount to. In this case, it looks like you want: mkdir /mnt/rday The mount point has to exist before you can mount to it. 2. Create an entry in /etc/fstab like this: /dev/sdc1 /mnt/rday ext3 user,auto,rw,exec,suid,dev 0 0 You can twiddle the options as you need, but this should get you going. Giff -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, 24 Sep 2009, gham...@sv-phoenix.com wrote: Quoting Robert P. J. Day rpj...@crashcourse.ca: On Thu, 24 Sep 2009, Robert P. J. Day wrote: On Thu, 24 Sep 2009, Vinicius Massuchetto wrote: I would check with mount how the filesystem was mounted, then add it to /etc/fstab. Is that the case? nope, found it: an entry in /etc/auto.usb. i *figured* it was an automount/autofs issue of some kind. hmm ... that didn't solve it and, in the process of debugging, i ran across something *very* unfamiliar but apparently easily fixable. to get the maxtor USB HD to automount when plugged in, i copied over the old autofs-related config files so that the system now has: /etc/auto.master: /var/autofs/misc/etc/auto.misc --timeout=5 /var/autofs/net /etc/auto.net /mnt/etc/auto.usb --timeout=2 /etc/auto.usb: usbdrive-fstype=ext3,rw,sync :/dev/sdb1 usbdrive2 -fstype=ext3,rw,sync :/dev/sdc1 looks good so far? and i can verify with fdisk that the drive appears as /dev/sdc, with a single linux partition of /dev/sdc1. i verified that i can manually mount that partition at an arbitrary directory i created under /tmp. and after i restarted autofs, i get: = # /etc/init.d/autofs status Configured Mount Points: /usr/sbin/automount --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --timeout=2 /mnt file /etc/auto.usb Active Mount Points: /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_misc.pid --timeout=5 /var/autofs/misc file /etc/auto.misc /usr/sbin/automount --pid-file=/var/run/autofs/_var_autofs_net.pid --timeout=300 /var/autofs/net program /etc/auto.net /usr/sbin/automount --pid-file=/var/run/autofs/_mnt.pid --timeout=2 /mnt file /etc/auto.usb = would that normally be sufficient? have i forgotten anything? because i had someone unplug the drive, then plug it back in again and ... nothing. so i tried to *manually* mount the drive under /mnt, but i was unable to manually create a directory mount point under /mnt. # mkdir /mnt/rday mkdir: cannot create directory `/mnt/rday': No such file or directory # huh? then i looked more closely: # ls -ld /mnt drwxr-xr-x 2 root root 0 2009-09-24 09:04 /mnt # a directory size of zero? does that mean that there is no real /mnt directory (similar to /proc and /sys)? i'm confused since i'm used to /mnt being a real but empty directory. and i'm confused as to why the drive isn't being mounted at plug-in time. have i missed something? all of the above looks reasonable. to what log file would autofs diagnostics go? i can't find any error msgs. this looked so straightforward. rday -- It should be pretty easy. I have a USB drive that mounts automatically (sometimes even when I don't want it to). 1. Create a directory for your drive to mount to. In this case, it looks like you want: mkdir /mnt/rday The mount point has to exist before you can mount to it. 2. Create an entry in /etc/fstab like this: /dev/sdc1 /mnt/rday ext3 user,auto,rw,exec,suid,dev 0 0 You can twiddle the options as you need, but this should get you going. Giff no, i don't think i should need to do that. the *old* system didn't have an entry in /etc fstab for this. what i'm puzzled by is that, if the automounter isn't running, there's *no* /mnt directory on this system. i always thought that /mnt should exist as a normal (but empty) directory. i'm *guessing* that what i need to do is stop the automounter, then mkdir /mnt, then restart the automounter. i get the impression that, for the above to work, /mnt must already exist, and the automounter will be responsible for creating the appropriate subdirectory mount points. does that sound reasonable? because, as it stands, the automounting just isn't working. is anyone else out there using autofs like this? does the top-level mount directory already exist for you? rday p.s. i'm sure i can simplify this with udev, but i'm trying to simply reproduce what was on the old system for now. -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, Sep 24, 2009 at 11:08:46AM -0400, Robert P. J. Day wrote: no, i don't think i should need to do that. the *old* system didn't have an entry in /etc fstab for this. what i'm puzzled by is that, if the automounter isn't running, there's *no* /mnt directory on this system. It is udev. It takes partition label as location. http://www.debian.org/doc/manuals/debian-reference/ch03.en.html#_the_udev_system i always thought that /mnt should exist as a normal (but empty) directory. i'm *guessing* that what i need to do is stop the automounter, then mkdir /mnt, then restart the automounter. I remember we had automounter damon in old days. We have udev hook scripts these days. p.s. i'm sure i can simplify this with udev, but i'm trying to simply reproduce what was on the old system for now. You mean on an old lenny system? it is new enough. Even sarge is new enough for udev. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Fri, 25 Sep 2009, Osamu Aoki wrote: On Thu, Sep 24, 2009 at 11:08:46AM -0400, Robert P. J. Day wrote: no, i don't think i should need to do that. the *old* system didn't have an entry in /etc fstab for this. what i'm puzzled by is that, if the automounter isn't running, there's *no* /mnt directory on this system. It is udev. It takes partition label as location. http://www.debian.org/doc/manuals/debian-reference/ch03.en.html#_the_udev_system i know udev is a better solution *today*, but i'm trying to strictly reproduce what the old system was using, and it wasn't mounting that HD via udev, it was doing it via autofs. so the question remains -- does it make sense to not have a real /mnt directory? i have no idea where it went, but i'm quite sure a normal debian install would create one, no? rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, Sep 24, 2009 at 12:12:03PM -0400, Robert P. J. Day wrote: i know udev is a better solution *today*, but i'm trying to strictly reproduce what the old system was using, and it wasn't mounting that HD via udev, it was doing it via autofs. so the question remains -- does it make sense to not have a real /mnt directory? i have no idea where it went, but i'm quite sure a normal debian install would create one, no? autofs might be useful for you. The way it works is, you plug in the disk, and access the mount point. When you try to access the mount point, it checks for the disk and mounts it. Also, after a time you specify (say one minute, for example), for which the disk is not accessed, it is automatically unmounted. So, you can safely plug it out. There are too many tutorials and documents to mention, so just search, and you'll find plenty of direcitons. HTH. Kumar -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, 24 Sep 2009, Kumar Appaiah wrote: On Thu, Sep 24, 2009 at 12:12:03PM -0400, Robert P. J. Day wrote: i know udev is a better solution *today*, but i'm trying to strictly reproduce what the old system was using, and it wasn't mounting that HD via udev, it was doing it via autofs. so the question remains -- does it make sense to not have a real /mnt directory? i have no idea where it went, but i'm quite sure a normal debian install would create one, no? autofs might be useful for you. The way it works is, you plug in the disk, and access the mount point. When you try to access the mount point, it checks for the disk and mounts it. Also, after a time you specify (say one minute, for example), for which the disk is not accessed, it is automatically unmounted. So, you can safely plug it out. ah, thanks for reminding me how autofs works -- it's not the plugging in, it's the *attempt* to access contents under that mount point that automounts it. i'm embarrassed to have forgotten that. so i tried to list the contents under the appropriate mount point and, sure enough, there was a pause and the contents appeared. mystery solved. i was clearly thinking of udev and was thinking that the mounting would take place when the drive was plugged in, and i kept checking the output of the mount command before i'd even tried to access anything under the mount point. my fault. just being dense today. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: where would i configure an external HD to be automounted?
On Thu, Sep 24, 2009 at 12:37:19PM -0400, Robert P. J. Day wrote: ah, thanks for reminding me how autofs works -- it's not the plugging in, it's the *attempt* to access contents under that mount point that automounts it. i'm embarrassed to have forgotten that. Pretty normal. I tend to forget seemingly obvious features in software, even after short durations of not using those features! so i tried to list the contents under the appropriate mount point and, sure enough, there was a pause and the contents appeared. mystery solved. i was clearly thinking of udev and was thinking that the mounting would take place when the drive was plugged in, and i kept checking the output of the mount command before i'd even tried to access anything under the mount point. my fault. just being dense today. Glad to know it worked for you! :-) Kumar -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org