FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 04-29-2008, 10:26 AM
Chris G
 
Default Automounting a USB hard disk in Ubuntu server - how?

I have an external USB hard disk connected to an Ubuntu server 7.10
system. What do I need to do (install something?) to get it to
automount?

It currently works quite happily with the following line in
/etc/fstab:-

/dev/sdb1 /backup ext3 user,noauto 0 0

but as it's quite slow to appear I can't remove the noauto I don't
think as the drive isn't yet there when the system is booted. In
addition it's not *guaranteed* to be /dev/sdb1.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 12:56 PM
Karl Larsen
 
Default Automounting a USB hard disk in Ubuntu server - how?

Chris G wrote:
> I have an external USB hard disk connected to an Ubuntu server 7.10
> system. What do I need to do (install something?) to get it to
> automount?
>
> It currently works quite happily with the following line in
> /etc/fstab:-
>
> /dev/sdb1 /backup ext3 user,noauto 0 0
>
> but as it's quite slow to appear I can't remove the noauto I don't
> think as the drive isn't yet there when the system is booted. In
> addition it's not *guaranteed* to be /dev/sdb1.
>
>
Take all that stuff you added to /etc/fstab out of the file. Let
Ubuntu load it automatic and mine comes up fast as /media/disk. If you
do not have an ext3 file system on the portable hard drive do it now.

Karl


--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 01:36 PM
Chris G
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, Apr 29, 2008 at 06:56:02AM -0600, Karl Larsen wrote:
> Chris G wrote:
> > I have an external USB hard disk connected to an Ubuntu server 7.10
> > system. What do I need to do (install something?) to get it to
> > automount?
> >
> > It currently works quite happily with the following line in
> > /etc/fstab:-
> >
> > /dev/sdb1 /backup ext3 user,noauto 0 0
> >
> > but as it's quite slow to appear I can't remove the noauto I don't
> > think as the drive isn't yet there when the system is booted. In
> > addition it's not *guaranteed* to be /dev/sdb1.
> >
> >
> Take all that stuff you added to /etc/fstab out of the file. Let
> Ubuntu load it automatic and mine comes up fast as /media/disk. If you
> do not have an ext3 file system on the portable hard drive do it now.
>
The USB drive is already formatted ext3 and has backups on it (hence
its name!).

I've taken the line above out of /etc/fstab, when I reboot the system
I see the following in dmesg:-

[ 20.424000] usb-storage: device scan complete
[ 20.424000] scsi 2:0:0:0: Direct-Access SAMSUNG HD501LJ PQ: 0 ANSI: 2 CCS
[ 20.424000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 20.424000] sd 2:0:0:0: [sdb] Write Protect is off
[ 20.424000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
[ 20.424000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 20.428000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 20.428000] sd 2:0:0:0: [sdb] Write Protect is off
[ 20.428000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
[ 20.428000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 20.428000] sdb:<7>eth0: no IPv6 routers present
[ 24.696000] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 24.820000] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[ 24.832000] NFSD: starting 90-second grace period
[ 27.856000] sdb1
[ 27.856000] sd 2:0:0:0: [sdb] Attached SCSI disk
[ 27.856000] sd 2:0:0:0: Attached scsi generic sg1 type 0

.... and then nothing. The disk doesn't get mounted, at least I can't
see it anywhere and 'mount' doesn't report anything.


I'm not convinced that things will get automounted (by default) in
Ubuntu Server, remember there isn't any GUI running.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 01:50 PM
Mario Vukelic
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, 2008-04-29 at 14:36 +0100, Chris G wrote:
>
> I'm not convinced that things will get automounted (by default) in
> Ubuntu Server, remember there isn't any GUI running.

Google is your friend I searched for "mount an external usb disk in
ubuntu server" (without the quotes):


<http://www.google.com/search?q=mount+an+external+usb+disk+in+ubuntu
+server>

First hit: <http://ubuntuforums.org/showthread.php?t=245566>

It seems you need to load module usb-storage. Do so with "sudo modprobe
usb-storage", then plug in the drive and see whether it works. If so,
you can enter "usb-storage" into /etc/modules to make it load on boot.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 02:51 PM
Karl Larsen
 
Default Automounting a USB hard disk in Ubuntu server - how?

Chris G wrote:
> On Tue, Apr 29, 2008 at 06:56:02AM -0600, Karl Larsen wrote:
>
>> Chris G wrote:
>>
>>> I have an external USB hard disk connected to an Ubuntu server 7.10
>>> system. What do I need to do (install something?) to get it to
>>> automount?
>>>
>>> It currently works quite happily with the following line in
>>> /etc/fstab:-
>>>
>>> /dev/sdb1 /backup ext3 user,noauto 0 0
>>>
>>> but as it's quite slow to appear I can't remove the noauto I don't
>>> think as the drive isn't yet there when the system is booted. In
>>> addition it's not *guaranteed* to be /dev/sdb1.
>>>
>>>
>>>
>> Take all that stuff you added to /etc/fstab out of the file. Let
>> Ubuntu load it automatic and mine comes up fast as /media/disk. If you
>> do not have an ext3 file system on the portable hard drive do it now.
>>
>>
> The USB drive is already formatted ext3 and has backups on it (hence
> its name!).
>
> I've taken the line above out of /etc/fstab, when I reboot the system
> I see the following in dmesg:-
>
> [ 20.424000] usb-storage: device scan complete
> [ 20.424000] scsi 2:0:0:0: Direct-Access SAMSUNG HD501LJ PQ: 0 ANSI: 2 CCS
> [ 20.424000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
> [ 20.424000] sd 2:0:0:0: [sdb] Write Protect is off
> [ 20.424000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
> [ 20.424000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
> [ 20.428000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
> [ 20.428000] sd 2:0:0:0: [sdb] Write Protect is off
> [ 20.428000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
> [ 20.428000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
> [ 20.428000] sdb:<7>eth0: no IPv6 routers present
> [ 24.696000] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
> [ 24.820000] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
> [ 24.832000] NFSD: starting 90-second grace period
> [ 27.856000] sdb1
> [ 27.856000] sd 2:0:0:0: [sdb] Attached SCSI disk
> [ 27.856000] sd 2:0:0:0: Attached scsi generic sg1 type 0
>
> .... and then nothing. The disk doesn't get mounted, at least I can't
> see it anywhere and 'mount' doesn't report anything.
>
>
> I'm not convinced that things will get automounted (by default) in
> Ubuntu Server, remember there isn't any GUI running.
>
>
Well the Desktop isn't what controls the USB system. But it sure
looks like your USB system is not working.

Karl


--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 03:09 PM
Mario Vukelic
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, 2008-04-29 at 08:51 -0600, Karl Larsen wrote:
> Well the Desktop isn't what controls the USB system.

You are mistaken abut the far-reaching differences between the Server
and the Desktop version.

> But it sure
> looks like your USB system is not working.

Probably not. See my other reply.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 04:43 PM
Chris G
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, Apr 29, 2008 at 03:50:25PM +0200, Mario Vukelic wrote:
> On Tue, 2008-04-29 at 14:36 +0100, Chris G wrote:
> >
> > I'm not convinced that things will get automounted (by default) in
> > Ubuntu Server, remember there isn't any GUI running.
>
> Google is your friend I searched for "mount an external usb disk in
> ubuntu server" (without the quotes):
>
>
> <http://www.google.com/search?q=mount+an+external+usb+disk+in+ubuntu
> +server>
>
> First hit: <http://ubuntuforums.org/showthread.php?t=245566>
>
> It seems you need to load module usb-storage. Do so with "sudo modprobe
> usb-storage", then plug in the drive and see whether it works. If so,
> you can enter "usb-storage" into /etc/modules to make it load on boot.
>
No, I already have usb-storage, it reports a little higher up dmesg, I
should have included more:-

[ 15.296000] Initializing USB Mass Storage driver...
[ 15.300000] scsi2 : SCSI emulation for USB Mass Storage devices
[ 15.328000] usb-storage: device found at 2
[ 15.328000] usb-storage: waiting for device to settle before scanning
[ 15.328000] usbcore: registered new interface driver usb-storage
[ 15.328000] USB Mass Storage support registered.

[ 20.328000] usb-storage: device scan complete
[ 20.328000] scsi 2:0:0:0: Direct-Access SAMSUNG HD501LJ PQ: 0 ANSI: 2 CCS
[ 20.328000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 20.328000] sd 2:0:0:0: [sdb] Write Protect is off
[ 20.328000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
[ 20.328000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 20.332000] sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
[ 20.332000] sd 2:0:0:0: [sdb] Write Protect is off
[ 20.332000] sd 2:0:0:0: [sdb] Mode Sense: 00 38 00 00
[ 20.332000] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 20.332000] sdb:<7>eth0: no IPv6 routers present
[ 24.620000] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 24.776000] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[ 24.780000] NFSD: starting 90-second grace period
[ 27.832000] sdb1
[ 27.832000] sd 2:0:0:0: [sdb] Attached SCSI disk
[ 27.832000] sd 2:0:0:0: Attached scsi generic sg1 type 0

I don't think usb-storage has anything to do with *mounting* the disk
drive, it's just a driver that recognises the disk.

What I need is something to automount the drive after all the above
has happened.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 05:07 PM
Mario Vukelic
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, 2008-04-29 at 17:43 +0100, Chris G wrote:
> No, I already have usb-storage, it reports a little higher up dmesg,

I see

> I don't think usb-storage has anything to do with *mounting* the disk
> drive, it's just a driver that recognises the disk.
>
> What I need is something to automount the drive after all the above
> has happened.

I was mislead by the guy on the linked page finished with, "That was my
problem. usb-storage isn't loading at boot. A quick modprobe loaded it
and my usb drive appeared."

Well, sorry then, I don't have experience with the server and Google
just gives me the same question over and over, but no answers.

Hmmm, probably with an udev rule, there is even an example for USB
harddisk: http://reactivated.net/writing_udev_rules.html


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 05:21 PM
Peter Garrett
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Tue, 29 Apr 2008 17:43:22 +0100
Chris G <cl@isbd.net> wrote:

> What I need is something to automount the drive after all the above
> has happened.

Have a look at the "usbmount" package. ( apt-cache show usbmount)

It creates entries for usb in /media , and automounts devices there
( by default /media/usb0 for the first device, then /media/usb1,2 etc )

If you need to mount FAT file systems, you can configure that in
/etc/usbmount/usbmount.conf

The file is well commented, the addition is a copy-paste, and you only
need this edit if you are not using ext2, ext3 for your usb drive(s)

--
Peter Garrett <peter.garrett@optusnet.com.au>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-29-2008, 05:48 PM
Mario Vukelic
 
Default Automounting a USB hard disk in Ubuntu server - how?

On Wed, 2008-04-30 at 03:21 +1000, Peter Garrett wrote:
>
> Have a look at the "usbmount" package.

D'oh! Thanks


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org