-
-
Notifications
You must be signed in to change notification settings - Fork 34
MovingLandingZone
A share Landing Zone (LZ) is where new files are stored, temporarily, before the Greyhole daemon (server) moves them to one of more of your pooled drives.
A Share Landing Zone is the path of that share, as defined in smb.conf (the Samba configuration file). (On Amahi, this is the Location field in the Setup > Shares page).
The Landing Zone should be chosen with care, but even so, it might sometimes be necessary to move it. Here's how you can move a share LZ.
Each share can have it's LZ on a different disk. i.e. it's not a requirement that all shares LZ be located insite the same folder, or disk.
A good rule of thumb is to use your biggest drive(s) to host your different LZ. There is no restriction about having a drive included in the pool, and also using it as a LZ for your shares, except that you need to make sure not to put your LZ inside the directories included in the pool (in Amahi, this is the gh folder found in the root on each of your drives).
Users who don't use Amahi should note that including the root of their drives in the pool will prevent them from using those drives as the LZ.
- (This step is optional) First, you might want to wait until the Greyhole is done working on the latest changes. You can check that by looking at /var/log/greyhole.log: look for
Sleeping...
log lines. Doing so will speed up the whole process of moving your LZ. - Stop the Samba service. (If you're using Amahi, you'll want to turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.)
- Stop the Greyhole service. (If you're using Amahi, you'll want to turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.)
- Move the LZ from it's old path to the new path. You can do so using the file browser in X, or using the command line (eg.
mv /var/hda/files/videos /var/hda/files/drives/drive1/videos
) Make sure the permission of the new directory is correct, especially if you created empty directory manually instead of moving old one. (eg.chmod 775 /var/hda/files/drives/drive1/videos
) - Edit the share path (Location on Amahi) to reflect the new path.
- Repeat the last two steps for all the shares you'd like to relocate.
- Restart the Greyhole service. (If you're using Amahi, you'll want to turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.)
- Restart the Samba service. (If you're using Amahi, you'll want to turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.)
- For good measure, you should run
greyhole --fsck
. While it shouldn't be required if you correctly moved the content of the old LZ into the new LZ, it won't hurt to check!
You can also replace your current landing zone folder with a symlink to the new destination you would like to use. Then you don't have to update any configurations at all.
Let's say your current landing zone is at /var/shares
and you would like to move it to another drive with more space, mounted as /mnt/hdd2
.
- Stop Samba and Greyhole (If you're using Amahi, you'll want to turn off the Watchdog options for these services in the Setup > Advanced > Servers page, and then stop the services.)
-
mv /var/shares /mnt/hdd2/
- Move the contents in your current landing zone to the new destination (preserving ownership and permissions). -
ln -s /mnt/hdd2/shares /var/shares
- create the symlink to your new landing zone - Restart Samba and Greyhole services.
Greyhole will now be able to use the same old configs you had before but the files stored in the landing zone will be placed in /mnt/hdd2/shares
instead. Using this way you can easily move your landing zone around without having to change the configs all the time.