Patrick Lane:
> I have hunders of servers netbooted with an aufs overlay (/dev/sda1) of 
> an nfs mounted root filesystem. The biggest problem that occurs in our 
> system is something being copied up and blocking updates on the shared 
> nfs image.

Do you mean something like this scenario?
- on nfs client, you made some change to a file and the file is
  copied-up.
- and then, on nfs server, you made another change to the same file.
- finally, nfs client doesn't know about the changes made on nfs server.

And do you mean the first copyup is unnecessary?
If so, how about setting 'rw' to your nfsroot?
# mount -t aufs -o br:/your/overlay:/your/nfsroot=rw none /your/aufs
Then the files will be updated on nfsroot directly, instead of copyup.

Also you may want to specify 'create_policy' mount option. Its default
behaviour is 'top-down-parent' which means 
"Selects the highest writable branch where the parent dir exists. If
the parent dir does not exist on a writable branch, then the internal
copyup will happen." (from the aufs manual) when you create something in
aufs.

If the first copyup is necessary, then how about pushing files on nfs
client to nfs server using aubrsync (see detail aufs2-util GIT tree),
before you make change on nfs server?

Or if the number of files in such situation is not so much, you may want
to 'bind mount' for them.
# mount -o bind /your/nfsroot/fileA /your/aufs/fileA
# mount -o bind /your/nfsroot/fileB /your/aufs/fileB
        :::
This is my newest knowledge. :-)


> What I'm wondering is this:
> 
> - is there a way to view all copied up files based on aufs data and not 
> by searching through files locally on /dev/sda1?

What I know is what you wrote (looking /dev/sda1 locally) only.


> - is there a way to remove said copied up files other than mounting the 
> overlay (/dev/sda1) and deleting, then mount -o remount /?

If you enable CONFIG_AUFS_HINOTIFY and specify udba=inotify aufs mount
option, you will be able to remove files directly without remounting.


J. R. Okajima

------------------------------------------------------------------------------

Reply via email to