Re: Linux move from aufs to overlayfs fstab configuration issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Sept 2022 at 13:09, Miquel Noè <mnoe@xxxxxxxxx> wrote:
>
> Dear Mr Szeredi,
>
> My name is Miquel Noè, and I work in a small electronic engineering company although we also develop software for embedded computers using Debian.
>
> Actually in a Debian 9 we have a fstab file that creates an aufs to set /var folder as read-only and all changes goes to tmpfs that are discharted at reboot/shutdown:
>
> tmpfs /var.tmp tmpfs defaults,noatime,nosuid,nodev,exec,mode=1777,size=256M 0 0
> none /var aufs br:/var.tmp=rw:/var.ro=ro                               0 0
>
> Now I need to update to Debian 11 and aufs has been replaced by overlayfs wich I don't know how to configure to have the same behaviour.
>
> If I add to the new fstab next lines, the result (error reported) is that subfolders /var.tmp/upp and /var.tmp/wrk need to be in the same filesystem:
>
> tmpfs /var.tmp/upp tmpfs defaults,noatime,nosuid,nodev,exec,mode=1777,size=256M 0 0
> tmpfs /var.tmp/wrk tmpfs defaults,noatime,nosuid,nodev,exec,mode=1777,size=256M 0 0
> overlay /var overlay x-systemd.automount,lowerdir=/var.ro,upperdir=/var.tmp/upp,workdir=/var.tmp/wrk 0 0
>
> If I add to the new fstab next lines, the result is that subfolders /var.tmp/upp and /var.tmp/wrk don't exist:
>
> tmpfs /var.tmp tmpfs defaults,noatime,nosuid,nodev,exec,mode=1777,size=256M 0 0
> overlay /var overlay x-systemd.automount,x-systemd.requires=/var.tmp,lowerdir=/var.ro,upperdir=/var.tmp/upp,workdir=/var.tmp/wrk 0 0
>
> Probably the best soution should be that overlay line in fstab forces to create both subfolders, but I don't know how to do that. Can you tell me how should I create or configure upperdir and workdir in fstab?

One I can think of is creating a /sbin/mount.overlay script that
creates the upper and work directories before proceeding with the
actual mount.

Thanks,
Miklos




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux