hi guys. how to move /var to ram correctly? what i do: i run nfs and mountd(and portmap, without it does not work), then i mount /var via mountd to some place, for example in /mnt/var (here i have to say "thanks" to the dude who sawed out LKM, you all know his name). via mount_mfs i replace /var on disk with /var in ram, all this i writing in fstab. then i put openrsync in cron for synchronization /var in ram to original /var in /mnt/var. i also put openrsync in rc.shutdown in order to synchronize on shutdown (i can't use syncthing because in a critical task for the life of the system you can use only what is already in the system). finally, i edit /etc/rc and replace "mount -a -t nonfs,vnd" with "mount -a -t nonfs,vnd,mfs"(to be honest, i do not know what i am doing, but it works), otherwise when the system boots not everything from /var on disk is copied to /var in ram. the first problem is that after a while, without any declaration of war, the system stops responding to anything. no, she's not crashing. so i do not know what exactly is going on, there is nothing interesting in the log. the second problem is that the use of openrsync leads to the fact that mbufs grow by a thousand at once, and do not return back. and plus a thousand is not the limit, and maybe this is the reason that the system hangs. the third problem is that when the system is shutdowning, openrsync starts its dark deeds, but suddenly something kills him (i have some vague memories that this can be prevented somehow). in general, it doesn't look like my path is right. what is the right way?
ps: and i also have a terrible feeling of deja vu. it was be somewhere before? i was looking for a match, but, unfortunately, most of my archive is lost, and google is no longer the same as before