You are not logged in.
To reduce write load to hard drive I am using symlinks to tempfs;
/etc/fstab creates a tempfs mount as usual
in rc.local I do:
mkdir /tmp/.cache
chown fafnir:root /tmp/.cache
mkdir /tmp/logand having done
ln -s /tmp/.cache /home/fafnir/.cache
ln -s /tmp/log /var/logI am getting errors on boot where log files cannot be created, eg dmesg saving it's boot log
Now what am I doing wrong?
[edit] typo fix
Last edited by dabbi2000 (2012-08-11 10:21:46)
Offline
rc.local is exectued after dmesg is saved, so that won't work. You could remove those lines from rc.local and use tmpfiles.d instead (it has a manpage which should explain its use).
Offline
Hmm didn't know of that, thx!
I have been resisting to mount /var/log in fstab as I read that it takes up lots of megabytes even though it isn't being used... That would of course be the easiest solution but I don't want to waste all that RAM for nothing... or is that incorrect some how?
Offline
Do you mean you were thinking of creating it as its own temporary fs in fstab? E.g.:
tmpfs /var/log tmpfs defaults 0 0Or whatever?
I don't see how using a symlink will use less RAM, though. If the symlink method worked, you'd still have all those megabytes in RAM. Or have I misunderstood?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I have been resisting to mount /var/log in fstab as I read that it takes up lots of megabytes even though it isn't being used... That would of course be the easiest solution but I don't want to waste all that RAM for nothing... or is that incorrect some how?
That's incorrect. The "size" of a tmpfs partition, is its maximal size. It will only take up the size of the files you put on it. If you run low on ram, it will swap out those files to your swap partition, so you should be fine.
Offline
Aah, my mistake - I read it wrong. The of course tmpfs is the obvious solution. Thx!
Offline