I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2

In the past I have used this exact product, but the 128GB version, formatted as FAT32 on my OSX machine, and the drive worked with no issues on the Pi. I'm using it store the Bitcoin blockchain. Now that the blockchain is too big I'm trying to replace the drive with a 512GB drive, and I am having no luck getting this thing to work!

I first tried the OSX FAT32 format, but that didn't work. So I'm trying to format it with the Pi itself.

Starting off with fdisk /dev/sda as sudo su with USB drive unmounted:

/dev/sda1           2 1000215215 1000215214  477G  b W95 FAT32

Then I go through the process of [d]elete, [n]ew, [w]rite:

/dev/sda1        2048 1000215215 1000213168  477G 83 Linux

but even after a partprobe AND a reboot, fdisk -l still reports no change:

/dev/sda1           2 1000215215 1000215214  477G  b W95 FAT32

... am I doing anything wrong up to this point? I also went forward with mfks.ext4 /dev/sda1 and still don't see anything changing (I can post those logs too...) And when I run fsck it is a TOTAL BLOODBATH -- which is even more confusing! How can a freshly formatted, brand new file-system have so many errors? Stuff like this (selected examples out of hundreds):

Inode 138789 has a extra size (30700) which is invalid 
Inode 138825 has a bad extended attribute block 17929510.
Inode 138877 has compression flag set on filesystem without compression support.
Inode 139153 has a extra size (6956) which is invalid

Finally, when I attach the drive my OSX machine I can format it and use it and it works FINE. So I think the drive is not defective.

  • Maybe try parted? – Dmitry Kudriavtsev Jan 17 '17 at 19:33
  • Maybe using dd if=/dev/zero of=/dev/sda bs=1M count=5 to zero out the first 5MB of the device will help? Be very sure to check the of parameter! – icarus Jan 17 '17 at 19:59
  • @DmitryKudriavtsev same behavior with parted. It looks like I am deleting and creating new partitions and filesystems but when I restart parted and print it shows no change! Do I have a defective drive? – pinhead Jan 17 '17 at 20:08
  • What about gdisk instead of fdisk? Your disk may have a hybrid GPT partition table. – xhienne Jan 17 '17 at 21:24
  • @xhienne Just installed and tried gdisk, and again it looks like I'm deleting and writing but on relaunch it only reports a FAT32 partition. gdisk also indicated MBR: MBR only / BSD: not present / APM: not present / GPT: not present – pinhead Jan 17 '17 at 21:30

out of the top of my head, using parted and vfat fs (assuming you need windows compatibility):

NOTE: assuming /dev/sda is your drive to be formatted (!)

(parted) select /dev/sda
(parted) mklabel gpt
(parted) mkpart 
--> pick a name <enter> 
--> pick an fs (ext2 will do) <enter>
0% <enter> 
100% <enter>

The above should show you you've create a single partition using the full size of the drive. Next we'll create the filesystem:

mkfs.vfat /dev/sda1

Should work. If not let me know, provide output so we can all see what went wrong and try and help you.

  • OK I'm having some luck with this but not total success. I think the other tutorials I saw didn't include mklabel so I kept reusing the same partition table. Is gpt the best option? After running Bitcoin for a several minutes, it started returning tons of database corruption issues again (with an ext2 format) so I'll try ext4 and maybe even FAT again. – pinhead Jan 20 '17 at 0:13
  • This was the most helpful comment, so bounty. However I still can not get a large SSD to run smoothly on the pi. I'm on my second brand: amazon.com/PNY-Elite-480GB-Portable-Solid/dp/B01GQPXB3U/r and I'm going to try a variety of volume formats but so far nothing works as well as the original 128GB drive – pinhead Jan 27 '17 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.