Mount/share script for non-array drives


Recommended Posts

I believe I got the BSOD worked around thanks to Joe's suggestion with the smb-extra.conf global entry.  I read up on it and found a way to choose security = user but still have all the shares work like security = share, meaning public access with no login required to connect.  

And I got the whole process into a handful of shell scripts that will mount drives at boot time from a list by running them from the go script.  Ugh, learning curve hurts.

 

Currently, the scripts mount the drive by it's serial id which is a little obtuse.  I'd like to extend the scripts to add a friendly name for the share and also would like to either have the scripts auto-determine the filesystem if possible.  In any case, it's on it's way for now.

 

I'll attach my work here in case anyone wants it.

 

 

Edit: 3/22/2010 - updated the zip file with some changes, added a readme.txt with install instructions.

 

this zip will not make my comp BSOD?

 

 

No, but I can make one that will if your disappointed.  ;)  The secuity=user workaround prevents the BSOD on Win7.  The rest of the scripts I wrote to automatically share some non-array disks that I have data on.  I combined all the scripts into a single script that I'll be posting probably tomorrow.  I just need it to be smart enough to set the filesystem correctly.  The drives I want to load all have ntfs but I might as well make it more universal in case I end up with a reiserfs disk I want to look load.

Link to comment
  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Here is an updated version.  I have named it snap (Share Non-Array Partitions).

 

See the included readme.txt for installation.  This version has a single script and some supporting data files. 

The filesystem of the partition to be shared is now auto-detected.  User can now specify sharename.  This version only supports 1st partition on drive.

snap.zip

Link to comment

How is hot plugging implemented on unRAID?  Does anyone know about it or where some docs can be found?

 

I googled for hot plugging on linux and there seems to be a number of ways it's implemented.  I can't find any evidence of it on unRAID but I know it's in there somewhere.

 

At this site there is some discussion about making user scripts that linux will run when a usb device is hotplugged in or removed.  But like before I can't find any of the directories or programs on unRAID but they must be there somewhere.

http://www.slackbasics.org/10.2/html-singlepage/slackware-basics.html#sysadmin-init-hotplug

Link to comment

If you discover how Slackware 12.2 / 13.0 handles hot-plugging then you discovered how the unRAID 'mini-distro' handles it.

 

When I plug a hdd to my Sil3114, I can see in syslog the Sil driver signaling the hot-plug, so unRAID handle hot-plug the same way other Linux distros handles it, by driver support plus kernel signaling. The only problem is that unRAID doesn't include autofs/automount.

 

 

Link to comment

You need to just write a udev rule to take action when certain things are plugged in. I am thinking of doing it so if I plug in a usb drive unraid will mount the drive, then automatically copy its contents over to unraid in a dated backup directory and then unmount the drive again. Will be easy with a udev rule, just need to learn how to write the correct one.

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.