alec wrote:I wonder if I can change the default system folders path... if it's possible, pheraps I can make it work
Yes, you can. You can simply bindmount another directory there.
Let's assume you want to exchange the /usr/local/ directory. Then you can create a directory somewhere on harddisk, maybe /mnt/pools/A/A1/usr_local. First copy the current content:
Code: Select all
cp -a /usr/local/* /mnt/pools/A/A1/usr_local/
then bindmount it:
Code: Select all
mount -o bind /mnt/pools/A/A1/usr_local /usr/local
Now you have a writable /usr/local directory, until the next boot.
but obviously, only the /etc folder keep changes when I reboot the nas...
And so you can add some script to /etc/rc.local. But beware, when this script is executed, the data partition is not yet mounted. So you'll have to poll for the existence of the directory before you can bindmount it, but meanwhile rc.local has to exit. It can be done this way:
Code: Select all
# stuff
PollingFunction()
{
while [ ! -d /mnt/pools/A/A1/usr_local ] ; do
sleep 10
done
mount -o bind /mnt/pools/A/A1/usr_local /usr/local
exit 0
}
PollingFunction &