Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to detect that a USB disk has been plugged?

Reply
Thread Tools Display Modes

How to detect that a USB disk has been plugged?

 
 
Ramon F Herrera
Guest
Posts: n/a

 
      04-08-2008, 05:10 PM

My server is in a remote site and I have ssh access only. I had a
colleague plug an USB disk into the server and would like to mount it.

I was hoping that the insertion of the disk would generate some log
message but that doesn't seem to be the case. I only looked in /var/
log/messages, btw.

My second approach was to reboot the server and take a look at the
boot log in order to identify the device and mount the disk.

Is it possible to identify the device without rebooting? Maybe I
should look under the /proc filesystem?

TIA,

-Ramon

 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      04-08-2008, 06:44 PM
On 2008-04-08, Ramon F Herrera <(E-Mail Removed)> wrote:
>
>
>
> My server is in a remote site and I have ssh access only. I had a
> colleague plug an USB disk into the server and would like to mount it.
>
> I was hoping that the insertion of the disk would generate some log
> message but that doesn't seem to be the case. I only looked in /var/
> log/messages, btw.
>
> My second approach was to reboot the server and take a look at the
> boot log in order to identify the device and mount the disk.
>
> Is it possible to identify the device without rebooting? Maybe I
> should look under the /proc filesystem?
>

Perhaps your server installation does not include udevd.
 
Reply With Quote
 
Ramon F Herrera
Guest
Posts: n/a

 
      04-08-2008, 07:17 PM
On Apr 8, 2:44 pm, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On 2008-04-08, Ramon F Herrera <ra...@conexus.net> wrote:
>
>
>
> > My server is in a remote site and I have ssh access only. I had a
> > colleague plug an USB disk into the server and would like to mount it.

>
> > I was hoping that the insertion of the disk would generate some log
> > message but that doesn't seem to be the case. I only looked in /var/
> > log/messages, btw.

>
> > My second approach was to reboot the server and take a look at the
> > boot log in order to identify the device and mount the disk.

>
> > Is it possible to identify the device without rebooting? Maybe I
> > should look under the /proc filesystem?

>


> Perhaps your server installation does not include udevd.


Good point. I have been able to mount that disk on that server many
times, but I can't remember the details. At this point all I need is
the device to use with 'mount'. I have looked in 'dmesg' and under /
proc, and can't find anything.

-Ramon

ps: udev is up & running on my system - thanks for bringing it to my
attention.

 
Reply With Quote
 
goarilla
Guest
Posts: n/a

 
      04-08-2008, 07:20 PM
Ramon F Herrera wrote:
> On Apr 8, 2:44 pm, Bill Marcum <marcumb...@bellsouth.net> wrote:
>> On 2008-04-08, Ramon F Herrera <ra...@conexus.net> wrote:
>>
>>
>>
>>> My server is in a remote site and I have ssh access only. I had a
>>> colleague plug an USB disk into the server and would like to mount it.
>>> I was hoping that the insertion of the disk would generate some log
>>> message but that doesn't seem to be the case. I only looked in /var/
>>> log/messages, btw.
>>> My second approach was to reboot the server and take a look at the
>>> boot log in order to identify the device and mount the disk.
>>> Is it possible to identify the device without rebooting? Maybe I
>>> should look under the /proc filesystem?

>
>> Perhaps your server installation does not include udevd.

>
> Good point. I have been able to mount that disk on that server many
> times, but I can't remember the details. At this point all I need is
> the device to use with 'mount'. I have looked in 'dmesg' and under /
> proc, and can't find anything.
>
> -Ramon
>
> ps: udev is up & running on my system - thanks for bringing it to my
> attention.
>

restart it
 
Reply With Quote
 
Ramon F Herrera
Guest
Posts: n/a

 
      04-09-2008, 03:51 AM
On Apr 8, 1:10 pm, Ramon F Herrera <ra...@conexus.net> wrote:
> My server is in a remote site and I have ssh access only. I had a
> colleague plug an USB disk into the server and would like to mount it.
>
> I was hoping that the insertion of the disk would generate some log
> message but that doesn't seem to be the case. I only looked in /var/
> log/messages, btw.
>
> My second approach was to reboot the server and take a look at the
> boot log in order to identify the device and mount the disk.
>
> Is it possible to identify the device without rebooting? Maybe I
> should look under the /proc filesystem?
>
> TIA,
>
> -Ramon



FWIW, I fixed my problem and found out how to determine that a USB
disk has been plugged. The lines below are logged in /var/log/
messages.

This is what I did:

1) Plugged the USB disk: nothing happened
2) Plugged a pen drive: it was recognized
3) Removed pen drive
4) Re-plugged the USB disk: it was recognized

Thanks! Bill and Kevin.

-Ramon

------------
kernel: ohci_hcd 0000:00:0f.2: wakeup
kernel: usb 1-1: new full speed USB device using address 2
kernel: Initializing USB Mass Storage driver...
kernel: scsi1 : SCSI emulation for USB Mass Storage devices
kernel: Vendor: Kingston Model: DataTraveler II+ Rev: PMAP
kernel: Type: Direct-Access ANSI SCSI
revision: 02
kernel: SCSI device sdb: 4029440 512-byte hdwr sectors (2063 MB)
kernel: sdb: Write Protect is off
kernel: sdb: assuming drive cache: write through
kernel: SCSI device sdb: 4029440 512-byte hdwr sectors (2063 MB)
kernel: sdb: Write Protect is off
kernel: sdb: assuming drive cache: write through
kernel: sdb: sdb1
kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0,
lun 0
kernel: usbcore: registered new driver usb-storage
kernel: USB Mass Storage support registered.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wall Plugged Ethernet Bridge Adapters roman Home Networking 6 05-14-2006 04:26 PM
Win 2000 freezes when network cable plugged in R D S Home Networking 2 04-03-2005 02:39 PM
No boot with ADSL modem plugged in... Domestos Broadband 12 05-09-2004 09:26 PM
why can Xbox plugged into WET11 see LAN but a second access pointcannot? Mike Levin Wireless Internet 3 07-13-2003 12:58 PM
Network Slow When Plugged in Switch Michael Hill Linux Networking 0 07-07-2003 04:21 PM



1 2 3 4 5 6 7 8 9 10 11