Ga tan Harter:
> I'll try to clarify my situation.
>
>
> On the server I will have the following unions, that all share the 
> /mnt/linux_basic_image  RW branch
>
>      server# mount -t aufs  -o  
> br:/mnt/linux_basic_image=rw,/mnt/board_1_files=ro     /export/image_board_1
>      server# mount -t aufs  -o  
> br:/mnt/linux_basic_image=rw,/mnt/board_2_files=ro     /export/image_board_2

        :::

> Now, on client_1, if I make a modification on my filesystem.
> It will propagate via nfs to the server, which will be catched by aufs, which 
> will update the files in /mnt/linux_basic_image branch.
> But there are 199 other nodes also using the same branch 
> /mnt/linux_basic_image.
>
> Will aufs manage to seamlessly propagate the change to the others aufs mounts 
> too?
> or will it consider that it is a UBDA for the 199 other nodes ? and I will 
> need to use 'ubda=notify'.

I see.
You mount many aufs-es on NFS server and export them.
In this case, for /image_board_2, changes made to /linux_basic_image via
/image_board_1 (regardless on server or client) is equivalent to
UDBA, because the change is made outside of aufs-image_board_2. So you
need "udba=notify".


> And in the case I'd put this rw branch in "udba=notify" mode, how many files 
> will be monitored by aufs via libnotify, the actual number of files or 200 
> times the number of files ?

Aufs doesn't use libnotify. Instead, it is done in kernel space.
Aufs doesn't have limit to set inotify. It is limited by the number of
VFS cached inode. When VFS thinks it becomes a memory pressure, VFS
discards inode cache including aufs inodes. When an aufs inode is
released, it unsets the inotify settings.
In other words,
- aufs inode refers to the branch inode (the inodes on
  /mnt/linux_basic_image in your case), and sets inotify. Eg. the aufs
  inode monitors the corresponding branch inode.
- when no one referts to the aufs inode and VFS discards the cached aufs
  inode, aufs unsets inotify and decrements the reference count of the
  branch inode.

Additionally aufs sets inotify for the directory only instead of every
files. It has a good effect to reduce the number of inotify settings.


> My problem is more on the implementation of aufs than usage.
> It's kinda like "does aufs consider each mount separated from the others, or 
> does it share data between all mounts"

The mounted /aufsA differs from another mounted /aufsB. Yes, aufs
considers each mount separated from others.

I'd suggest you to check
http://aufs.cvs.sourceforge.net/viewvc/aufs/aufs/sample/diskless/

It is a very old aufs sample for diskless systems and mount aufs on NFS
client. So several things are different from current aufs. But there may
be something you can count on.


J. R. Okajima

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to