Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   auto-mounting disks that might not be present (e.g. usb drives) (http://www.linux-archive.org/debian-user/319166-auto-mounting-disks-might-not-present-e-g-usb-drives.html)

Arthur Marsh 02-02-2010 10:55 AM

auto-mounting disks that might not be present (e.g. usb drives)
 
Hi, I found that initscripts seems to attempt to run fsck on
non-existent devices that appear in /etc/fstab, and different fsck
programs for different filesystem types give different error codes.


What is the easiest way to set up Debian to automatically mount specific
devices if they are present, but not cause a boot failure when they are
absent?


Arthur.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Camaleón 02-02-2010 02:00 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
On Tue, 02 Feb 2010 22:25:12 +1030, Arthur Marsh wrote:

> Hi, I found that initscripts seems to attempt to run fsck on
> non-existent devices that appear in /etc/fstab, and different fsck
> programs for different filesystem types give different error codes.
>
> What is the easiest way to set up Debian to automatically mount specific
> devices if they are present, but not cause a boot failure when they are
> absent?

"man fstab" says that if the <passno> digit is other than zero, "fsck"
will try to check that mount point.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Frank McCormick 02-02-2010 02:41 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 15:00:41 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> On Tue, 02 Feb 2010 22:25:12 +1030, Arthur Marsh wrote:
>
> > Hi, I found that initscripts seems to attempt to run fsck on
> > non-existent devices that appear in /etc/fstab, and different fsck
> > programs for different filesystem types give different error
> > codes.
> >
> > What is the easiest way to set up Debian to automatically mount
> > specific devices if they are present, but not cause a boot
> > failure when they are absent?
>
> "man fstab" says that if the <passno> digit is other than zero,
> "fsck" will try to check that mount point.


I have devices (usually flashdrives and or digital cameras) that
may or may not be present during boot and they don't cause boot
failure. But I guess you're talking about differnt devices ??


- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaEe6AAoJEMEDyLTvrVhj7uUH/1MPvgGpIlYep0pyaQIr7gAN
M8yO1cLsIpjBA/43I10TFeBIVxhIbifii+JN0iDvK/FUOn0SUoopXF9fSCkQR357
HbxvCwSGInSshFGxGt5vEf9c2a9agVqlc++6BxY2FaP6JmkiqH Rim0i8D8iX7bMy
6pucIOUSnS+dLsD1EKwsaqJP83X8Z99JOuHfMh1fykBGzb0S4u DSX0aAl27k4gHr
T5orATLernss7V/gakPZ8haXTVhOYQJinnlI3quroipjx3Ji1yxIu1ygg4mA1hJQ
3A0gVs2TGKaDC/7mjWP3q54//OoNlUNqZapWMB0vyJYeO0FgRs4H51PJr7yc8FY=
=SBkh
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Camaleón 02-02-2010 03:12 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
On Tue, 02 Feb 2010 10:41:46 -0500, Frank McCormick wrote:

> On Tue, 02 Feb 2010 15:00:41 +0000 (UTC) Camaleón wrote:
>
>> > What is the easiest way to set up Debian to automatically mount
>> > specific devices if they are present, but not cause a boot failure
>> > when they are absent?
>>
>> "man fstab" says that if the <passno> digit is other than zero, "fsck"
>> will try to check that mount point.
>
>
> I have devices (usually flashdrives and or digital cameras) that
> may or may not be present during boot and they don't cause boot failure.
> But I guess you're talking about differnt devices ??

I mean devices listed as static mount points in "/etc/fstab". Usually,
removable media (flash drivers and SD cards) are not listed there.

I.e., if your USB drive is listed there and you have something like:

# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sdb1 /data/backup ext3 acl,user_xattr 1 2
^

Then fsck will try to check that mount point, either is present or not
(or at least that is my understanding after reading "man fstab") :-)

If you want to avoid auto-checking at all for that specific mount point,
you can put a "0" (zero) in the last column). You'll have to do the
checking manually.

P.S. I suggest you to use LABEL or ID mount points for hard disk USB
devices.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Frank McCormick 02-02-2010 04:31 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 16:12:56 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> On Tue, 02 Feb 2010 10:41:46 -0500, Frank McCormick wrote:
>
> > On Tue, 02 Feb 2010 15:00:41 +0000 (UTC) Camaleón wrote:
> >
> >> > What is the easiest way to set up Debian to automatically mount
> >> > specific devices if they are present, but not cause a boot
> >> > failure when they are absent?
> >>
> >> "man fstab" says that if the <passno> digit is other than zero,
> >> "fsck" will try to check that mount point.
> >
> >
> > I have devices (usually flashdrives and or digital cameras)
> > that may or may not be present during boot and they don't cause
> > boot failure. But I guess you're talking about different devices ??
>
> I mean devices listed as static mount points in "/etc/fstab".
> Usually, removable media (flash drivers and SD cards) are not
> listed there.
>
> I.e., if your USB drive is listed there and you have something like:
>
> # <file system> <mount point> <type> <options> <dump>
> # <pass>
> /dev/sdb1 /data/backup ext3
> acl,user_xattr 1 2 ^
>
> Then fsck will try to check that mount point, either is present or
> not (or at least that is my understanding after reading "man
> fstab") :-)


That's not what happens in my case. The boot process simply gives
an error that the device does not exist. There is no attempt to
fsck the non-existant drive. I gather this is because the system
attempts to mount the non-existant drive.

>
> If you want to avoid auto-checking at all for that specific mount
> point, you can put a "0" (zero) in the last column). You'll have to
> do the checking manually.


- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaGGMAAoJEMEDyLTvrVhjwBYH/1PcjiHtF24v4gm2dDS534CQ
UJ0H3PjBeIM1Pe2IYSc4s4DCNfCP4qzvign5obVlL/FX64O3CxlhmeZP6NTtDsil
UYn1yz4uThzsbql3/Cip6ZhoO5trG4bv38pvmGwW6RTjBzHysRSy5PYITLerITgv
f3+p1oM/3nhJUOfawAHU7DtOZ1eglJ/kp/N5ZO6W1XYO+JFqKOsuPTnIDq4yg04J
hYAdL+A1ZTgGgRWnZaPLHOJq9c2qu1SdaCfTkuArrYD47EjQcs NciwrcP7lD7cM0
TEtrtFt0L65sFoJkrwoCGML5zc0Ox+0f6kDDA2EBcG5wIJwlnG Y/UPORmw0Vxbc=
=bQrr
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Camaleón 02-02-2010 05:10 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
On Tue, 02 Feb 2010 12:31:56 -0500, Frank McCormick wrote:

> On Tue, 02 Feb 2010 16:12:56 +0000 (UTC) Camaleón wrote:
>
>> I.e., if your USB drive is listed there and you have something like:
>>
>> # <file system> <mount point> <type> <options> <dump> # <pass>
>> /dev/sdb1 /data/backup ext3
>> acl,user_xattr 1 2 ^
>>
>> Then fsck will try to check that mount point, either is present or not
>> (or at least that is my understanding after reading "man fstab") :-)
>
>
> That's not what happens in my case. The boot process simply gives
> an error that the device does not exist. There is no attempt to fsck the
> non-existant drive. I gather this is because the system attempts to
> mount the non-existant drive.

Uh? Didn't you say...? :-?

***
I found that initscripts seems to attempt to run fsck on
non-existent devices that appear in /etc/fstab, and different fsck
programs for different filesystem types give different error codes.
***

O.k., let's start over.

Any device or partition listed under fstab are "static" ones. If you have
defined a mount point that is not present at boot time, you will get a
warning, that is a normal behaviour.

If your USB disk is not always "on" and you want to prevent that warning,
you can use de "noauto" option but you'll have to manually mount it when
you plug it.

Another possibility is just deleting (or comment) that entry in fstab and
use the standard DE hotplug system (that will mount the unit under /media
as soon as you turn it on).

Additional info:

http://wiki.debian.org/USBDrive

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Frank McCormick 02-02-2010 05:34 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 18:10:29 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> On Tue, 02 Feb 2010 12:31:56 -0500, Frank McCormick wrote:
>
> > On Tue, 02 Feb 2010 16:12:56 +0000 (UTC) Camaleón wrote:
> >
> >> I.e., if your USB drive is listed there and you have something
> >> like:
> >>
> >> # <file system> <mount point> <type> <options> <dump> #
> >> # <pass>
> >> /dev/sdb1 /data/backup ext3
> >> acl,user_xattr 1 2 ^
> >>
> >> Then fsck will try to check that mount point, either is present
> >> or not (or at least that is my understanding after reading "man
> >> fstab") :-)
> >
> >
> > That's not what happens in my case. The boot process simply
> > gives an error that the device does not exist. There is no
> > attempt to fsck the non-existant drive. I gather this is because
> > the system attempts to mount the non-existant drive.
>
> Uh? Didn't you say...? :-?
>
> ***
> I found that initscripts seems to attempt to run fsck on
> non-existent devices that appear in /etc/fstab, and different fsck
> programs for different filesystem types give different error codes.
> ***

No. I didn't say it.

On Tue, 02 Feb 2010 22:25:12 +1030, Arthur Marsh wrote:

> Hi, I found that initscripts seems to attempt to run fsck on
> non-existent devices that appear in /etc/fstab, and different fsck
> programs for different filesystem types give different error codes.
>
> What is the easiest way to set up Debian to automatically mount specific
> devices if they are present, but not cause a boot failure when they are
> absent?


> Any device or partition listed under fstab are "static" ones. If
> you have defined a mount point that is not present at boot time,
> you will get a warning, that is a normal behaviour.
>
> If your USB disk is not always "on" and you want to prevent that
> warning, you can use de "noauto" option but you'll have to manually
> mount it when you plug it.

No, it mounts automatically when I plug it in...I just want it
mounted automatically IF it's present during boot


- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaHBAAAoJEMEDyLTvrVhjtvEH/0w7WxGgk+oPOz2psIUaPozX
UKLnwtyVHXZWd97yighP2ASW2FzbWMJSWjqOFoiquOSoSs/wXtA2ohy4boSSAHSc
e7S4Z7QShRg8X5yNSMRTd1us1H2tklj57zW/pof/Dd36xGd515oWTdUwCMXJTnW6
hbWKhqutEuePbd+gLNXFJWIg24DbURHYqfsOzQwYOyDGUSXiJY 8PFmHJTYHLyE6q
JGQ9KlKUgWbDCld0gRxs4XMjqUY+9Ey9J+LvqrcoLCYq8HVt2m G9fq1au4YX/qsl
fsFZwqTSezKudfVgVrNk8QFy9l4s2FqyBfeWlvLvSPiX2XCnHw hAE11J2pp5fA4=
=U65H
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Camaleón 02-02-2010 05:45 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
On Tue, 02 Feb 2010 13:34:40 -0500, Frank McCormick wrote:

> On Tue, 02 Feb 2010 18:10:29 +0000 (UTC) Camaleón wrote:

>> Uh? Didn't you say...? :-?
>>
>> ***
>> I found that initscripts seems to attempt to run fsck on non-existent
>> devices that appear in /etc/fstab, and different fsck programs for
>> different filesystem types give different error codes. ***
>
> No. I didn't say it.

Oops, sorry. You're right. That was the OP.

>> Any device or partition listed under fstab are "static" ones. If you
>> have defined a mount point that is not present at boot time, you will
>> get a warning, that is a normal behaviour.
>>
>> If your USB disk is not always "on" and you want to prevent that
>> warning, you can use de "noauto" option but you'll have to manually
>> mount it when you plug it.
>
> No, it mounts automatically when I plug it in...I just want it
> mounted automatically IF it's present during boot

Then, why not just add it to "/etc/fstab"?

- If it's present, it will be mounted.
- If it's not available, it will be ignored and the warning logged.

Nothing wrong with that.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Frank McCormick 02-02-2010 06:46 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 02 Feb 2010 18:45:25 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> On Tue, 02 Feb 2010 13:34:40 -0500, Frank McCormick wrote:
>
> > On Tue, 02 Feb 2010 18:10:29 +0000 (UTC) Camaleón wrote:
>
> >> Uh? Didn't you say...? :-?
> >>
> >> ***
> >> I found that initscripts seems to attempt to run fsck on
> >> non-existent devices that appear in /etc/fstab, and different
> >> fsck programs for different filesystem types give different
> >> error codes. ***
> >
> > No. I didn't say it.
>
> Oops, sorry. You're right. That was the OP.

No problem.

Earlier you said:
>
> >> If your USB disk is not always "on" and you want to prevent that
> >> warning, you can use de "noauto" option but you'll have to
> >> manually mount it when you plug it.


Then I said :

>> No, it mounts automatically when I plug it in...I just want it
>> mounted automatically IF it's present during boot


To the OP:

The bottom line: There is no problem even if flashdrives/cameras etc
are in fstab but not present- you simply get the error logged


Cheers
- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJLaIEBAAoJEMEDyLTvrVhjhlYIAJJDTMlNpz Fs48z96TuHOQfH
gWD6r6MoXnN6n0hu05pT8qi55tM7txZMS+6dQbvRf/frSa73mwLOJQ/qruBBmx2P
UHRLQN9b45psZ4o6BY/HVzgYq7px8ULw1dXMNMUOQ1TCTzay56LzSu26ff0OzMI0
8MaaGRdtNUMgOvi8ejIFqFVp5+UcJBa6Hu8N+h6oGUguBkBYob YxhDvBbEc6BjZW
iWQf4BI99zjEl/MRm77s+kgUNs+oOaT7mIAWIGFIJcaYHt6K4hukx5F/lTP5NiVu
c7Dp0DdZbDWHHKz++xd+WVozl1/ApogClUvv04Gjt5+fP/a9XRRHSvRdJZvm0FI=
=Ccni
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Camaleón 02-02-2010 06:59 PM

auto-mounting disks that might not be present (e.g. usb drives)
 
On Tue, 02 Feb 2010 14:46:09 -0500, Frank McCormick wrote:

> To the OP:
>
> The bottom line: There is no problem even if flashdrives/cameras etc are
> in fstab but not present- you simply get the error logged

Question is, do you really need "those" devices (flash drives and MC/SD
memory cards) to be present in "fstab"? That is, do you need static mount
points for that kind of devices?

USB hard drives make sense, but for media cards I'd better let hotplug
subsystem auto-manages them.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 04:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.