External USB drive questions

Place to discuss Debian Linux and Debian based distributions
User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

External USB drive questions

Post by Calum » Fri Feb 16, 2007 1:04 pm

i just bought an external USB hard drive. it's a seagate 40 gig 2.5 in drive inside an aluminium case. brilliant stuff.

It has an ntfs filesystem on it, as it arrived, i plugged it into the computer (running ubuntu edgy eft) but it doesn't see it. ubuntu does this thing of creating and destroying the mount points and usb device nodes as it detects them so i am not sure where to go from here. i unplugged my other usb devices so i didn't do anything to anything else (if you see what i mean), and some devices have now gone... here:

before:

Code: Select all

root@harvey:~# ls /dev/sd*
/dev/sdb  /dev/sdb1  /dev/sdc  /dev/sdc1  /dev/sdc2
after:

Code: Select all

root@harvey:/media# ls /dev/sd*
ls: /dev/sd*: No such file or directory
now what i would like, ideally, is to have a journaling filesystem on there, but i also want to be able to pocket the drive and take it round somebody's house, and some people i know are still running windows ME or 98. Some use NT type windows though. I suppose i could just take a linux live CD when i go too, but that's kind of putting a patch on a wound that should ideally be able to heal naturally (if you see what i mean).

Okay, i've vaugued out, but back to the plot: i want this device to be usable by winNT and linux operating systems, though linux is my main priority. i am still swithering about whether to format it to fat32 but if there's some journaling FS that winNT and linux can both do then that's for me. I recently heard NTFS support is now stable for linux. is it? i don't mean "okay", i mean" stable". you know what i could do is, there's a program for windows that allows you to open ext2 filesystems, eh? i could make an ext2/3 filesystem on the largest part of the disk and have a tiny fat32 filesystem containing the ext2 program. then when i visit someone i can install the program off the fat32 part and then i would be able to see the rest of the drive. okay, yes, that's what i want right enough.

But to do this, i need to be able to fdisk and mkfs this drive. is this easy? is it possible? how? i hate saying things like this, but in windows, all i would need to do is plug it in and it'd be detected, given a drive letter etc etc. What's the equivalent in linux? this seems like a very basic issue, and yet searching in google turns up many unrelated and unfortunately unhelpful results. maybe i am just not searching using the right terminology.

Can anybody advise please?

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Fri Feb 16, 2007 3:03 pm

I would format the whole drive in fat32 if you want it to be able to interact with windows, not to mention that win 98 or ME don't know NTFS I think (but I could be wrong on this - it has been really long since I used them)

Plug the drive in and do a

Code: Select all

tail /var/log/messages
to see what device number it has and then fdisk it to create the partitions you want

Code: Select all

fdisk /dev/sda*
After that it should be as simple as

Code: Select all

mkfs -t vfat /dev/sda
althoug I've only done that with ext3 filesystems until now, I've given up on Lin-Win interoperability and whenever I REALLY need to transfer files to a Windows pc I use a 1GB usb stick.

Add a proper line to fstab and you're done.

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Fri Feb 16, 2007 7:26 pm

I would like to see you do your bit with the small fat drive containing the ext2 driver app for windows. Yes, that means that in windows your journaled ext3 will be used as a non-journaled ext2 though.

Is NTFS journalling??

And i have no idea why it isnt showing up when you plug it in. Take a look at "dmesg | tail" and see if theres any lines about usb and perhaps try 'lsusb'

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sat Feb 17, 2007 3:58 am

Master of Reality wrote:
Is NTFS journalling??
Yes but only at filesystem level.

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Sat Feb 17, 2007 9:44 am

well, i plugged it in and...

Code: Select all

calum@harvey:~$ tail /var/log/messages
Feb 17 15:39:38 localhost kernel: [17184623.436000] Initializing USB Mass Stor
e driver...
Feb 17 15:39:38 localhost kernel: [17184623.436000] scsi0 : SCSI emulation for
SB Mass Storage devices
Feb 17 15:39:38 localhost kernel: [17184623.440000] usbcore: registered new dr
er usb-storage
Feb 17 15:39:38 localhost kernel: [17184623.440000] USB Mass Storage support r
istered.
Feb 17 15:39:49 localhost kernel: [17184634.028000] usb 1-2.4: reset full spee
USB device using uhci_hcd and address 3
Feb 17 15:40:07 localhost kernel: [17184652.296000] usb 1-2.4: reset full spee
USB device using uhci_hcd and address 3
Feb 17 15:40:31 localhost kernel: [17184676.564000] usb 1-2.4: reset full spee
USB device using uhci_hcd and address 3
Feb 17 15:40:40 localhost kernel: [17184684.848000] usb 1-2.4: reset full spee
USB device using uhci_hcd and address 3
Feb 17 15:40:58 localhost kernel: [17184703.116000] usb 1-2.4: reset full spee
USB device using uhci_hcd and address 3
Feb 17 15:41:06 localhost kernel: [17184711.312000]  0:0:0:0: scsi: Device off
ned - not ready after error recovery
calum@harvey:~$ dmesg | tail
[17184635.124000] usb 1-2.4: device descriptor read/64, error -71
[17184652.296000] usb 1-2.4: reset full speed USB device using uhci_hcd and ad
ess 3
[17184653.392000] usb 1-2.4: device descriptor read/64, error -71
[17184676.564000] usb 1-2.4: reset full speed USB device using uhci_hcd and ad
ess 3
[17184677.660000] usb 1-2.4: device descriptor read/64, error -71
[17184684.848000] usb 1-2.4: reset full speed USB device using uhci_hcd and ad
ess 3
[17184685.944000] usb 1-2.4: device descriptor read/64, error -71
[17184703.116000] usb 1-2.4: reset full speed USB device using uhci_hcd and ad
ess 3
[17184704.212000] usb 1-2.4: device descriptor read/64, error -71
[17184711.312000]  0:0:0:0: scsi: Device offlined - not ready after error reco
ry
calum@harvey:~$ lsusb
Bus 001 Device 003: ID 058f:6390 Alcor Micro Corp. 
Bus 001 Device 002: ID 0424:a700 Standard Microsystems Corp. 
Bus 001 Device 001: ID 0000:0000  
but i still haven't a clue how to mount or format it! help!

insomnia
programmer
programmer
Posts: 123
Joined: Thu Feb 05, 2004 6:58 pm
Location: Belgium, Antwerp

Post by insomnia » Sat Feb 17, 2007 10:47 am

All I did was:
#fdisk /dev/sda
#mkdosfs -vF 32 /dev/sda (is this the same as "mkfs -t vfat /dev/sda" ?)
#mkdir /mnt/usb
#mount -t vfat /dev/sda /mnt/usb
Last edited by insomnia on Sat Feb 17, 2007 10:59 am, edited 2 times in total.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sat Feb 17, 2007 10:54 am

There's a fair chance that your device will be /dev/sda1 or /sda2
Try fdisk /dev/sda and see if you can get a list of the partitions on the drive, if nothing shows, try /dev/sdb, ...

"p" prints the list of partitions
From there you can see what you wanna do with it.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Feb 17, 2007 11:11 am

Also, rather than guessing where the drive is found you can do this to see all the partitions that Linux recognizes:

Code: Select all

cat /proc/partitions
If you don't see the partitions on the drive listed there then you won't be able to do anything with as the kernel isn't recognizing it for some reason. Right after plugging it in do this:

Code: Select all

dmesg
The last several lines of output should indicate why it is not being recognized. Also as mentioned before if it's not listed in the /sbin/lsusb output then you need to figure out why (dmesg) before going any farther.

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Sun Feb 18, 2007 5:47 pm

okay it's not being recognised. here are the answers to all the questions from both ice9 and VM:

Code: Select all

root@harvey:~# fdisk /dev/sda

Unable to open /dev/sda
root@harvey:~# fdisk /dev/sdb

Unable to open /dev/sdb
root@harvey:~# ls /dev/sd*
ls: /dev/sd*: No such file or directory
root@harvey:~# cat /proc/partitions 
major minor  #blocks  name

   3     0   15007608 hda
   3     1    3791308 hda1
   3     2    6144862 hda2
   3     3    4200997 hda3
   3     4          1 hda4
   3     5     867478 hda5
root@harvey:~# dmesg | tail
[17189364.644000] usb 1-2.3: device descriptor read/64, error -71
[17189381.816000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189382.912000] usb 1-2.3: device descriptor read/64, error -71
[17189406.100000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189407.196000] usb 1-2.3: device descriptor read/64, error -71
[17189414.384000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189415.480000] usb 1-2.3: device descriptor read/64, error -71
[17189432.668000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189433.764000] usb 1-2.3: device descriptor read/64, error -71
[17189440.864000]  0:0:0:0: scsi: Device offlined - not ready after error recovery
root@harvey:~# lsusb 
Bus 001 Device 003: ID 058f:6390 Alcor Micro Corp. 
Bus 001 Device 002: ID 0424:a700 Standard Microsystems Corp. 
Bus 001 Device 001: ID 0000:0000  
also, the drive has an LED which blinks between red and green, and clicks when it does so, in a fashion which suggests unhealthiness to me, but i am guessing. I think it is the disk part, not the LED part that is doing the clicking, although the clicking is synchronous with the flashing.

Also, i did try to plug it in using windows 2000 SP4 and could not see it as a drive, it also did the thing of flashing and clicking with windows, however when i pulled the plug out windows warned me about removing usb devices without warning it first, which it tends to only do with devices it has recognised. it then gave me a little box showing that i had unplugged a USB disk and a USB generic device without following proper procedure (i suspect both of these are actually the same USB drive).

Any ideas?

EDIT: just realised the dmesg output is not all the relevant info because of tail. Here's all the relevant part about USB devices from the end of the output from dmesg:

Code: Select all

[17189343.012000] usb 1-2.3: new full speed USB device using uhci_hcd and address 3
[17189344.108000] usb 1-2.3: device descriptor read/64, error -71
[17189349.924000] usb 1-2.3: configuration #1 chosen from 1 choice
[17189352.652000] usbcore: registered new driver libusual
[17189352.952000] SCSI subsystem initialized
[17189352.972000] Initializing USB Mass Storage driver...
[17189352.972000] scsi0 : SCSI emulation for USB Mass Storage devices
[17189352.976000] usbcore: registered new driver usb-storage
[17189352.976000] USB Mass Storage support registered.
[17189352.976000] usb-storage: device found at 3
[17189352.976000] usb-storage: waiting for device to settle before scanning
[17189357.976000] usb-storage: device scan complete
[17189363.548000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189364.644000] usb 1-2.3: device descriptor read/64, error -71
[17189381.816000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189382.912000] usb 1-2.3: device descriptor read/64, error -71
[17189406.100000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189407.196000] usb 1-2.3: device descriptor read/64, error -71
[17189414.384000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189415.480000] usb 1-2.3: device descriptor read/64, error -71
[17189432.668000] usb 1-2.3: reset full speed USB device using uhci_hcd and address 3
[17189433.764000] usb 1-2.3: device descriptor read/64, error -71
[17189440.864000]  0:0:0:0: scsi: Device offlined - not ready after error recovery
[17189774.572000] usb 1-2.3: USB disconnect, address 3
[17189832.360000] usb 1-2.3: new full speed USB device using uhci_hcd and address 4
[17189833.456000] usb 1-2.3: device descriptor read/64, error -71
[17189839.272000] usb 1-2.3: configuration #1 chosen from 1 choice
[17189841.372000] scsi1 : SCSI emulation for USB Mass Storage devices
[17189841.372000] usb-storage: device found at 4
[17189841.372000] usb-storage: waiting for device to settle before scanning

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sun Feb 18, 2007 6:21 pm

I had a Plextor drive clicking and not being recognized a while back.
Turned out the power supply was insufficient when it was only plugged in the usb port so I had to use the power adapter as well, once I did that the drive functioned as intended.
Probably nothing to do with this case but you never know.

Otherwise a clicking disk is almost always a defect or soon-to-be-defect.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Feb 18, 2007 7:48 pm

Yeah, it almost looks hardware related like Ice9 said, especially if it doesn't work in multiple machines on multiple OSs. If you could get it to work on anthing then we would have something to work with. I assume that the case and USB components are this line:

058f:6390 Alcor Micro Corp.

Is that right? Can you do an "lsusb -v" and get more info out of it or do you have any more info in the documentation that came with it as far as exactly what we're dealing with here?

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Feb 20, 2007 10:19 am

hey, thanks for your replies. i've asked the supplier, and they confirmed it sounds like a hardware failure, so they'll give me an exchange. It's mail order though so will be a few days till i get the new drive. I may be back asking questions when it arrives, but i suspect what you've all said here will be all the information i'll need.

Thanks again!

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 20, 2007 2:59 pm

We all better be careful with the drives we purchase.
I stumbled on this thread earlier today after having received a mail from my contact with WD.
In the utterly positive comments that he attached to his mail there was one which caught my attention because it was entitled "Don't get your hopes up with linux ..." and it linked back to the LQ thread.
Apparently the bigger capacities of WD drives often are a NO-GO for linux users, wonder why?
The usb chips used to interface with the pc?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Feb 20, 2007 3:12 pm

I don't have any 500GB drives but I have a 250GB drive I haven't had any problem with. I would be happy to test the 500GB if someone were to ship me one. Or two. :)

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 20, 2007 3:25 pm

I googled the subject a little and all the problems happened with 400GB or 500GB drives.
I also own a couple of drives (highest capacity being 320GB) and never had a similar problem, but the LQ thread lists a couple of people with different distros ranging from FC to Mandriva to plain debian ...

I wouldn't refuse either if WD decided to ship me a test drive just to see if I can get it to work 8)
After I mailed them back to point out the possible flaw they told me they were gonna look into it and come back to me ...

Post Reply