Msan Posted April 27, 2010 Share Posted April 27, 2010 I know this was talked about here in the last little while, but I can't seem to find the post now Anyway, I would like to use an extra drive (could be the cache drive) to store all the packages etc, so that they don't have to be reinstalled on every boot and I have to worry about saving stuff before powering down or rebooting.. If anyone can give me a nudge in the right direction, it would be appreciated Link to comment
purko Posted April 27, 2010 Share Posted April 27, 2010 ...so that they don't have to be reinstalled on every boot... Stock unRAID boots from a ram disk image, so additional packages have to be reinstalled on every boot. You could rebuild the boot image... http://lime-technology.com/forum/index.php?topic=871.0 Or, you could install a full Slackware distro and then install the unRAID driver on top of it. http://lime-technology.com/forum/index.php?topic=2073.0 Link to comment
Msan Posted April 27, 2010 Author Share Posted April 27, 2010 Can't I just boot from the flash and then mount the drive into the filesystem somehow? So if I have a disk that has /usr/bin on it and mount it properly somehow, it's contents would show when doing ls -al /usr/bin instead of the /usr/bin that got booted? (/usr/bin is just an example) Link to comment
barrygordon Posted April 27, 2010 Share Posted April 27, 2010 I posted a similar query and Joe L indicated that there was an unmenu feature to indicate where to store the packages. However he did not advise it. It is probabaly towards the end of the unmenu thread. Link to comment
purko Posted April 27, 2010 Share Posted April 27, 2010 Can't I just boot from the flash and then mount the drive into the filesystem somehow? You could do that with the mount command with the "--move" option, or with the "--bind" option. http://lime-technology.com/forum/index.php?topic=5568.msg59705#msg59705 Link to comment
Msan Posted April 27, 2010 Author Share Posted April 27, 2010 Thanks, that should get me started Link to comment
WeeboTech Posted April 27, 2010 Share Posted April 27, 2010 I did some experimenting a ways back with union filesystems. unionfs and aufs. It worked to some degree, but the root filesystem is initramfs and not a ramdisk like tmpfs. So it will only work if you move the root filesystem to a tmpfs ramdisk. Entirely possible, but it takes some hacks in the startup of the system and it's not for the faint of heart. i think I had to change the bzroot to create the tmpfs, then move files, then remove them from initramfs then remount the tmpfs as / What I was trying to do was create a loopbacked'ed filesystem that was on the flash so it would be easier to manage. I succeeded, but it wasn't reliable enough at that time. I may try again one day with the cache drive, but since I don;t have one yet, and RAID1 is not available on cache I decided to wait. You can search through the forum for my old post. Link to comment
jupilerman Posted April 28, 2010 Share Posted April 28, 2010 I have a HD outside the array. I mount it with the go script like this mkdir /mnt/disk mkdir /mnt/disk/hda1 mount -w -t vfat /dev/hda1 /mnt/disk/hda1 2>&1 It has a directory labeled "packages" I did change all the "/boot/packages" with "/mnt/disk/hda1/packages" whenever it was needed. This works perfectly. Here's a part of my go script #!/bin/bash # unRAID TOWER # Start the Management Utility /usr/local/sbin/emhttp & #mount mnt/disk/hda1 mkdir /mnt/disk mkdir /mnt/disk/hda1 mount -w -t vfat /dev/hda1 /mnt/disk/hda1 2>&1 #start umenu cd /mnt/disk/hda1/umenu nohup sh -c "while true; do awk -W re-interval -f /mnt/disk/hda1/umenu/unmenu.awk; done" >/dev/null 2>&1 & #start powerdown VAR=YES OTHERVAR=YES installpkg /mnt/disk/hda1/powerdown/powerdown-1.02-noarch-unRAID.tgz #install packages cd /mnt/disk/hda1/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c #install cache_dirs /mnt/disk/hda1/cache/cache_dirs -w -a "-noleaf" -B I believe it could be easyer to make a symbolic link from /mnt/disk/hda1 to /boot or something like that. Link to comment
Joe L. Posted April 28, 2010 Share Posted April 28, 2010 I have a HD outside the array. I mount it with the go script like this mkdir /mnt/disk mkdir /mnt/disk/hda1 mount -w -t vfat /dev/hda1 /mnt/disk/hda1 2>&1 It has a directory labeled "packages" I did change all the "/boot/packages" with "/mnt/disk/hda1/packages" whenever it was needed. This works perfectly. Here's a part of my go script #!/bin/bash # unRAID TOWER # Start the Management Utility /usr/local/sbin/emhttp & #mount mnt/disk/hda1 mkdir /mnt/disk mkdir /mnt/disk/hda1 mount -w -t vfat /dev/hda1 /mnt/disk/hda1 2>&1 #start umenu cd /mnt/disk/hda1/umenu nohup sh -c "while true; do awk -W re-interval -f /mnt/disk/hda1/umenu/unmenu.awk; done" >/dev/null 2>&1 & #start powerdown VAR=YES OTHERVAR=YES installpkg /mnt/disk/hda1/powerdown/powerdown-1.02-noarch-unRAID.tgz #install packages cd /mnt/disk/hda1/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c #install cache_dirs /mnt/disk/hda1/cache/cache_dirs -w -a "-noleaf" -B I believe it could be easyer to make a symbolic link from /mnt/disk/hda1 to /boot or something like that. I don't think the FAT file system on the flash drive supports symbolic links.... but it does support use of the "bind" option of the mount command. Easiest in your situation would be to type mkdir /boot/packages mount --bind /mnt/disk/hda1/packages /boot/packages Note: first step of creating the /boot/packages directory might not be needed if the directory already exists. You can put the "mount --bind .... " command in your "go" script just prior to the line that finds and runs all the .auto_install scripts. This way, the files can be accessed through either /boot/packages (where many utilities might be looking for them) or through /mnt/disk/hda1/packages, as you've edited some to use. Joe L. Link to comment
jupilerman Posted April 29, 2010 Share Posted April 29, 2010 Joe L. I will not change anything for now because as they say : "If it ain't broke, don't fix it". But I will keep your solution somewhere in my mind. In fact, I'll probably test it in a VM. And change my all unRAID configuration when upgrating to unmenu 1.3 final and/or unRAID 5.0 Link to comment
spants Posted July 12, 2010 Share Posted July 12, 2010 I have used Joe's method to move all packages from flash to /mnt/cache/.custom/flash/packages and it works brilliantly! Thanks for sharing Tony Link to comment
woolooloo Posted September 16, 2010 Share Posted September 16, 2010 I used these commands to mount a spare flash drive to keep my syslog on for times when the system crashes. I was just dealing with one of those situations (turned out to be a loose cable on my new build), but I want to be ready in case it happens again. Can anyone tell me the command to share the mounted drive? I can do it manually through unmenu, but I'd like to add it to my go script. I thought I figured it out, I added the following to my /etc/samba/smb.conf based on the values for boot flash: [flash2] path = /mnt/disk/sdh1 read only = No force user = root map archive = No map system = No map hidden = No map readonly = Yes create mask = 0777 directory mask = 0777 And then I tried to restart samba with "sudo /etc/init.d/samba reload", but it is telling me that sudo can't be found, and I can't find it anywhere either. I see other posts mentioning it, so I don't know why I can't find it. Link to comment
woolooloo Posted September 16, 2010 Share Posted September 16, 2010 Just figured it out, I'm not sure what sudo is, but all I needed was "/etc/rc.d/rc.samba reload". Link to comment
Joe L. Posted September 16, 2010 Share Posted September 16, 2010 because suso does not exist on slackware. Besides, you are already "root" so no special sudo is needed. The lines you added to smb.conf will be wiped away the next time you reboot. Add those lines instead to a file in the /boot/config folder named smb-extra.conf The smb-extra.conf file does not exist until you create it. Once the lines are added you can request the samba config to reload type: smbcontrol smbd reload-config The command you tried to use would not work since unRAID has no /etc/init.d directory, and therefore no "samba" command within it. You must be reading posts describing a different distribution of Linux. Link to comment
woolooloo Posted September 16, 2010 Share Posted September 16, 2010 Yeah, it is hard to search for anything on this forum using the word "share", just way too many hits So I was using instructions I found elsewhere. If I put those lines in /boot/config/smb-extra.conf, it will automatically add them at reboot, or will I still need to reload samba? Link to comment
Joe L. Posted September 16, 2010 Share Posted September 16, 2010 Yeah, it is hard to search for anything on this forum using the word "share", just way too many hits So I was using instructions I found elsewhere. If I put those lines in /boot/config/smb-extra.conf, it will automatically add them at reboot, or will I still need to reload samba? it will automatically add them. No need to do anything special. That file is read into the samba configuration if present. In mine I have (I have shared a sub-directory of a user-share as a user-share): [global] max open files=20000 aio read size = 1 aio write size = 1 [hustle] path = /mnt/user/Movies/hustle1 Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.