Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

macOS users - AutoMount your Shares

Featured Replies

  • Author

Anything happen recently to your unRAID server? Done a motherboard swap or anything?

 

It should work no problems. Double check script settings, and permissions.

  • Replies 232
  • Views 123.7k
  • Created
  • Last Reply

Nope, I changed the MAC when I added a new NIC card--I don't remember if it was running through launchd at all, but I was able to run it manually.

 

Not sure what I could have changed that would affect this now...

  • Author

Presuming your new NIC supports WOL?

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

  • Author

Providing the MAC and IP is the same in the script as when you do it manually, there's no reason why it wouldn't work. It's just automating the setup.

 

Can you send the setup file?

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

  • Author

Try remove the port. Also, remove the colons on the MAC address.

 

The port on mine is 4343.

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 :(

  • Author

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.

I don't recall changing anything on my system to be honest.

 

I am planning on wiping my system clean, but need to finish a few web projects for people before I take my machine down.

 

*sigh*... :(

This work in disks also or only shares? If yes then how? Thx

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...

Would appreciate if u could thx. But I don't really understand this share thing. I store 9 drives of pRon with different kinds on each drive so if I created shares for each drama it would be 9 shares from 9 drives? Easier to just mount disks right?

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.

Brilliant then I won't have 9 drives on my desktop!

  • Author

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  :)

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

 

 

  • Author

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.

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

 

 

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?

  • Author

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.

  • Author

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.

Gahhh mother fuckerrrrrr lol.  Such bullshit because it was working perfectly...then it suddenly stopped: Pinging, AFP, etc.

 

I'm about to bash all of my machines unless they start working.

 

Mac: "It just works" :die in a fire:

  • Author

lol - well, it just works until ya start messing with terminal. Then all bets are off ;)

I'm not a noob.  My career is as a developer.  I'm certain I didn't fuck anything up on the Mac side.  Who knows what happened to unRAID.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.