raspi-NAS setup

I thought I’d share some troubleshooting related items to setting up my raspi-NAS the other night.

File System

Copying Files


exFAT vs NTFS:

The first problem was with the drives.  The USB drives were set for FAT. The problem was that the walk-through was set for NTFS.  The second is the better choice since you can have larger than 4 gig files.  To be honest, I used Windows to reformat the flash drives.  The problem was, I didn’t eject them.  I just pulled them out.  The Pi complained about the file system on mount, and offered to fix it.  I said yes.  Everything appeared to copy fine, just took forever.  But the drive kept randomly “disappearing” when trying to retrieve data, and copying from it would fail. I’d have to pull the drive out of the Pi and plug it back in to see it.  Though it would fail again.

Had to reformat, both drives, and then eject them.

Copying the files:

The first copy from the 128 gig flash to the 256 gig flash was done on the Raspberry Pi using a tar command.  It took over an hour to copy 13 gigs, which then couldn’t be accessed (see problem above).

Why use Tar?  Back when I was more active in maintaining Linux and Unix (Solaris) systems I would use tar over ssh to do the initial copy of data between servers for upgrades.  It was actually a little faster than using rsync over ssh.  It was a trick I also picked up from Linux Server Hacks volume 1, which gave the warning about the speed of Tar vs Rsync for initial copy (I did my own testing on mirrored servers, tar was really faster back then).

Since this was on the same box, I used a modified command.

The second time, I pulled out Linux Server Hacks volume 2, and looked up the backup command from there.  The problem is, I moved the drives to a laptop running Xubuntu with 16 gig of memory.  So multiple changes and not sure if it was the command or the the hardware that sped up the copy.

It was done in a matter of minutes.  And I was able to use the 256 gig to copy to the other 256 gig using the same command, in minutes.

Samba setup:

Other than missing a few steps, like creating the samba user, in the How-To Geek Guide the biggest issue was in the Samba configuration.

The guide said to find the Authentication section and un-comment “security = user”.  That wasn’t there.  After about a half hour of Google searches, I found they made that a default setting for a stand alone server.  Or at least that is the way I understood the entry on the CentOS / Redhat forum.  Seems to hold true for Raspbian as well.

To troubleshoot the user issue, I first installed smbclient to list the shared folders from the raspi-nas, and then went back through the setup section of the guide and found the spot I missed.

Leave a Reply

Your email address will not be published.