Overlay Mounts
I can't seem to master overlay mounts. (CentOS 7.5)
I want to move changes to /var into tmpfs. Before anyone panics I'll be shipping logs to a log server. I've created a script called /usr/local/lib/dracut/modules.d/var-mount.sh Code:
if ! ismounted /run/var; then Executing these lines singlely, everything works except the overlay mount. Code:
# mount -t overlay -o lowerdir=/var,upperdir=/run/var/upper,workdir=/run/var/work /run/var ... [ 3463.917113] overlayfs: unrecognized mount option "size=524288k" or missing value Huh? Why doesn't it object to this on the /run/var mount? Has anyone else successfully moved /var to tmpfs using overlay? |
You might want to just to /var/log instead of all of /var. More goes in /var than just logs. Did you look at: OverlayFS? This link also seems applicable: MOUNTING A FILE SYSTEM.
|
Can't just do logs because of spool, cache, tmp, and other unanticipated subdirs which may need write depending on the application.
I hadn't seen that RHEL article, thanks. There's a bad gotcha with XFS, which is the default filesystem on install. I doubt it's being created with that switch. Shared mounts aren't really applicable. Overlay is a different animal. And Arch's article hasn't helped at all. What I know so far is that in order to do the overlay mount early enough in init so as not to modify the underlying /var, it must be done by a script in /usr/local/lib/dracut/modules.d something like this: Code:
if ! ismounted /run/var; then |
Great. Nobody knows dracut in-depth.
|
Sorry, this is the first I've heard of overlayfs. I did a google search on:
Code:
rhel 7 overlay mounts site:redhat.com |
All times are GMT -5. The time now is 04:19 AM. |