fredx181 wrote: Sun Aug 22, 2021 4:14 pmPity... could be a limitation of 'overlay', the number of .squashfs modules that can be loaded, but not sure.
I was curious since, as you know, WeeDog has always used overlayfs for its frugal install features and I have scripted it to allow up to 99 layers by default (actually 100 layers if I included layer 00), but I've never tested how many layers can be loaded by it in practice. Don't have enough energy in me to modify its initrd to allow for more (though it is only half a dozen lines of code need changed to theoretically allow for up to 1000 layers... though not sure what use that would be in practice).
Anyway, (and this is in WDL_Arch64 not Bullseye but maybe the results useful to you) I used the following one liner to create 99 small sfs modules NNtest.sfs (each of which contain one file whose name is fileNN i.e. file02 up to file99):
Code: Select all
for i in `seq -w 02 99`;do mkdir -p $i; touch ${i}/file${i};mksquashfs $i ${i}test.sfs; rm -rf $i; done
The resulting numbered files are all layered to appear under / directory of the merged overlay.
Following successful booting with that arrangement in WeeDog_Arch64 I can now confirm that at least up to 99 sfs modules (and no doubt more) can be successfully overlaid, so overlayfs is not the limiting factor you seem to be experiencing.
As far as RAM usage is concerned, please find below the free report on immediate booting for the case of one sfs file only (01firstrib_rootfs) followed by rebooting with all of 01 up to 99 sfs modules included:
Code: Select all
Report from free utility
With only one (01firstrib_rootfs) squashfs module in overlay
[root@bootstrap ~]# free
total used free shared buff/cache available
Mem: 3855104 183184 3058060 37912 613860 3409888
Swap: 0 0 0
With total of 99 squashfs modules in overlay:
[root@bootstrap ~]# free
total used free shared buff/cache available
Mem: 3855104 293660 2936992 37800 624452 3295204
Swap: 0 0 0
So, at a glance, seems to be only using about 1MB per additional sfs module mounted as a layer; approx: (293MB - 183MB)/99.
I've attached a few images of pcmanfm illustrating the experiment somewhat.
Loaded fast and without issue by the way, so using large numbers of numbered sfs modules (at least with WeeDog) seems to be more practical than I actually imagined it would be. Now I wonder what the actual limit to the number is - that experiment will have to wait however... 
Cheers,
wiak