April 23, 201016 yr I am going to install an internal flash drive for permanent storage (e.g. syslog), or I might just put it on a partition on a HDD that is in the case and not part of the array. I believe I know how to mount it and what I need to add to the go file to establish the directory entry in /mnt (/mnt/scratch) and then mount it for RW access. The help I need is how do I make that drive accessable to another machine on the network in the same way that the system flash drive and array disks are? It obviously is possible I just don't know what to put in the go file after I mount it. Eventually I will have a script for my customizations and the script executed from the go file, but for now I just need to understand how to export the drive. TIA, Barry
April 23, 201016 yr I just need to understand how to export the drive. Add this section to your smb-extra.conf [scratch] path = /mnt/scratch read only = No smb-extra.conf resides in the config folder on your boot flash disk. If it's not there, create it. Just keep in mind this: http://lime-technology.com/wiki/index.php?title=FAQ#Why_do_my_scripts_have_problems_with_end-of-lines.3F (Here's my smb-extra.conf for example)
April 23, 201016 yr Author Thanks for the help. My go file now looks like the following: #!/bin/bash # Make the mount points I desire in my system and mount the devices mkdir /mnt/scratch mount -w -t ext2 /dev/sdb1 /mnt/scratch mkdir /mnt/windows mount -w -t ntfs /dev/hda1 /mnt/windows mkdir /mnt/ubuntu mount -w -t ext2 /dev/hda6 /mnt/ubuntu mkdir /mnt/windata mount -w -t ntfs /dev/hda5 /mnt/windata # Redirect the syslog to the auxiliary USB flash key. (at times of troubleshooting only) #mv -f /boot/syslog.current /mnt/scratch/syslog.last 2>/dev/null #cat /var/log/syslog > /mnt/scratch/syslog.current #echo "*.debug /boot/syslog.current" >> /etc/syslog.conf #/etc/rc.d/rc.syslog restart # Start the Management Utility /usr/local/sbin/emhttp & # Install the powerdown utility package installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz # Install the libx86 package installpkg /boot/packages/libx86-1.1-i486-1.tgz # Install the cxxlibs package for use by smartctl installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz # Install the two packages to use the screen command installpkg /boot/packages/screen-4.0.3-i486-1.tgz installpkg /boot/packages/utempter-1.1.4-i486-1.tgz # Install the packages needed for the notification of problems by email installpkg /boot/packages/unraid_notify-2.55-noarch-unRAID.tgz unraid_notify start # Start the unMenu system /boot/unmenu/uu # We are now done with my GO Script so fancy beep and log that fact beep -f 700 ; beep -f 500 ; beep -f 700 ; beep -f 500 logger -t "$0[$$]" "##### Done with the GO script. #####" I realize I have to remove the # to enable the change in the sys logs location Is the order of things pertinent and is the order I put them in okay? Also, to export the scratch drive, do I have to add the global section to smb-extra.conf? I just added the scratch section and suddenly the array disks were not visible. I removed smb-extra.conf, rebooted and the disks are back. I tried it with your global section and all the devices show up (flash, disk1, disk2, scratch) but when I try and access them I get a message that I don't have the correct permissions. Advice appreciated Thanks!!
April 23, 201016 yr If you are running a recent version of unRAID, the cxxlib install is not needed any longer. # Install the cxxlibs package for use by smartctl installpkg /boot/packages/cxxlibs-6.0.8-i486-4.tgz What is the libx86 package needed by? Only time I've seen it mentioned is in combination with the s2ram program and I did not see that installed. Joe L.
April 23, 201016 yr # Redirect the syslog to the auxiliary USB flash key. (at times of troubleshooting only) [red]#mv -f /boot/syslog.current /mnt/scratch/syslog.last 2>/dev/null[/red] #cat /var/log/syslog > /mnt/scratch/syslog.current [red]#echo "*.debug /boot/syslog.current" >> /etc/syslog.conf[/red] #/etc/rc.d/rc.syslog restart # Start the Management Utility /usr/local/sbin/emhttp & # Install packages.... # Redirect the syslog to the auxiliary USB flash key. (at times of troubleshooting only) [blue]#mv -f /mnt/scratch/syslog.current /mnt/scratch/syslog.last 2>/dev/null[/blue] #cat /var/log/syslog > /mnt/scratch/syslog.current [blue]#echo "*.debug /mnt/scratch/syslog.current" >> /etc/syslog.conf[/blue] #/etc/rc.d/rc.syslog restart # Start the Management Utility /usr/local/sbin/emhttp & [blue]# Wait for the array to start... (before installing any packages that may expect the array to be fully started) until `cat /proc/mdcmd 2>/dev/null | grep -q -a "STARTED" ` ; do echo -n "." ; sleep 1 ; done ; echo "..The array has started."[/blue] # Install packages....
April 23, 201016 yr Author Joe, thanks for the advice, I will comment them out and see if all still works. Purko, My only problem I have is with getting Samba to allow windows to access the drives. If all I put into the smb-extra.conf is the scratch section [scratch] path = /mnt/scratch read only = No Then the only thing I see is the flash drive and I can access it from windows. If I put in your global section then I can see everything but can not open them from windows. Is there some issue where samba has started earlier then the drive mounts in my GO file get executed and the smb-extra.conf is erroring off? If that is the case do I just stop samba, do the mounts, and then restart samba? Sounds logical to me but . . . I will do some reading on samba to try amd understand all your global entries and the role they play, but probably not until tomorrow. Tonight is my Sushi night.
April 24, 201016 yr Hi Barry, if you are looking for a way to mount non array drives then I might be able to simplify it for you. I needed just this functionality. I wrote an add-on called SNAP that can manage shares for drives mounted in the box and it also handles hot-plugged usb drives. http://lime-technology.com/forum/index.php?topic=5904.0
April 24, 201016 yr Purko, My only problem I have is with getting Samba to allow windows to access the drives. If all I put into the smb-extra.conf is the scratch section [scratch] path = /mnt/scratch read only = No Then the only thing I see is the flash drive and I can access it from windows. If I put in your global section then I can see everything but can not open them from windows. Is there some issue where samba has started earlier then the drive mounts in my GO file get executed and the smb-extra.conf is erroring off? If that is the case do I just stop samba, do the mounts, and then restart samba? Sounds logical to me but . . . When you define a samba share, you do it in its own section, not in the global section. You don't even need to restart samba, as it monitors the smb-extra.conf file, and reloads the settings every time the file changes. Even if your /mnt/scratch doesn't exist, samba shouldn't crap out the way you describe it. I've tried it, it just disregards the wrong section, if there's something wrong with it. Did you save your smb-extra.conf file with Linux-style line endings? What's the output of a testparm command?
April 24, 201016 yr Author Double checked smb-extra and you were correct, it had PC line endings. Fixed that and all is Okay. I use textpad for text editing on windows. I forgot that if you type in a file from scratch you have to save it the first time as a PC or Unix file, the default being PC. When it opens a file it figures it out for itself and just does it right. testparm answered a lot of questions for me on how unraid set samba up initially. It shows a global section, but I have no idea where that is and I guess I really don't have to know. Just curious. My next interest is on your Lynx thread. I will be watching that one and have posted a question.
April 24, 201016 yr Double checked smb-extra and you were correct, it had PC line endings. So, you weren't paying attention! Eight posts back.... ...keep in mind this: http://lime-technology.com/wiki/index.php?title=FAQ#Why_do_my_scripts_have_problems_with_end-of-lines.3F I'm glad you made it work.
April 24, 201016 yr Author I always pay attention, I just have "Senior Moments" where I forget what I am paying attention to!
April 24, 201016 yr testparm answered a lot of questions for me on how unraid set samba up initially. It shows a global section, but I have no idea where that is and I guess I really don't have to know. You can have your own global section in smb-extra.conf. Samba will merge them, and your settings will override whatever settings there are in /etc/samba/smb.conf
Archived
This topic is now archived and is closed to further replies.