queeg Posted January 4, 2011 Author Share Posted January 4, 2011 I have not used SNAP yet, but a suggestion related to the above request. Could a command line parameter or something similar be added so that this setting could be remembered for a specific drive. perhaps an extra command option to the end of: snap.sh -a [serialnumber] [sharename] something like: snap.sh -a [serialnumber] [sharename] --notbrowseable or snap.sh -a [serialnumber] [sharename] --nb Something like the above should work I'll think on it for the next version after unRAID 5 comes out. If I do add it then it would be implemented as a new parameter such as snap -browseable [serialnumber] [sharename] snap -notbrowseable [serialnumber] [sharename] Quote Link to comment
dlandon Posted January 4, 2011 Share Posted January 4, 2011 The problem with doing the -S to unshare it after it has just been mounted and shared is that is pauses all unRaid shares twice. I notice that all the unRaid shares momentarily disappear when executing the samba commands? For the moment I like what I have done. I second the idea of being able to set a drive not browseable by drive. As I have it right now, it is global in that all SNAP drives are browseable or not browseable. It works, but is not very flexible. Quote Link to comment
queeg Posted January 5, 2011 Author Share Posted January 5, 2011 The problem with doing the -S to unshare it after it has just been mounted and shared is that is pauses all unRaid shares twice. I notice that all the unRaid shares momentarily disappear when executing the samba commands? Ahh, I hadn't noticed that. Is there some way to make sambe changes without affecting existing shares? Quote Link to comment
dlandon Posted January 5, 2011 Share Posted January 5, 2011 That one is beyond my limited Linux capability, but not pausing the shares wouild be beneficial. Quote Link to comment
BRiT Posted January 5, 2011 Share Posted January 5, 2011 Allegedly samba monitors the config files every 60 seconds to pull in the changes. The caveat is that if configuration changes are made to shares that users are already connected to, those changes will not be seen. Have you tried signaling the SAMBA processes (smbd / nmbd) with a HUP? Or are you using smbcontrol? smbcontrol smbd reload-config smbcontrol nmbd reload-config kill -HUP `cat /var/run/smbd.pid` kill -HUP `cat /var/run/nmbd.pid` Quote Link to comment
queeg Posted January 5, 2011 Author Share Posted January 5, 2011 Allegedly samba monitors the config files every 60 seconds to pull in the changes. The caveat is that if configuration changes are made to shares that users are already connected to, those changes will not be seen. Have you tried signaling the SAMBA processes (smbd / nmbd) with a HUP? Or are you using smbcontrol? smbcontrol smbd reload-config smbcontrol nmbd reload-config kill -HUP `cat /var/run/smbd.pid` kill -HUP `cat /var/run/nmbd.pid` Currently I'm using restart. To change over to using the HUP requires changing one line of code in snap.sh. It's the second line of code after the comments at the top of the file. Thanks dlandon and BRiT, I appreciate the interest in improving SNAP. Most references on the web recommend the restart method, but here is one that mentions using the kill process on smbd. Change: restart_samba="/etc/rc.d/rc.samba restart" To: restart_samba="kill -1 `cat /var/run/smbd.pid`" The change is working for me. How about some volunteers to test it? EDIT: Belated thanks to NAS for mentioning the site I referenced above. Quote Link to comment
dlandon Posted January 5, 2011 Share Posted January 5, 2011 The change is working for me. How about some volunteers to test it? Queeg, I'm more than happy to check it out for you. I think that restarting Samba is what causes the shares to go away for a short time. It would be a lot smoother if that did not happen. Quote Link to comment
dlandon Posted January 6, 2011 Share Posted January 6, 2011 The change is working for me. How about some volunteers to test it? Works very nicely. I turned off my modification to not allow the shares to be browseable and the drive share was available when the drive was installed, and the drive share went away when the drive was removed. There was no pause in the other shares being visible. Quote Link to comment
NAS Posted January 8, 2011 Share Posted January 8, 2011 Nice work. requested a tool within unRAID itself be added to cover this any other daemon soft restarts at the OS level. I think it will be generally useful for other addons Quote Link to comment
queeg Posted January 8, 2011 Author Share Posted January 8, 2011 Nice work. requested a tool within unRAID itself be added to cover this any other daemon soft restarts at the OS level. I think it will be generally useful for other addons Thank you NAS! I would very much appreciate help getting udev to soft restart. I have repeatedly sought help getting that to work or to even get a working example. A summary of this issue is that if you install or just plug in a usb reader in unRAID and unRAID will detect it. Then when you insert a flash chip you would expect unRAID to detect it and allow you to mount it. But unRAID doesn't create the device entry for the flash chip. It is possible to create a daemon to watch for the flash chip to appear and then run udev to get the device created. But I have tried many ways to get udev to restart and it never does. To further troubleshoot I need a working example for restarting udev or even better for limetech to provide this tool you are referencing. Quote Link to comment
dlandon Posted January 11, 2011 Share Posted January 11, 2011 I would like you to consider on the next revision putting the hot plug log file in the /var/log directory on the ram drive rather than on the USB flash. The log file can be easily viewed with unMenu by clicking on the Sys Log selection and then entering the hot plug file name instead of the syslog file name. The Sys Log is already directed to the /var/log directory on the ram drive. I've already done this myself because I want to minimize the writes to the USB stick. I would also suggest that the snap files be put in /boot/custom directory rather than /boot/config. It seems to be more in line with the direction I am seeing discussed for add ons in Version 5. Quote Link to comment
queeg Posted January 12, 2011 Author Share Posted January 12, 2011 I would like you to consider on the next revision putting the hot plug log file in the /var/log directory on the ram drive rather than on the USB flash. The log file can be easily viewed with unMenu by clicking on the Sys Log selection and then entering the hot plug file name instead of the syslog file name. The Sys Log is already directed to the /var/log directory on the ram drive. I've already done this myself because I want to minimize the writes to the USB stick. Good idea. I would also suggest that the snap files be put in /boot/custom directory rather than /boot/config. It seems to be more in line with the direction I am seeing discussed for add ons in Version 5. If and when the version 5 standards for plugins or custom apps get written up I'll be checking into it. Right now it's too much of a moving target for me to get interested in that. I appreciate their work on that. The /boot/config folder is the standard for unRAID version 4. I intentionally keep everything inside the /boot/config/snap folder, so there are no questions about interference with unRAID or from unRAID. 1. SNAP must always be a stable app. 2. There must be no possibility for SNAP stepping on unRAID or of unRAID changes affecting SNAP. I posted a question if any information has been written up and the response was that it's still a beta and will be for some time to come. I'm not going to crawl the forum looking for hints of what it's going to be. In the meantime I'd be interested if whether or some sort of gui in unMenu could be created that could be used now and would still work in version 5 of unRAID? Quote Link to comment
adspence Posted January 15, 2011 Share Posted January 15, 2011 I have a 1TB ext3 drive which I'd like to use for backups (of certain critical bits of my 6TB array), but it only gets mounts as read-only under SNAP (as ext2 of course). Is there a good reason for this (maybe related to journalling status)? Or is it possible to just change the mount command in the script? It isn't a USB device, it is actually internal, though I doubt that matters. Cheers. Quote Link to comment
dlandon Posted January 15, 2011 Share Posted January 15, 2011 If and when the version 5 standards for plugins or custom apps get written up I'll be checking into it. Right now it's too much of a moving target for me to get interested in that. I appreciate their work on that. The /boot/config folder is the standard for unRAID version 4. I intentionally keep everything inside the /boot/config/snap folder, so there are no questions about interference with unRAID or from unRAID. 1. SNAP must always be a stable app. 2. There must be no possibility for SNAP stepping on unRAID or of unRAID changes affecting SNAP. I agree that waiting for the moving target to settle down is best. I wasn't suggesting that you change anything now. I see the direction that unRaid is going in the Roadmap and like the plan, I just wonder about Limetech's resources (one guy - Tom?) and the timing to get it all done. The one thing that I am really uncomfortable about with unRaid is that Limetech appears to be one quite ingeneous fellow. He needs to grow the company and bring in additional talent. Quote Link to comment
gfjardim Posted January 15, 2011 Share Posted January 15, 2011 I have a 1TB ext3 drive which I'd like to use for backups (of certain critical bits of my 6TB array), but it only gets mounts as read-only under SNAP (as ext2 of course). Is there a good reason for this (maybe related to journalling status)? Or is it possible to just change the mount command in the script? It isn't a USB device, it is actually internal, though I doubt that matters. Cheers. Yes, unRAID kernel doesn't has EXT3-4 drivers, so Snap cannot mount them natively with RW access. Quote Link to comment
Benni-chan Posted January 18, 2011 Share Posted January 18, 2011 i have a hfsplus formatted disk, which i want to connect to my unraid server via usb. can i get this to work somehow with snap? i can mount the drive manually with "mount -t hfsplus /dev/sde1 /mnt/usbdrive". so i must tell snap, to use the -t modifier for mounting this drive. but how? Edit: got it to work, i think. I edited the snap.sh file and added at line 883 following lines... 'hfsplus') mountOptions="-t $filesystem" readonlyflag="" ;; Quote Link to comment
queeg Posted January 20, 2011 Author Share Posted January 20, 2011 i have a hfsplus formatted disk, which i want to connect to my unraid server via usb. can i get this to work somehow with snap? i can mount the drive manually with "mount -t hfsplus /dev/sde1 /mnt/usbdrive". so i must tell snap, to use the -t modifier for mounting this drive. but how? Edit: got it to work, i think. I edited the snap.sh file and added at line 883 following lines... 'hfsplus') mountOptions="-t $filesystem" readonlyflag="" ;; Thanks for the contribution, I'll add this to snap.sh. I didn't know unRAID had drivers for that filesystem. Does it write safely to it also? Quote Link to comment
prostuff1 Posted January 20, 2011 Share Posted January 20, 2011 i have a hfsplus formatted disk, which i want to connect to my unraid server via usb. can i get this to work somehow with snap? i can mount the drive manually with "mount -t hfsplus /dev/sde1 /mnt/usbdrive". so i must tell snap, to use the -t modifier for mounting this drive. but how? Edit: got it to work, i think. I edited the snap.sh file and added at line 883 following lines... 'hfsplus') mountOptions="-t $filesystem" readonlyflag="" ;; Thanks for the contribution, I'll add this to snap.sh. I didn't know unRAID had drivers for that filesystem. Does it write safely to it also? I believe it is read-only. I don't remember off the top of my head for sure though. Quote Link to comment
Benni-chan Posted January 20, 2011 Share Posted January 20, 2011 http://lime-technology.com/forum/index.php?topic=1914.0 i'm guessing, writing to a hfsplus partition is no problem (see above thread) so far i only deleted one empty directory on my hfsplus partition (reading is more important at the moment), but didn't have problems so far. EDIT: I have to correct myself. Must have been the other drive on which I deleted the directory. Just run some tests and I haven't been able to mount the hfsplus drive with writing enabled. tried with -w option, but even then I always get an error: "touch: cannot touch `file': Read-only file system" Quote Link to comment
BlackCat Posted January 21, 2011 Share Posted January 21, 2011 in short so i type in snap.sh -a [1502825] [?] or snap.sh -a [WMAZA1502825] [?] Don't put the [ and ] brackets when you use it. Those are used to illustrate that it's a parameter you provide but you shouldn't actually include them. It would be helpful if you added this note to the front page. I'm a complete noob so I wasn't sure if the brackets were suppose to be there or not either. Just a suggestion. Now time to try and get this up and running on my machine. Quote Link to comment
BlackCat Posted January 21, 2011 Share Posted January 21, 2011 Ok I need some help. I install SNAP and the console said it was installed However, I missed this post: Great Application! It really adds some extra utility to unRAID. For completely clueless people like me, you may want to consider including a few things in the first post: Must Format and Mount - can be done through unMENU - Disk Management Scroll down to disk and select "Format to reiserfs" then select mount as Read only / Writable -- and -- Be sure you're at: root@Tower:/boot/config/snap# and not root@Tower:~# to enter snap.sh -a [serialnumber] [sharename] and other snap.sh commands Thanks! I installed at root@Tower:~#, how do I even get to root@Tower:? So I turned off the server to install my internal drive and i cannot get the device list. Here is what I tried Tower login: root Linux 2.6.32.9-unRAID. root@Tower:~# cd /boot/config/snap/snap.sh -listDeviceConfigurationInfo -bash: cd: /boot/config/snap/snap.sh: Not a directory root@Tower:~# snap.sh -listDeviceConfiguration -bash: snap.sh: command not found root@Tower:~# /boot/config/snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap.sh: No such file or directory root@Tower:~# cat /boot/config/snap/snap.list cat: /boot/config/snap/snap.list: No such file or directory root@Tower:~# cd /boot/config/snap root@Tower:/boot/config/snap# dir hotPlugAfterShareEvent.sh* snap.log* snapNotify.log* inotify-tools-3.8-i486-1.tgz* snap.sh* snapNotify.sh* snap-global-template* snapEvents.sh* snapSambaNotify.log* snap-xdrive-template* snapEventss.log* snapSambaNotify.sh* root@Tower:/boot/config/snap# cd /boot root@Tower:/boot# cd .. root@Tower:/# /boot/config/snap# snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap#: No such file or directory root@Tower:/# cd .. root@Tower:/# /boot/config/snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap.sh: No such file or directory root@Tower:/# /boot/config/snap# snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap#: No such file or directory root@Tower:/# cd /boot/config/snap root@Tower:/boot/config/snap# snap.sh -listDeviceConfiguration root@Tower:/boot/config/snap# snap.sh -listDeviceConfiguration I attached my syslog after my install on reboot, unfortunately I did not think to get the syslog before rebooting because I thought I had installed it correctly. I have read through the thread a few times,I'm not sure what to do from here. Did I screw something up when I installed at root@Tower:~#? I know the hard drive is seen by the system because I can pick it from the device assignment page. Thanks syslog-2011-01-20_Restart_After_Install_SNAP.txt Quote Link to comment
queeg Posted January 21, 2011 Author Share Posted January 21, 2011 Ok I need some help. I install SNAP and the console said it was installed However, I missed this post: I installed at root@Tower:~#, how do I even get to root@Tower:? So I turned off the server to install my internal drive and i cannot get the device list. Here is what I tried Tower login: root Linux 2.6.32.9-unRAID. root@Tower:~# cd /boot/config/snap/snap.sh -listDeviceConfigurationInfo -bash: cd: /boot/config/snap/snap.sh: Not a directoryroot@Tower:~# snap.sh -listDeviceConfiguration -bash: snap.sh: command not found root@Tower:~# /boot/config/snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap.sh: No such file or directoryroot@Tower:~# cat /boot/config/snap/snap.list cat: /boot/config/snap/snap.list: No such file or directory root@Tower:~# cd /boot/config/snap root@Tower:/boot/config/snap# dir hotPlugAfterShareEvent.sh* snap.log* snapNotify.log* inotify-tools-3.8-i486-1.tgz* snap.sh* snapNotify.sh* snap-global-template* snapEvents.sh* snapSambaNotify.log* snap-xdrive-template* snapEventss.log* snapSambaNotify.sh*root@Tower:/boot/config/snap# cd /boot root@Tower:/boot# cd .. root@Tower:/# /boot/config/snap# snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap#: No such file or directory root@Tower:/# cd .. root@Tower:/# /boot/config/snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap.sh: No such file or directory root@Tower:/# /boot/config/snap# snap.sh -listDeviceConfigurationInfo -bash: /boot/config/snap#: No such file or directory root@Tower:/# cd /boot/config/snap root@Tower:/boot/config/snap# snap.sh -listDeviceConfiguration root@Tower:/boot/config/snap# snap.sh -listDeviceConfiguration I attached my syslog after my install on reboot, unfortunately I did not think to get the syslog before rebooting because I thought I had installed it correctly. I have read through the thread a few times,I'm not sure what to do from here. Did I screw something up when I installed at root@Tower:~#? I know the hard drive is seen by the system because I can pick it from the device assignment page. Thanks The files in green show they got copied to the correct directory and since there are .log files I think it means that SNAP is being run. The snapNotify.log tells me that it's seen some device plugged in sometime. The blue lines should be snap.sh -listDeviceConfigurationInfo Quote Link to comment
BlackCat Posted January 21, 2011 Share Posted January 21, 2011 What is the difference between root@Tower:~# and just root@Tower:? I can get to root@Tower:/# by using "cd .." but I don't know how to get to just root@Tower:, any pointers? Here is what I have done: Tower login: root Linux 2.6.32.9-unRAID. root@Tower:~# cd .. root@Tower:/# cd .. root@Tower:/# snap.sh -listDeviceConfiguration -bash: snap.sh: command not found root@Tower:/# root@Tower:/# Also should I have unzipped the "inotify-tools-3.8-i486-1.tgz" file? I thought that UnRaid will unzip the *.tgz files on install so I didn't unzip it. Quote Link to comment
Benni-chan Posted January 21, 2011 Share Posted January 21, 2011 ~ stands for the home directory. for the user root it is /root so, if you type "cd /root" or "cd ~" you get to the same directory you can find the snap.sh file in the directory /boot/config/snap, so you first have to go there "cd /boot/config/snap" or you can just use "/boot/config/scnap/snap.sh ...." from anywhere you like. Quote Link to comment
BlackCat Posted January 21, 2011 Share Posted January 21, 2011 ~ stands for the home directory. for the user root it is /root so, if you type "cd /root" or "cd ~" you get to the same directory Ah, thanks. So then what I still don't quite understand is if I'm in the root directory (root@Tower:~#) and I type cd.. I get the command prompt root@Tower:/# this is the same thing as root@Tower:~# because you can't go up any directories past the root level? Sorry for the "dumb" questions I know this is basic knowledge for 90% of the people here. Now I see my misunderstanding in my first post about GBH2's comment about what directory to look in. I was looking to the left of boot and not up to the # to see what directory I should be in. Thanks for the help. you can find the snap.sh file in the directory /boot/config/snap, so you first have to go there "cd /boot/config/snap" or you can just use "/boot/config/scnap/snap.sh ...." from anywhere you like. Well I did run: root@Tower:/boot/config/snap# snap.sh -listDeviceConfiguration BUT I see I forgot to add the next command line prompt. After entering snap.sh -listDeviceConfiguration in the correct location I am returned to the root@Tower:/boot/config/snap# prompt without seeing any device list. I have attached my snapNotify and snapSambaNotify they both say, Error occured - inotify not installed Would this be because I did not unzip the inotify-tools-3.8-i486-1.tgz file? Hopefully that helps with the understanding of my problem, not that I'm understanding some basics. snapNotify.txt snapSambaNotify.txt Quote Link to comment
Recommended Posts
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.