Samba shares and USB drives

I am very close to migrating the data on my bulky PC to my new Mac Mini fileserver and mounting the IDE drives in the USB drive brackets. Once I’ve done this, I will have the screenshots and data to write a nice “how to” on using the Mac Mini as a file server. There is however one slight problem which could prove to be a showstopper…

Samba test 1: local directories.
I created a directory in the root of the HD in the mac mini, and made it R/W for everybody. Then, I used SharePoints to make it available to all password-less Guest users on the network (which happens to be the default Windows user for connecting to drives without asking for a password). All was well. I could access the share, and could copy as many files from as many machines imultaniously as I wanted.

Samba test 2: USB mounted volumes.
I mounted a HFS+ formatted USB disk to the Mac Mini, and made it available to the network in the same way as in test 1. Everything seemed to be working fine and as expected, but while running some tests I discovered a strange thing: I can only copy files onto the USB drive from 1 machine at a time, 1 file at a time. When starting a new copy while allready in the process of copying an older file, one or both copy jobs crashed with a “file in use” error.

I am now trying to find out what is causing this problem. I have a firewire drive I can use to determine if it is the USB protocol or driver which is causing this problem, or if it is the fact that it is a mounted volume alltogether. If anybody has tips I’m glad to hear them. Meanwhile I’ll be searching the web…

Update
Using a firewire drive does not solve the problem. I did find some articles on fast user switching which state that only 1 user can access pheripherals at a time. This seems to be related to this problem.

Update 2
Creating a symlink to the mounted volume and sharing the link through samba will not change behaviour. I was expecting this, but tried anyway because it only costs 1 minute to test. Maybe a virtual drive would be an option. I can create virtual RAID disks in OSX, but I don’t want my setup to be complex. This will add to the complexity when recovering from a sever crash. Simple, full and fast recovery from hardware problems is my top priority.

Advertisements

3 Responses to Samba shares and USB drives

  1. […] USB Fat32 drives trouble samba Okay, I found the answer to my problem. Mounting an USB drive on OSX which is formatted as Fat32, will not behave nicely when being […]

  2. Scott says:

    So were you able to get your mac mini file server up and running? I’m about to embark on the same mission and would love to hear how it worked for you (specifically, how fast file access was from off site locations, if you’re able to do that)

  3. rolfje says:

    Hi Scott, yes I actually got rid of all my Windows machines, except for the one laptop that I use for work. My boss requires me to use a Windows machine, and since he paid for it…

    As you may have read in the other post (link in first comment to this post), to get this to work is have HFS+ formatted drives connected through USB. When you use sharepoints to create SMB shares, this will work fine. Network performance is pretty good, I have my iTunes library stored at the fileserver.

    I have noticed that copying files from the fileserver to my local machine is faster than copying files from my local machine to the fileserver. I haven’t found out why, but I can live with the performance as it is right now.

    The great thing is that I store data on the fileserver, and the fileserver backs it up with a cron/rsync script. The fileserver is running Tiger right now, but when SMB is stable enough I will upgrade it to Leopard and then I get TimeMachine to backup my data! Nice!

    I have almost no data at the workstations in my house. When they crash, I don’t loose anything. A few months ago, a disk in the fileserver mini crashed. After I replaced that, 2 more drives crashed (I guess they were from the same batch). I actually survived without loosing *any* data.

    Recovery was done by simply buying a new (bigger) USB drive, and copying back all the data from the backup. I can really recommend this to anybody.

    Bonus tip: I have 1 network share where everybody can write/read. When I store foto’s, I move them to a different directory on the server, and have that directory shared as a read-only SMB share. This way anybody can access the photo’s, but nobody can accidentally drag them into a different folder or delete them. It has been working flawlessly for the past 6 to 7 years, on both the Windows server and now on the Mac Mini fileserver.

    The new Mac Mini fileserver uses 60% less power, is not nearly as hot as the PC while running, and you can’t hear it!

    So if you are planning on buying a cheap second hand PPC Mac Mini with some drives attached to it to use as fileserver: Please do! If you install VNC on it, Leopard will recognize it and you can click the “Share screen” button in the Finder as an added bonus 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s