/var on a 10Gb EXT4 partition separate from
/. I want to stick
/var/cache in RAM using tmpfs. The
/etc/fstab entry would be quite simple:
tmpgs /var/cache tmpfs size=500M,rw,nodev,nosuid,noexec,noatime 0,0
However, I notice that without this entry
du -sh shows the size-on-disk as:
# du -sh /var/cache 215M /var/cache
Yet if I apply the above
fstab entry, reboot, and run
du -sh again I get:
# du -sh /var/cache 160K /var/cache
Without the tmpfs entry the folders
man are present. When using the tmpfs fstab entry only the latter two are present.
I'm curious about this because:
- I don't understand when to use the bind mount flag.
- I have
/runin a tmpfs mount and now I'm not so sure about the contents of that mount being the same as what would be present if I didn't.
Why is this?