How to check whether a USB disk is connected to a Linux server?

I can only connect to a Linux server by SSH. How to check whether a USB disk is connected to the Linux server?

asked Feb 2, 2015 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

2 ways I usuaully use:

Method One: Check the print out of

dmesg

After the USB storage is connected and detected by Linux, it may print some messages containing "[sde]" (the new disk found by Linux).

One example is as follows:

[ 3131.583934] usb 2-2: new high speed USB device using ehci_hcd and address 2
[ 3131.698846] usb 2-2: New USB device found, idVendor=152d, idProduct=0539
[ 3131.698850] usb 2-2: New USB device strings: Mfr=10, Product=11, SerialNumber=5
[ 3131.698854] usb 2-2: Product: USB to ATA/ATAPI Bridge
[ 3131.698856] usb 2-2: Manufacturer: JMicron
[ 3131.698858] usb 2-2: SerialNumber: 000000000000
[ 3131.756819] Initializing USB Mass Storage driver...
[ 3131.757159] scsi4 : usb-storage 2-2:1.0
[ 3131.757323] usbcore: registered new interface driver usb-storage
[ 3131.757328] USB Mass Storage support registered.
[ 3132.756095] scsi 4:0:0:0: Direct-Access ORICO H/ W RAID0 0X06 PQ: 0 ANSI: 6
[ 3132.757314] sd 4:0:0:0: Attached scsi generic sg4 type 0
[ 3132.758101] sd 4:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
[ 3132.758433] sd 4:0:0:0: [sde] 11720785920 512-byte logical blocks: (6.00 TB/5.45 TiB)
[ 3132.758439] sd 4:0:0:0: [sde] 4096-byte physical blocks
[ 3132.759257] sd 4:0:0:0: [sde] Write Protect is off
[ 3132.759261] sd 4:0:0:0: [sde] Mode Sense: 27 00 00 00
[ 3132.760054] sd 4:0:0:0: [sde] No Caching mode page present
[ 3132.760060] sd 4:0:0:0: [sde] Assuming drive cache: write through
[ 3132.761095] sd 4:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
[ 3132.763327] sd 4:0:0:0: [sde] No Caching mode page present
[ 3132.763330] sd 4:0:0:0: [sde] Assuming drive cache: write through
[ 3132.858718] sde: sde1
[ 3132.860383] sd 4:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
[ 3132.862817] sd 4:0:0:0: [sde] No Caching mode page present
[ 3132.862822] sd 4:0:0:0: [sde] Assuming drive cache: write through
[ 3132.862826] sd 4:0:0:0: [sde] Attached SCSI disk

Method Two: The new storage device/disk usually can be check by

ls /dev/sd*

if you know the old disks (e.g. sda -- sdd) and find a new disk appear, it is the USB storage.

answered Feb 2, 2015 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...