Page 1 of 1

aufs & unionfs

Posted: Mon 23 Apr 2018, 06:19
by s243a
I'm interested in understanding aufs & unionfs with examples from the puppylinux code.

Here's part of an old thread I found from 2012 discussing Saluki

Code: Select all

#now re-evaluate all the layers...
 if [ "`lsmod | grep '^aufs' `" != "" ];then #100426
  busybox mount -t aufs -o remount,udba=reval unionfs / #remount with faster evaluation mode.
  [ $? -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=reval"
 else
  mount -t unionfs -o remount,incgen unionfs /
 fi
 sync
fi
http://www.murga-linux.com/puppy/viewto ... a89#611556

A similar example can be found in tahrpup on 194 of of usr/local/petget/installpkg.sh

Code: Select all

busybox mount -t aufs -o remount,udba=notify unionfs /
which still seems to match the Current Github Version

The Saluki version seems to of had UNIONFS as a fall-back whereas currently this fall-back looks to have been removed.

I recall finding past discussions about unionfs vs aufs, I'm not sure if we are working with some sort of hybird between the two now, as I don't understand how either work yet.

But anyway, their are currently lots of examples on the /initrd/init script of mounting via these file systems. For example

Ln# 423 of /initrd/init

Code: Select all

mount -o remount,add:1:$ONE_LAYER /pup_new

Ln# 427 of /initrd/init

Code: Select all

mount -o remount,append:$ONE_LAYER /pup_new
Ln# 733 of /initrd/init

Code: Select all

mount -o remount,add:1:${SAVE_LAYER}=ro+wh /pup_new #ro+wh = Readonly branch and it has/might have whiteouts on it

Ln# 746 of /initrd/init

Code: Select all

echo "mount -o remount,prepend:${SAVE_LAYER}=rw,mod:/mnt/tmpfs/pup_rw=ro,del:/mnt/tmpfs/pup_rw /pup_new" #debug

Ln# 1054 of /initrd/init

Code: Select all

mount -t aufs -o udba=reval,diropq=w,br=/mnt/tmpfs/pup_rw=rw,xino=/mnt/tmpfs/.aufs.xino unionfs /pup_new 
Ln# 1113 of /initrd/init

Code: Select all

mount -o remount,append:${ONE_MP}=rr /pup_new
Anyway, I'll post more as I understand more and maybe someone will kindly help me along my journey. :)

Posted: Mon 23 Apr 2018, 19:08
by mikeb
aufs works much better it seems.... see slax for better insights on union file system usage.

mike