Page 1 of 1
Check which folders have been added to AUFS?
Posted: Fri Mar 07, 2025 7:39 am
by miltonx
Is there any command to check which folders have been added as AUFS branches? I checked aufs man page but there does not seem to be any such info.
I tried a dirty workaround by re-adding a specific folder to check if it has already been added with this command, but unfortunately this command can be executed multiple times without popping any error (although actually it was only added ONCE, on the first run).
Code: Select all
mount -t aufs -n -o remount,add:1:/initrd/folder_1=rr /
Re: Check which folders have been added to AUFS?
Posted: Fri Mar 07, 2025 3:34 pm
by Trapster
Try:
or
to show directories in the union.
Re: Check which folders have been added to AUFS?
Posted: Mon Mar 10, 2025 9:01 am
by miltonx
Trapster wrote: Fri Mar 07, 2025 3:34 pm
Try:
or
to show directories in the union.
Here is all that is shown:
Code: Select all
root@live:~# mount | grep aufs
unionfs on / type aufs (rw,relatime,si=5f0f78424f3fc530)
root@live:~# cat /proc/mounts | grep aufs
unionfs / aufs rw,relatime,si=5f0f78424f3fc530 0 0
Re: Check which folders have been added to AUFS?
Posted: Mon Mar 10, 2025 12:03 pm
by Burunduk
Once upon a time I wrote a script that shows the order of the loaded sfs files. Maybe you'll be able to adapt it to your needs. At least you'll know where the info about the aufs branches comes from.
Re: Check which folders have been added to AUFS?
Posted: Mon Mar 10, 2025 4:35 pm
by fredx181
miltonx wrote: Fri Mar 07, 2025 7:39 am
Is there any command to check which folders have been added as AUFS branches? I checked aufs man page but there does not seem to be any such info.
I tried a dirty workaround by re-adding a specific folder to check if it has already been added with this command, but unfortunately this command can be executed multiple times without popping any error (although actually it was only added ONCE, on the first run).
...
If your question is about specifically a 'dog' system using aufs (latest are using overlayfs, btw) , I noticed "root@live" at your later post, so I think so (but you didn't indicate, so just guessing).
Simply ls /mnt/live/memory/images
will give the folders from the layered filesystem, or for a graphical view go there with the file manager.
edit: curious, what is your reason for wanting to know ? Note that for Puppy it's all different.
Re: Check which folders have been added to AUFS?
Posted: Tue Mar 11, 2025 1:56 pm
by miltonx
fredx181 wrote: Mon Mar 10, 2025 4:35 pm
miltonx wrote: Fri Mar 07, 2025 7:39 am
Is there any command to check which folders have been added as AUFS branches? I checked aufs man page but there does not seem to be any such info.
I tried a dirty workaround by re-adding a specific folder to check if it has already been added with this command, but unfortunately this command can be executed multiple times without popping any error (although actually it was only added ONCE, on the first run).
...
If your question is about specifically a 'dog' system using aufs (latest are using overlayfs, btw) , I noticed "root@live" at your later post, so I think so (but you didn't indicate, so just guessing).
Simply ls /mnt/live/memory/images
will give the folders from the layered filesystem, or for a graphical view go there with the file manager.
edit: curious, what is your reason for wanting to know ? Note that for Puppy it's all different.
Yes it's a dog/puppy like system, but I only took puppy linux's kernel, while the system is debootstrap made into a minimal debian, borrowing part of your make script. Therefore it's different from a dog/puppy, and there is no /mnt/live/memory/images.
The reason I need to check branches is that my sfs-load and sfs-unload scripts are kind of different, and sometimes my sfs-unload fails, so I need to check the branches to see if I need to unload it again.
Re: Check which folders have been added to AUFS?
Posted: Tue Mar 11, 2025 2:00 pm
by miltonx
Burunduk wrote: Mon Mar 10, 2025 12:03 pm
Once upon a time I wrote a script that shows the order of the loaded sfs files. Maybe you'll be able to adapt it to your needs. At least you'll know where the info about the aufs branches comes from.
I skimmed through your script and understand the basic logic, which checks both /sys/fs/aufs and /initrd, and then finds out which /initrd/... folder has been added as a branch. This works. But I was wondering if there is any aufs-inherent command to check which folders have been added as a branch. Looks like they did not implement this, and considering aufs is becoming less popular, I'd better stop hoping for such a facility now.