Nfs fstab mount fails, succeeds manually; mount point deleted on reboot
-
2.0-BETA4 (i386)
built on Mon Oct 25 15:00:24 EDT 2010
FreeBSD 8.1-RELEASE-p1
Platform nanobsd (2g)This works:
/etc/rc.conf_mount_rw mkdir /var/squid mount -t nfs 192.168.255.253 /var/squid
However, when I reboot, /var/squid no longer exists. I do not have the squid package installed, so will the directory survive a reboot once I install the package? I don't understand why it's disappearing. Is there a better place to create my mount point, seeing that I can move the squid cache directory?
Next problem, I put the following into /etc/fstab:
192.168.255.253:/mnt/squid /var/squid nfs defaults 1 1
but this is ineffective both at boot (maybe because the parent directory is deleted), and when trying to manually mount it thus:
mount /var/squid fstab: /etc/fstab:4: Inappropriate file type or format fstab: /etc/fstab:4: Inappropriate file type or format mount: /var/squid: unknown special file or file system
And likewise:
mount -a fstab: /etc/fstab:4: Inappropriate file type or format
Help?
-
Well /var and /tmp on nanobsd are RAM disks. Their contents are lost when power is removed.
For something to stay constant and visible from both nanobsd OS slices you could put it in /conf/
As for the fstab contents, you probably just have something that isn't quite formatted right. Where you have "defaults" you should have "rw"
You probably really want this:
192.168.255.253:/mnt/squid /conf/squid nfs rw 0 0
Though I am no nfs expert, so someone else might have better info.
-
Thanks, I will continue playing with this. I think embedded + nfsquid is a cool way to go.
-
Keep in mind, too, that when you do a firmware update it will switch to the alternate slice and use a fresh fstab file, so your changes will be left behind on the old slice.
-
Hi,
@jimp:Well /var and /tmp on nanobsd are RAM disks. Their contents are lost when power is removed.
For something to stay constant and visible from both nanobsd OS slices you could put it in /conf/
ā¦
Where is the file exactly (/conf/) ?
-
On NanoBSD there are three slices:
pfsense0 - The first OS slice
pfsense1 - The second OS slice
conf - The configuration sliceWhen you do firmware updates, it upgrades whichever OS slice is not in use and then switches to it. The conf slice is used all the time, so it's constant. If you want something to stay between firmware updates, it should be under /conf/ - just be aware there is not much space there to work with. That doesn't matter for a mountpoint though, they don't take any space really (it's just an empty directory).
-
Thanks a lot Jimp.
It's very interesting, and it will be very usefull.I'm going to try playing with itā¦Ā ;)