Mounting an external HDD


9 posts
by qbertsuit » Mon Apr 08, 2013 5:53 pm
I'm having some difficulty accessing an external HDD on my pi. It's a 1TB Seagate connected through a USB hub. It works fine on Ubuntu and Windows, but I can't get it to work on the pi.

I'm following this tutorial
http://myskypi.no-ip.org/data/_uploaded ... 0howto.pdf

When i run dmesg I find the HDD:

[ 3.765054] usb 1-1.2.2: New USB device found, idVendor=0bc2, idProduct=2320
[ 3.776584] usb 1-1.2.2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 3.787782] usb 1-1.2.2: Product: Expansion
[ 3.793927] usb 1-1.2.2: Manufacturer: Seagate
[ 3.800256] usb 1-1.2.2: SerialNumber:
[ 3.809931] scsi0 : usb-storage 1-1.2.2:1.0
[ 4.814281] scsi 0:0:0:0: Direct-Access Seagate Expansion 0608 PQ: 0 ANSI: 6
[ 4.840540] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/931 GiB)
[ 4.864056] sd 0:0:0:0: [sda] Write Protect is off
[ 4.870701] sd 0:0:0:0: [sda] Mode Sense: 4f 00 00 00
[ 4.874068] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.918082] sda: sda1
[ 4.936525] sd 0:0:0:0: [sda] Attached SCSI disk

When I run "sudo mount -a":

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Then I run "dmesg | tail":

[ 15.783347] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 15.801978] FAT-fs (sda1): Unrecognized mount option "uid=raspbian" or missing value
[ 20.116289] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 24.294039] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SS
[ 292.252997] FAT-fs (sda1): Unrecognized mount option "uid=raspbian" or missing value

Could anyone help me in the right direction? Thanks!
Posts: 4
Joined: Mon Apr 08, 2013 5:48 pm
by lmarmisa » Mon Apr 08, 2013 11:24 pm
Open a terminal, type these commands and post here the results (be sure the external USB drive is connected):

Code: Select all
sudo fdisk -l
sudo blkid


Best regards,

Luis
User avatar
Posts: 170
Joined: Thu Feb 14, 2013 2:22 am
Location: Madrid, Spain
by DirkS » Tue Apr 09, 2013 12:58 am
When I run "sudo mount -a":

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Then I run "dmesg | tail":

[ 15.783347] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 15.801978] FAT-fs (sda1): Unrecognized mount option "uid=raspbian" or missing value
[ 20.116289] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 24.294039] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SS
[ 292.252997] FAT-fs (sda1): Unrecognized mount option "uid=raspbian" or missing value

A couple of things:
1. what is the file system used on the HD? Should be the same as reported by 'fdisk -l' )
2. Are you using user id 'raspbian' (that's the one that's apparently in fstab) or 'pi' (which is the default in Raspbian wheezy).

Gr.
Dirk.
Posts: 376
Joined: Tue Jun 19, 2012 9:46 pm
Location: Staffordshire, UK
by qbertsuit » Tue Apr 09, 2013 5:56 pm
Dirks: I blindly followed the tutorial :oops: Changed to "uid=pi" and now when I run "sudo mount -a" followed by "dmesg | tail " I get this:

[ 10.702841] bcm2835 ALSA chip created!
[ 10.710567] bcm2835 ALSA chip created!
[ 10.718305] bcm2835 ALSA chip created!
[ 10.726018] bcm2835 ALSA chip created!
[ 15.076291] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[ 15.104807] FAT-fs (sda1): Unrecognized mount option "uid=raspbian" or missing value
[ 19.432105] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 23.562431] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SS
[ 782.563216] FAT-fs (sda1): bogus number of reserved sectors
[ 782.563246] FAT-fs (sda1): Can't find a valid FAT filesystem

Runninf sudo fdisk -l:


Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f06a6

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 3788799 1832960 83 Linux
/dev/mmcblk0p3 3788800 31116287 13663744 83 Linux

Disk /dev/sda: 1000.2 GB, 1000204885504 bytes
26 heads, 24 sectors/track, 3130649 cylinders, total 1953525167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4d8550bb

Device Boot Start End Blocks Id System
/dev/sda1 2048 1953521663 976759808 7 HPFS/NTFS/exFAT

sudo blkid:

/dev/mmcblk0p1: SEC_TYPE="msdos" UUID="8Bxxxx2" TYPE="vfat"
/dev/mmcblk0p2: UUID="29bxxxxxxxxxxxxxxxxxxxxxxxx021cc" TYPE="ext4"
/dev/mmcblk0p3: UUID="05axxxxxxxxxxxxxxxxxxxxd5" TYPE="ext4"
/dev/sda1: LABEL="Seagate Expansion Drive" UUID="xxxxxxxxx" TYPE="ntfs"


I'm guessing this means my drive is NTFS and I have to reformat it? What's the next step? Thank you for your time guys!
Posts: 4
Joined: Mon Apr 08, 2013 5:48 pm
by DirkS » Tue Apr 09, 2013 6:18 pm
/dev/sda1: LABEL="Seagate Expansion Drive" UUID="xxxxxxxxx" TYPE="ntfs"

Aha... the file system is ntfs. NO need to reformat, you'll just have to change fstab again. change 'vfat' (or whatever is used) to 'ntfs-3g'.

I think the driver for ntfs-3g is already installed by default (at least on Raspbian wheezy), but if not you can run:
Code: Select all
sudo apt-get install ntfs-3g


HTH
Dirk.
Posts: 376
Joined: Tue Jun 19, 2012 9:46 pm
Location: Staffordshire, UK
by lmarmisa » Wed Apr 10, 2013 10:09 am
This link explains how to mount a ntfs partition at startup:

viewtopic.php?p=215536#p215536
User avatar
Posts: 170
Joined: Thu Feb 14, 2013 2:22 am
Location: Madrid, Spain
by qbertsuit » Thu Apr 11, 2013 7:36 pm
Thank you so much! Got it working now! :D
Posts: 4
Joined: Mon Apr 08, 2013 5:48 pm
by qbertsuit » Thu Apr 11, 2013 8:31 pm
Although it's working, transfer to my HDD is really slow. I'm getting around 500 kb/s from Ubuntu and Mac OS. Is this because of NTFS 3g?
Posts: 4
Joined: Mon Apr 08, 2013 5:48 pm
by DirkS » Thu Apr 11, 2013 9:15 pm
Could be ntfs or network...

Gr.
Dirk.
Posts: 376
Joined: Tue Jun 19, 2012 9:46 pm
Location: Staffordshire, UK