themossinator
Posts: 41
Joined: Thu Feb 07, 2013 3:58 pm

Problems getting external USB HD to mount on Raspbian

Wed Jan 03, 2018 3:58 pm

Hi, im attempting to run a full bitcoin node on my old rpi2 but so far it has been a disaster and have got nowhere with it over the last 2 weeks

Im on Raspbian stretch 4.9, hd is Seagate Expansion 4TB, formatted as EXT4 on Windows, no partitions created

running some commands

Code: Select all

sudo fdisk -l

Disk /dev/sda: 3.7 TiB, 4000787029504 bytes, 7814037167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B87FD9C7-7435-46A9-AA22-B9D8E4612F34

Device     Start        End    Sectors  Size Type
/dev/sda1     34 7814037132 7814037099  3.7T Microsoft basic data

Partition 1 does not start on physical sector boundary.

Code: Select all

sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate Expansion (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  4001GB  4001GB                     msftdata


Code: Select all

sudo mount /dev/sda1 /mnt/volume
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.

Code: Select all

sudo blkid
/dev/mmcblk0p1: LABEL="boot" UUID="0298-4814" TYPE="vfat" PARTUUID="58ed904f-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="d4f0fd64-ad9d-4cfd-aa76-8d3541fbf008" TYPE="ext4" PARTUUID="58ed904f-02"
/dev/mmcblk0: PTUUID="58ed904f" PTTYPE="dos"
/dev/sda1: PARTUUID="e68a5b38-230a-f1bc-4891-36780f638e4d"
kinda at my wits end with this and about to give up and try a different platform, Id really like to use the pi however due to its low power usage, any pointers on how to get this working would be greatly appreciated, thank you :oops:

fbe
Posts: 82
Joined: Thu Aug 17, 2017 9:08 pm

Re: Problems getting external USB HD to mount on Raspbian

Wed Jan 03, 2018 8:46 pm

If your disc is formatted by Windows the filesystem is quite sure not EXT4. Check it in Windows again. If the filesystem is exFAT install exfat-fuse, if it's ntfs install ntfs-3g on your RPi. If it's ext4 your RPi may be confused by the partition type "Microsoft basic data".

It would be better to recreate the partition and ext4 filesystem on your disk with your RPi, if you don't want to use it on your Windows machine anymore.

User avatar
thagrol
Posts: 366
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: Problems getting external USB HD to mount on Raspbian

Wed Jan 03, 2018 10:11 pm

MIght be that the disk has been set up via GPT rather than MBR. I notice that it's 4TB? GPT disks should work on linux though.

Has it been formatted?

And did you look at the ouput of

Code: Select all

dmesg|tail
as suggested in the error message?

How did you format to ext4 on windows? Ext4 is not a windows format (or a windows supported one). Setting the partition type is not the same as formatting it.

You say "no partitions created", that could be the problem right there. You need at least one. Though given that fdisk -l reports a partition it's more like not formatted.

Wikipedia has this to say about "Microsoft basic data partitions": https://en.wikipedia.org/wiki/Microsoft ... _partition

Apparently, fdisk may not support GPT disks, what does

Code: Select all

sudo parted -l
report for that disk?

Oh and raspbian should support FAT and ntfs out of the box, though without ntfs-3g you won't be able to write to an ntfs partition.

themossinator
Posts: 41
Joined: Thu Feb 07, 2013 3:58 pm

Re: Problems getting external USB HD to mount on Raspbian

Thu Jan 04, 2018 1:16 pm

thanks for your help guys

Ive taken the drive and reformatted it in Windows as exFAT

Code: Select all

sudo parted -l
Model: Seagate Expansion (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  4001GB  4001GB                     msftdata
so yes the partition table does appear to be GPT format, think this is because the disk is >2Tb

Code: Select all

sudo blkid
/dev/mmcblk0p1: LABEL="boot" UUID="0298-4814" TYPE="vfat" PARTUUID="58ed904f-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="d4f0fd64-ad9d-4cfd-aa76-8d3541fbf008" TYPE="ext4" PARTUUID="58ed904f-02"
/dev/mmcblk0: PTUUID="58ed904f" PTTYPE="dos"
/dev/sda1: UUID="60F9-C990" TYPE="exfat" PARTUUID="e68a5b38-230a-f1bc-4891-36780f638e4d"
and now it sees type as exfat in blkid, so should be good?

attempt to mount

Code: Select all

sudo mount /dev/sda1 /mnt/volume
mount: unknown filesystem type 'exfat'
ok, not good

Code: Select all

sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate Expansion (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  4001GB  4001GB                     msftdata
no filesystem listed, so create a filesystem, i went with ext4 as native to Linux?

Code: Select all

 sudo mkfs.ext4 /dev/sda1 -L untitled
mke2fs 1.43.4 (31-Jan-2017)
/dev/sda1 contains a exfat file system
Proceed anyway? (y,N) y
/dev/sda1 alignment is offset by 3072 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Creating filesystem with 976754637 4k blocks and 244195328 inodes
Filesystem UUID: 35d81470-73b2-464d-a083-e7bb09d20c12
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
appears the partition is not aligned, does anyone know how to rectify this? I am now able to mount the drive but I would prefer to have the drive operating at max performance
thanks :)

themossinator
Posts: 41
Joined: Thu Feb 07, 2013 3:58 pm

Re: Problems getting external USB HD to mount on Raspbian

Thu Jan 04, 2018 10:20 pm

somehow i got it to work with partition alignment errors - on to the next step!

Return to “Troubleshooting”

Who is online

Users browsing this forum: piglet, superbob666 and 56 guests