Any reason I should not connect to Unraid via SMB on Mac?


Recommended Posts

So I just recently set up my unraid server, cleared all my drives, ran all my parity checks and started copying my files. After coming home from work today I find an error saying something along the lines of "files couldn't be copied because you lack the permissions or the files are locked". OK, weird error. I restart my mac mini and my server, and then try connecting again. Then I get "Something wrong with the volume's CNID DB". I've googled around, and all of the answers to the problem involve shit I can't do. I can't telnet into the server, I can't find the directories I'm supposed to find. I don't know anything about Linux, so all of the commands are things that if I can't copy and paste it's really literally pointless. However, I tried disabling AFP and enabling SMB and I can connect fine. The only question I have is, what are the downsides? Is there anything that I can't do with SMB on a Mac (this is the only machine on the network) that I can't do with AFP? Is there any potential for error? If not, I think that this is a way better option for me because I can't seem to be able to fix the CNID DB error no matter what I try to do. Thanks in advance for your help and I'm sorry for being such a newbie at this stuff.

Link to comment

Unmount any open AFP shares, disable AFP in the unraid settings and run this command in a terminal session without the quotes: "rm -R ./.[Aa]pple*" Let this complete, reenable AFP and try connecting again.

 

You won't cause problems using SMB on a Mac but using AFP will get you substantially better performance and if you want to use your unraid server as a Time Machine destination you need to use AFP anyway. The only time I access my server via SMB on my Macs is if I want to access a share set as hidden. AFP can't do this.

Link to comment

You won't cause problems using SMB on a Mac but using AFP will get you substantially better performance and if you want to use your unraid server as a Time Machine destination you need to use AFP anyway.

I dare to disagree. In my case (MBP running 10.8.0 to 10.8.3) AFP was nothing but trouble. It was painfully slow, caused Finder to crash and kept disks from spinning down if I left any shares mounted when shutting down my laptop. And don't even get me started on TimeMachine...

I switched to SMB and couldn't believe how well it worked. Sure, I can't use TM, but it was unusable in the first place.

I admit this was around RC5-RC8, so maybe I should give newer RCs a shot

Link to comment

You won't cause problems using SMB on a Mac but using AFP will get you substantially better performance and if you want to use your unraid server as a Time Machine destination you need to use AFP anyway.

I dare to disagree. In my case (MBP running 10.8.0 to 10.8.3) AFP was nothing but trouble. It was painfully slow, caused Finder to crash and kept disks from spinning down if I left any shares mounted when shutting down my laptop. And don't even get me started on TimeMachine...

I switched to SMB and couldn't believe how well it worked. Sure, I can't use TM, but it was unusable in the first place.

I admit this was around RC5-RC8, so maybe I should give newer RCs a shot

 

This has also been my experience of using AFP (in unraid).  SMB has been much more reliable.

Link to comment

Enter "ls" when in /mnt/.

 

What does ls show?

 

It says the command is not found. I'm not running time machine and only serving content to one device really. If there is no huge downside or risk of data corruption then I might just stick with SMB since my technical knowledge is pretty low and I don't think I'm going to be able to fix this issue.

Link to comment

Enter "ls" when in /mnt/.

 

What does ls show?

 

It says the command is not found. I'm not running time machine and only serving content to one device really. If there is no huge downside or risk of data corruption then I might just stick with SMB since my technical knowledge is pretty low and I don't think I'm going to be able to fix this issue.

 

Please paste the terminal session.

Link to comment

You won't cause problems using SMB on a Mac but using AFP will get you substantially better performance and if you want to use your unraid server as a Time Machine destination you need to use AFP anyway.

I dare to disagree. In my case (MBP running 10.8.0 to 10.8.3) AFP was nothing but trouble. It was painfully slow, caused Finder to crash and kept disks from spinning down if I left any shares mounted when shutting down my laptop. And don't even get me started on TimeMachine...

I switched to SMB and couldn't believe how well it worked. Sure, I can't use TM, but it was unusable in the first place.

I admit this was around RC5-RC8, so maybe I should give newer RCs a shot

 

 

Stange, I've been using 5.0 with AFP since the early betas and never had these issues. I also don't use Time Machine though. I back up my Macs to disk images using Carbon Copy Cloner over AFP. I've tried it over SMB too and definitely get better speeds with AFP.

Link to comment

Sorry I haven't been able to reply here, work has been insane. Thanks to everyone for taking the time to help me out with this stuff. I feel like an idiot with all of this stuff...

 

Here is my log:

 

root@Tower:~#

root@Tower:~# rm -R ./.[Aa]pple*

rm: cannot remove `./.[Aa]pple*': No such file or directory

root@Tower:~# cd /mnt/user/server

-bash: cd: /mnt/user/server: No such file or directory

root@Tower:~# cd /mnt/

root@Tower:/mnt# rm -R ./.[Aa]pple*

rm: cannot remove `./.[Aa]pple*': No such file or directory

root@Tower:/mnt# cd /user/

-bash: cd: /user/: No such file or directory

 

Part 2

 

root@Tower:~# rm -rf .Apple*

root@Tower:~# rm -rf .apple*

root@Tower:~# rm -R ./.[Aa]pple*

rm: cannot remove `./.[Aa]pple*': No such file or directory

root@Tower:~# cd /mnt/

root@Tower:/mnt# is

-bash: is: command not found

root@Tower:/mnt# is

-bash: is: command not found

root@Tower:/mnt# /usr/

-bash: /usr/: is a directory

root@Tower:/mnt# /user/

-bash: /user/: No such file or directory

Link to comment

The command is ls (el ess) to show a directory listing.

 

Once you've telnet'd in type the following one line at a time:

 

cd /mnt/user/
rm -R ./.[Aa]pple*

 

This should remove those directories from all your shares. If not you may have to do each share individually.

 

To prevent these from being created in the future, unfortnately, it looks like the only way is to install a prefpane called "Blue Harvest" on each of your Macs. A license is $15 bucks and should be valid for all your Macs.

Link to comment

it still says the directory is not a directory.

 

Now in the meantime I've locked myself out of the server. I can't create any directories or copy any files because it constantly tells me that "this operation could not be completed because you don't have the necessary permission" I've deleted the users, turned off and restarted the server, turned off and turned back on shares; basically anything I can think of to do. Is there any way to get out of this? Googling the error message doesn't turn up anything.

 

Edit - I think I'm just going to use SMB (performance isn't terribly important as long as it will stream full HD) and call it a day. If I can get to where I can copy shit over to the server again I'm not touching the settings ever again!

 

This is what the log says:

tail -n 40 -f /var/log/syslog

Apr 4 20:44:56 Tower emhttp: shcmd (633): /usr/local/sbin/emhttp_event svcs_restarted

Apr 4 20:44:56 Tower emhttp_event: svcs_restarted

Apr 4 20:45:13 Tower shfs/user: shfs_mkdir: create_path: /mnt/disk2/Server Server/untitled folder /mnt/disk1/Server (30) Read-only file system

Apr 4 20:45:48 Tower last message repeated 3 times

Apr 4 20:50:01 Tower emhttp: shcmd (634): /usr/local/sbin/emhttp_event stopping_svcs

Apr 4 20:50:01 Tower emhttp_event: stopping_svcs

Apr 4 20:50:01 Tower emhttp: shcmd (635): ps axc | grep -q rpc.mountd

Apr 4 20:50:01 Tower emhttp: _shcmd: shcmd (635): exit status: 1

Apr 4 20:50:01 Tower emhttp: Stop SMB...

Apr 4 20:50:01 Tower emhttp: shcmd (636): /etc/rc.d/rc.samba stop |& logger

Apr 4 20:50:01 Tower emhttp: shcmd (637): set -o pipefail ; umount /mnt/user |& logger

Apr 4 20:50:01 Tower emhttp: shcmd (638): rmdir /mnt/user |& logger

Apr 4 20:50:01 Tower emhttp: shcmd (639): crontab -c /etc/cron.d -d &> /dev/null

Apr 4 20:50:01 Tower emhttp: shcmd (640): crontab -c /etc/cron.d -d &> /dev/null

Apr 4 20:50:01 Tower emhttp: shcmd (641): mkdir /mnt/user

Apr 4 20:50:01 Tower emhttp: shcmd (642): /usr/local/sbin/shfs /mnt/user -disks 16777214 -o noatime,big_writes,allow_other,use_ino

Apr 4 20:50:01 Tower emhttp: shcmd (643): crontab -c /etc/cron.d -d &> /dev/null

Apr 4 20:50:01 Tower emhttp: shcmd (644): :>/etc/samba/smb-shares.conf

Apr 4 20:50:01 Tower emhttp: Start SMB...

Apr 4 20:50:01 Tower emhttp: shcmd (645): /etc/rc.d/rc.samba start |& logger

Apr 4 20:50:01 Tower logger: Starting Samba: /usr/sbin/nmbd -D

Apr 4 20:50:01 Tower logger: /usr/sbin/smbd -D

Apr 4 20:50:01 Tower emhttp: shcmd (646): ps axc | grep -q rpc.mountd

Apr 4 20:50:01 Tower emhttp: _shcmd: shcmd (646): exit status: 1

Apr 4 20:50:01 Tower emhttp: shcmd (647): /usr/local/sbin/emhttp_event svcs_restarted

Apr 4 20:50:01 Tower emhttp_event: svcs_restarted

Apr 4 20:50:12 Tower shfs/user: shfs_mkdir: create_path: /mnt/disk2/Server Server/untitled folder /mnt/disk1/Server (30) Read-only file system

Apr 4 20:50:35 Tower last message repeated 2 times

Apr 4 20:51:33 Tower emhttp: shcmd (648): mkdir '/mnt/user/Test'

Apr 4 20:51:33 Tower shfs/user: shfs_mkdir: mkdir: /mnt/disk2/Test (30) Read-only file system

Apr 4 20:51:33 Tower emhttp: _shcmd: shcmd (648): exit status: 1

Apr 4 20:51:33 Tower emhttp: shcmd (649): rm '/boot/config/shares/Test.cfg'

Apr 4 20:51:33 Tower emhttp: shcmd (650): :>/etc/samba/smb-shares.conf

Apr 4 20:51:33 Tower emhttp: Restart SMB...

Apr 4 20:51:33 Tower emhttp: shcmd (651): killall -HUP smbd

Apr 4 20:51:33 Tower emhttp: shcmd (652): ps axc | grep -q rpc.mountd

Apr 4 20:51:33 Tower emhttp: _shcmd: shcmd (652): exit status: 1

Apr 4 20:51:33 Tower emhttp: shcmd (653): /usr/local/sbin/emhttp_event svcs_restarted

Apr 4 20:51:33 Tower emhttp_event: svcs_restarted

Apr 4 20:52:30 Tower shfs/user: shfs_mkdir: create_path: /mnt/disk2/Server Server/untitled folder /mnt/disk1/Server (30) Read-only file system

 

How did I make this read only? That's not even an option for me..... I have export set to "on", and security set to "public"

 

Another thing I just noticed. Before when I would click on "get info" it would tell me in the permissions section that I had read and write permissions. Now it tells me that I have "custom access" but finder doesn't have any info on what that means.

Link to comment

Both disk1 and disk2 apparently have read-only file systems.  (linux marks them as read-only when file-system corruption is detected. )  That is probably the underlying reason for your inability to create files, directories, and files..

 

You'll need to run

reiserfsck

as described in the wiki on /dev/md1 and /dev/md2

and fix the corruption.

 

Link to comment

You won't cause problems using SMB on a Mac but using AFP will get you substantially better performance and if you want to use your unraid server as a Time Machine destination you need to use AFP anyway.

I dare to disagree. In my case (MBP running 10.8.0 to 10.8.3) AFP was nothing but trouble. It was painfully slow, caused Finder to crash and kept disks from spinning down if I left any shares mounted when shutting down my laptop. And don't even get me started on TimeMachine...

I switched to SMB and couldn't believe how well it worked. Sure, I can't use TM, but it was unusable in the first place.

I admit this was around RC5-RC8, so maybe I should give newer RCs a shot

Never got AFP to work either. Always just hangs or is horribly slow. Never figured it out.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.