USB external hard drive disconnecting

Reid Rivenburgh reidr at pobox.com
Fri Feb 15 16:44:28 UTC 2008


On Fri, Feb 15, 2008 at 9:34 AM, Reid Rivenburgh <reidr at pobox.com> wrote:
>  That made me rethink the idea of using autofs to handle mounting.
>  There were two reasons I wasn't using it:
>
>  1. I'm not sure how autofs, with its potential for frequent
>  mounts/unmounts, works with e2fsck.  If the USB drive (ext3) is
>  configured to run e2fsck every N mounts, will it be done under autofs?
>   If it does, would autofs just wait until the e2fsck is finished
>  before mounting?  I guess the best thing to do in that case would be
>  to configure the filesystem to be checked after some period of time,
>  not after some number of mounts.  I'm still not clear on this.
>
>  2. The drive would usually be found as /dev/sdd or /dev/sde, but
>  especially with the disconnecting/reconnecting issue where it'd bounce
>  between the two, it wasn't predictable.  I thought you had to enter
>  one of them in the autofs config file, but it turns out you can enter
>  the drive's UUID or filesystem label, neither of which change.  Cool,
>  that fixes it!  Here's my auto.misc entry:
>
>  disk2           -fstype=ext3    :/dev/disk/by-uuid/a95....
>
>  You could also use /dev/disk/by-label, but my labels have slashes in
>  them, and the dev path had strange \\x2 characters in them so I went
>  with uuid.

Pardon following up to myself, but something just occurred to me.  I
was thinking that autofs would be beneficial in that it would allow
the drive to go to sleep, if that's what it was doing.  (It gets
pretty hot when always on, for one thing.)  Autofs would just wake it
up when needed.  But now I'm realizing that if it goes to sleep, it'll
probably disconnect, the kernel will lose any knowledge of it, and
autofs won't be able to wake it up after all.  I guess I still need to
prevent it from going to sleep.  Harumph!

reid




More information about the fedora-list mailing list