I was thinking about how to keep write access to my Raspberry Pi's root file system (residing on a SD card) at a minimum. Of course, /var is a primary candidate for being kept somewhere else.
I have a NAS storage in my home network. In order to get proper handling of file ownership, permissions etc. I was thinking about mounting an image file (located on the NAS), via the loopback device, to /var.
1) Can I do this by just adding the appropriate lines to /etc/fstab and be done with it, or is /var needed too early in the boot process for this to work out? What should I be aware of?
2) Am I thinking too complicated and is there a much easier way to achieve this? (NFS mounting is another option, but I haven't activated this one on the NAS yet as, to be honest, the NFS admin interface on the NAS sucks - and I have no idea if this would actually change anything.)
Any thoughts would be appreciated: Can I mount system directories like /var from the network, and what would I have to take care of?