Welcome! Log In Create A New Profile

Advanced

mounting usb hard drives

Posted by oldman 
mounting usb hard drives
October 04, 2011 09:59PM
I have my Dockstar setup and running with a single hard drive. Everything is working and I can access the hard drive via my home network.

Now I have added a second hard drive, that is the same make and model of the first. I can't seem to get this drive to work.

When I use fdisk -l, the drives give a lot of information, including /dev/sdb1 for the working drive and /dev/sdc1 for the drive that is not working.

fstab has:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               ext2    noatime,errors=remount-ro 0 1
/dev/sda2      none            swap    sw                0       0
tmpfs          /tmp            tmpfs   defaults          0       0
/dev/sdb1      /mnt/fantom01   ntfs-3g defaults          0       0
/dev/sbc1      /mnt/fantom02   ntfs-3g defaults          0       0

When I look in Webmin, I see:
/mnt/fantom01 NTFS-3G SCSI device B partition 1 49% Yes Yes
/mnt/fantom02 NTFS-3G /dev/sbc1 No Yes

The second drive shows "In use?" to be No. If I click on the No, it gives me an error page.
Failed to mount /mnt/fantom02 :

ntfs-3g: Failed to access volume '/dev/sbc1': No such file or directory

ntfs-3g 2010.3.6 integrated FUSE 27 - Third Generation NTFS Driver
		Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2010 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage:    ntfs-3g [-o option[,...]]  

Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information:  http://ntfs-3g.org

Any idea what I have done wrong?
Re: mounting usb hard drives
October 05, 2011 05:50AM
If that's an exact cut and paste then you made a silly typo...

/dev/sbc1
---------^
that's a "b"
should be a "d"

:)



Edited 1 time(s). Last edit at 10/05/2011 05:51AM by kraqh3d.
Re: mounting usb hard drives
October 05, 2011 10:16PM
Okay,

I fixed my typo.

Now Webmin has:

/mnt/fantom01 NTFS-3G SCSI device B partition 1 49% Yes Yes
/mnt/fantom02 NTFS-3G SCSI device C partition 1 49% Yes Yes

That is a bit strange, since I have not placed any files on the second drive.

If I access the Dockstar from a Windows 7 machine, I only see the second drive, but see all the files from the first drive. If I have the first drive removed, the second drive will have no files.

This is the result of fdisk -l and each drive looks identical to the other, including having the same id and disk identifier.
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e12cce7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001    7  HPFS/NTFS

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e12cce7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      243201  1953512001    7  HPFS/NTFS
Re: mounting usb hard drives
October 06, 2011 07:06AM
Comment out the entries in /etc/fstab. And forget Webmin. We'll need to work this out the old fashion way, via the command line.
Do you have any logging enabled? If not, install busybox-syslogd. It's a pure memory logger so it won't write to your root filesystem.

Unmount both devices and disconnect them.
Open two consoles. In one, run "busybox logread -n"
Connect each drive individually and capture the output. It'll output some stuff about the geometry of the disk, etc. Also fdisk -l for each one individually. Make sure nothing funky is being seen.
Then attempt to manually mount them, individually again. Make sure one disk is blank.
Make sure they each have unique labels and try to mount them by label, using mount -L. Then change /etc/fstab to use the labels.
Re: mounting usb hard drives
October 06, 2011 08:00PM
I commented out the lines in /etc/fstab

I umount on each drive, and disconnected them by removing their usb plug and turning off their power.

Then I tried running busybox as you suggested, and got this:
root@SERVER02:~# busybox logread -n
logread: invalid option -- 'n'
BusyBox v1.17.1 (Debian 1:1.17.1-8) multi-call binary.

Usage: logread [OPTIONS]

Show messages in syslogd's circular buffer

Options:
        -f      Output data as log grows

What am I doing wrong?
Re: mounting usb hard drives
October 10, 2011 08:54AM
Sorry about that. Not sure what the heck I was thinking or how I typo'ed that. The option is definitely "-f" not "-n". It's like the same as "tail -f".
Re: mounting usb hard drives
October 10, 2011 09:38PM
I have done the busybox and fdisk -l for each of the drives individually.

Here is the data for my drive that has the files saved.
This is for my first drive that has been running and has files saved.

Oct 10 22:14:16 SERVER02 user.info kernel: [428869.977595] usb 1-1.3.4: new full speed 

USB device using orion-ehci and address 12
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.087802] usb 1-1.3.4: not running at 

top speed; connect to a high speed hub
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.096803] usb 1-1.3.4: New USB device 

found, idVendor=13fd, idProduct=1340
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.103995] usb 1-1.3.4: New USB device 

strings: Mfr=1, Product=2, SerialNumber=3
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.111633] usb 1-1.3.4: Product: 

HD204UI
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.116537] usb 1-1.3.4: Manufacturer: 

FANTOM
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.121186] usb 1-1.3.4: SerialNumber: 

533248474A31435A38313836
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.129733] usb 1-1.3.4: configuration 

#1 chosen from 1 choice
Oct 10 22:14:16 SERVER02 user.info kernel: [428870.139559] scsi8 : SCSI emulation for 

USB Mass Storage devices
Oct 10 22:14:16 SERVER02 user.debug kernel: [428870.148885] usb-storage: device found 

at 12
Oct 10 22:14:16 SERVER02 user.debug kernel: [428870.148896] usb-storage: waiting for 

device to settle before scanning

Oct 10 22:14:21 SERVER02 user.debug kernel: [428875.147567] usb-storage: device scan 

complete
Oct 10 22:14:21 SERVER02 user.notice kernel: [428875.148261] scsi 8:0:0:0: Direct-

Access     FANTOM   HD204UI          2.10 PQ: 0 ANSI: 4
Oct 10 22:14:21 SERVER02 user.notice kernel: [428875.161364] sd 8:0:0:0: [sdb] 

3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
Oct 10 22:14:21 SERVER02 user.notice kernel: [428875.179220] sd 8:0:0:0: [sdb] Write 

Protect is off
Oct 10 22:14:21 SERVER02 user.debug kernel: [428875.184133] sd 8:0:0:0: [sdb] Mode 

Sense: 21 00 00 00
Oct 10 22:14:21 SERVER02 user.err kernel: [428875.184143] sd 8:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 22:14:21 SERVER02 user.err kernel: [428875.192449] sd 8:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 22:14:21 SERVER02 user.info kernel: [428875.198844]  sdb:
Oct 10 22:14:21 SERVER02 user.info kernel:  sdb1
Oct 10 22:14:21 SERVER02 user.err kernel: [428875.220475] sd 8:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 22:14:21 SERVER02 user.notice kernel: [428875.226696] sd 8:0:0:0: [sdb] Attached 

SCSI disk
Oct 10 22:14:22 SERVER02 user.info usbmount[4772]: /dev/sdb does not contain a 

filesystem or disklabel

FDISK -L issued ****************************************************************


root@SERVER02:~# fdisk -l

Disk /dev/sda: 16.0 GB, 16001269760 bytes
72 heads, 8 sectors/track, 54257 cylinders
Units = cylinders of 576 * 512 = 294912 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       47473    13672220   83  Linux
/dev/sda2           47474       54257     1953792   82  Linux swap / Solaris

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e12cce7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001    7  HPFS/NTFS
root@SERVER02:~#


This is what I have from teh second drive that has just recently been connected to the system.

This is for my second drive that was recently purchased and has almost no files saved.

Oct 10 21:53:50 SERVER02 user.info kernel: [427643.868568] usb 1-1.3.3: new full speed 

USB device using orion-ehci and address 11
Oct 10 21:53:50 SERVER02 user.info kernel: [427643.978932] usb 1-1.3.3: not running at 

top speed; connect to a high speed hub
Oct 10 21:53:50 SERVER02 user.info kernel: [427643.987926] usb 1-1.3.3: New USB device 

found, idVendor=13fd, idProduct=1340
Oct 10 21:53:50 SERVER02 user.info kernel: [427643.995117] usb 1-1.3.3: New USB device 

strings: Mfr=1, Product=2, SerialNumber=3
Oct 10 21:53:50 SERVER02 user.info kernel: [427644.002756] usb 1-1.3.3: Product: 

HD204UI
Oct 10 21:53:50 SERVER02 user.info kernel: [427644.007652] usb 1-1.3.3: Manufacturer: 

FANTOM
Oct 10 21:53:50 SERVER02 user.info kernel: [427644.012302] usb 1-1.3.3: SerialNumber: 

533248374A394B4237313136
Oct 10 21:53:50 SERVER02 user.info kernel: [427644.020737] usb 1-1.3.3: configuration 

#1 chosen from 1 choice
Oct 10 21:53:50 SERVER02 user.info kernel: [427644.030587] scsi7 : SCSI emulation for 

USB Mass Storage devices
Oct 10 21:53:50 SERVER02 user.debug kernel: [427644.039890] usb-storage: device found 

at 11
Oct 10 21:53:50 SERVER02 user.debug kernel: [427644.039900] usb-storage: waiting for 

device to settle before scanning

Oct 10 21:53:55 SERVER02 user.debug kernel: [427649.038577] usb-storage: device scan 

complete
Oct 10 21:53:55 SERVER02 user.notice kernel: [427649.039270] scsi 7:0:0:0: Direct-

Access     FANTOM   HD204UI          2.10 PQ: 0 ANSI: 4
Oct 10 21:53:55 SERVER02 user.notice kernel: [427649.052628] sd 7:0:0:0: [sdb] 

3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
Oct 10 21:53:55 SERVER02 user.notice kernel: [427649.071846] sd 7:0:0:0: [sdb] Write 

Protect is off
Oct 10 21:53:55 SERVER02 user.debug kernel: [427649.076758] sd 7:0:0:0: [sdb] Mode 

Sense: 21 00 00 00
Oct 10 21:53:55 SERVER02 user.err kernel: [427649.076767] sd 7:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 21:53:55 SERVER02 user.err kernel: [427649.085073] sd 7:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 21:53:55 SERVER02 user.info kernel: [427649.091471]  sdb:
Oct 10 21:53:55 SERVER02 user.info kernel:  sdb1
Oct 10 21:53:55 SERVER02 user.err kernel: [427649.116116] sd 7:0:0:0: [sdb] Assuming 

drive cache: write through
Oct 10 21:53:55 SERVER02 user.notice kernel: [427649.122376] sd 7:0:0:0: [sdb] Attached 

SCSI disk
Oct 10 21:53:56 SERVER02 user.info usbmount[4584]: /dev/sdb does not contain a 

filesystem or disklabel

FDISK -L issued *************************************************************

root@SERVER02:~# fdisk -l

Disk /dev/sda: 16.0 GB, 16001269760 bytes
72 heads, 8 sectors/track, 54257 cylinders
Units = cylinders of 576 * 512 = 294912 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       47473    13672220   83  Linux
/dev/sda2           47474       54257     1953792   82  Linux swap / Solaris

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e12cce7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      243201  1953512001    7  HPFS/NTFS
root@SERVER02:~#

Did I get the data you asked for?

Thanks for helping.
Re: mounting usb hard drives
October 11, 2011 08:25AM
So far, so good...
They appear to be the same exact model number of Fantom drive (HD204UI) and they are correctly being identified as different drives, as they both report unique serial numbers:

533248474A31435A38313836
533248374A394B4237313136

I don't believe that disk identifier is a problem. I suspect they came from the factory pre-formatted as NTFS and that value is stored in the MBR. They likely wipe the disks and then write some disk image.

I suggest you give them labels and change fstab to mount them by label. (You could use ntfslabel under Linux, or connect them to a Windows machine and name them there.) I consider this a best practice because the drives could potentially spin up in a different order, swapping /dev/sdX device names.

/etc/fstab would look like this, assuming labels Fantom01, Fantom02.

LABEL=Fantom01 /mnt/fantom01 ntfs-3g defaults 0 0
LABEL=Fantom02 /mnt/fantom02 ntfs-3g defaults 0 0

Mount both, and then do a "df -h".

** edit **
I happen to have a handful of Fantom Drives, and what do you know, one of them is an HD204UI.
And look what fdisk reports, the same disk identifier :)

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e12cce7

Device Boot Start End Blocks Id System
/dev/sdd1 1 243201 1953512001 7 HPFS/NTFS



Edited 1 time(s). Last edit at 10/11/2011 08:43AM by kraqh3d.
Re: mounting usb hard drives
October 15, 2011 11:57PM
I finally found some time to set the labels on my two fantom drives. I now have them both available and showing the correct files.

Thank you for guiding me through a new learning experience. I do have some questions.

Webmin now shows the two drives twice when I look at Disk and Network File systems. The first entries show:

Mounted as Type Location Used In use? ↓ Saved?
/mnt/fantom02 NTFS-3G Partition labelled Fantom02 0% No Yes
/mnt/fantom01 NTFS-3G Partition labelled Fantom01 49% No Yes

the second set of entries are:

Mounted as Type ↓ Location Used In use? Saved?
/mnt/fantom02 FUSEBLK SCSI device C partition 1 0% Yes No
/mnt/fantom01 FUSEBLK SCSI device B partition 1 49% Yes No

So the first entries are not in use, but are saved. Is this just the partition information?

The second set of entries are type FUSEBLK and these are in use but not saved. What is FUSEBLK? Are these entries not saved because they are mounted with fstab and may not be present?

Do you have any suggestions where i should look to set these two drives as mirrored?



Edited 1 time(s). Last edit at 10/15/2011 11:59PM by oldman.
Re: mounting usb hard drives
October 16, 2011 07:39AM
oldman Wrote:
-------------------------------------------------------
> What is FUSEBLK?

http://ubuntuforums.org/showthread.php?t=1096841

> Do you have any suggestions where i should look to
> set these two drives as mirrored?

Google for "debian raid"
Re: mounting usb hard drives
October 16, 2011 08:03AM
I don't use Webmin. I don't know why it's showing that but it is sort of correct. It is NTFS-3G which uses FUSE (either internally or externally.) I suppose Webmin is building it's table by combining /etc/fstab (which needs type ntfs-3g) with the actual mounts from the mount command (which will report the type as fuseblk).

What do you mean by mirror? You *could* mirror them using the md driver but I don't expect it to work very well for usb attached drives. And you would have to start over pretty much from scratch, loosing your existing data, so I don't think you want to do that.

Assuming you only use fantom01 as your source drive, you can set up an cron job to rsync fantom01 to fantom02 every day. Just don't write anything to fantom02. If you want to share both on the network, you should set fantom02 read-only (and I would suggest unbrowsable as well) in smb.conf.



Edited 1 time(s). Last edit at 10/17/2011 07:42AM by kraqh3d.
Re: mounting usb hard drives
October 16, 2011 04:01PM
I thank you for the suggestions.

Now I will play with my new hard drive and see how things work.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: