macOS users - AutoMount your Shares


Recommended Posts

  • Replies 232
  • Created
  • Last Reply

Top Posters In This Topic

Yup

 


Settings for eth0:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes

Link to comment

Sure

 

I ran my old wolcmd script after rebooting both my laptop and shutting down my server.  It started up the server fine:

 

#!/bin/sh

wolcmd 00:1b:21:a4:82:47 192.168.1.73 255.255.255.0 7

 

I think I added 7 to your script when I first installed it, because it didn't have a port? I don't remember, but that's what worked to wake up my server before.

 

Attached is the mount.sh

mount.sh.txt

Link to comment

Well it worked as such in my old script.  And it worked again last night using the old script (I didn't try your script for the wake feature).

 

the errors occurring while trying to mount the drives--plus those Ping errors.

 

And now my User Shares are back to being read-only via AFP.

 

Getting very very frustrated :(

Link to comment

What have you done to your Mac OS within the last few weeks? Something's not right, but it's not the script I'm sorry to say.

 

Try repairing permissions on the Mac, and then work your way forward from there.

 

Might pay to replicate the setup on a clean 10.6 install, with a cleanly setup script.

Link to comment

I can modify it to mount the disks for you if you'd like.

 

Btw, the ping when run through the plist doesn't work--always returns zero packets. When I run mount.sh as myself on command line, it pings then mounts. But the plist then pings, gets nothing back, and in unmounts the shares. I tried to modify ping command but it always times out. Somethings weird...

Link to comment

Why don't you just have one "pr0n" share, and under that, have the different kinds.

 

Then set your split level to 1, and I believe it'll spread out the directories under "pr0n" over different drives.

 

Just included all the disks you want (or exclude the disks you don't want if there's less).

 

Or, do split level 0, and on each drive, create a "pr0n" directory at the root, and the "genre" folder that belongs on that drive.

 

Mount your share, dump the folder/file into the appropriate genre, and it'll write to the appropriate drive.

Link to comment

I can modify it to mount the disks for you if you'd like.

 

Btw, the ping when run through the plist doesn't work--always returns zero packets. When I run mount.sh as myself on command line, it pings then mounts. But the plist then pings, gets nothing back, and in unmounts the shares. I tried to modify ping command but it always times out. Somethings weird...

 

Something definitely is weird. Again, not the script. I'd check and make sure that you're running the script from your *user*/LaunchAgents folder. Also, please configure a freshly downloaded script and try that. If those don't fix it, you'll need to rebuild your computer. The "Plist" is just something to tell the system to run that bash script.

 

Just as a heads up, I've been running this script on multiple machines & servers, ranging from 10.5-10.6 without issue.

 

Also, please don't modify the script for others. This script is pretty solid in its current state. I don't want segregation of scripts, ads more to support time. Mounting both AFP and SMB from the same unRAID server isn't recommended practice. Your second comment to ilovegoodnugz was far more helpful  :)

Link to comment

this was working for me yesterday, and I copied all my media across to my unraid. But then I was having all sorts of problems with sickbeard and I think permissions. So I chmodded the shares so sickbeard can create/copy files. I also created user shares with a 'guest' user (don't know if it helped but my macs always seem to connect as 'guest' as default)

 

But now, my mounts have disappeared on my mac mini. But not all of them. Oddly I can still see the media and music shared folders, but not the TV or movies ones. The TV and movies are the only ones with actual content in, the others are empty.

 

tried changing the username in the mount.sh to 'guest' with no password, and if I try running it I get

 

Mounting TV ...
mount_smbfs: mount error: /Volumes/TV: Broken pipe
TV mount failed. Check settings/server. Removing mount point.
*************
photos already mounted
media already mounted

 

 

Link to comment

What shares did you chmod? On unRAID? You shouldn't need to touch the permissions setup, as this probably causes issues with unRAID's security model.

 

Restart both server and client before doing anything else though.

 

Try creating a user, then setting up the shares so they are password protected.

Link to comment

I set up the shares originally, but then sickbeard couldn't create folders. checking the permissions they were just rwx for the user, and nothing for group/other. is that ok?

 

why would unraid care what permissions are on the folders? I had no user accounts setup at the time

 

 

Link to comment

I'll try to rebuild the script from scratch, but I don't understand why my Mac would require a rebuild (though I plan on it for other reasons)

 

if I do 'ping -q -c 1 <TOWER IP>' from the command line--it works.

If I do 'sh mount.sh' from /Scripts/ on the command line--it works.

 

It's just when the .plist executes the script that it shits the bed!

 

But yes, I may wipe out my flash drive (back up first) and start anew on the 5.0b again.

 

Definitely for the weekend, work and freelance have my balls in a jar.

 

And sorry, I won't mod your script.  You're right, and he shouldn't mount his disk shares via the script anyways.  Mount disk shares manually if you have to--or if you need access to your cache/flash shares.  Is there a way to mount the flash share via your script, without manually doing it?

Link to comment

Unsure of the permissions model for unRAID. Take a look and see what the "new permissions" script does in unRAID 5. That will give you a good base to start from. I don't think unRAID uses POSIX permissions for each user. I could be talking crazy here though. As far as I know, it applies a straight permission set over everything, and then applies share permissions afterwards.

Link to comment

I'll try to rebuild the script from scratch, but I don't understand why my Mac would require a rebuild (though I plan on it for other reasons)

 

if I do 'ping -q -c 1 <TOWER IP>' from the command line--it works.

If I do 'sh mount.sh' from /Scripts/ on the command line--it works.

 

It's just when the .plist executes the script that it shits the bed!

 

But yes, I may wipe out my flash drive (back up first) and start anew on the 5.0b again.

 

Definitely for the weekend, work and freelance have my balls in a jar.

 

And sorry, I won't mod your script.  You're right, and he shouldn't mount his disk shares via the script anyways.  Mount disk shares manually if you have to--or if you need access to your cache/flash shares.  Is there a way to mount the flash share via your script, without manually doing it?

 

For all I know, it could be the Mac that is causing the issues. You need to try another machine (even if it's just on a VM) before rebuilding unRAID. You could be wasting your time otherwise ;)

 

LaunchD will just run a script based on where you've got the plist. If it's in your user folder/Launch Agents, it will just run as your user when you login. This is just like typing sh mount.sh, but done for you automatically based on the set of rules in the PLIST. If that's not working then you have something odd going on, as this is an integral part of your OS.

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.