I have a linux with a read only root filesystem and a read-write overlayfs mounted over it:
# mount
overlayfs on / type overlayfs (rw,relatime,lowerdir=/root_ro/,upperdir=/root_rw/)
...
The overlayfs is almost full
# df
Filesystem 1K-blocks Used Available Use% Mounted on
overlayfs 4003548 3995012 8536 99% /
...
How can I identify files consuming the read/write part of the overlayfs? The du
does not differentiate space occupied on ro and rw media. I have found the option -fstype type
in find
but my linux has busybox and the find does not support this option there.
EDIT: add output from cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /dev devtmpfs rw,relatime,size=1026976,nr_inodes=256744,mode=755 0 0
/dev/sda1 /root_rw ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
ubi0:rootfs /root_ro ubifs ro,noatime,nodiratime 0 0
overlayfs / overlayfs rw,relatime,lowerdir=/root_ro/,upperdir=/root_rw/ 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/root_ro
and/root_rw
in the filesystem. I am not an overlayfs expert but I guess /root_ro and /root_rw are available only during an early boot stage and then system does "a magic" and these directories are not visible anymore. – Zaboj Campula Apr 20 '16 at 08:04/
. You can still access the branches through a bind mount in a different location. They might be mounted somewhere already. Check the output ofcat /proc/mounts
— if you don't understand how to find it, add this output to your question. – Gilles 'SO- stop being evil' Apr 20 '16 at 10:33/proc/mounts
to the question. – Zaboj Campula Apr 20 '16 at 15:53/
shadows the mount points. There's a solution in your case (see my edit) but I don't know if there's a general solution. – Gilles 'SO- stop being evil' Apr 20 '16 at 17:23