Hello,
I would like to suggest one feature which may be useful for aufs.

Currently one can use 'add', 'del' and 'mod' parameter for remount. 'Add' 
inserts a new branch, 'del' removes it and 'mod' modifies the permission flag 
(readonly/readwrite).

It could be useful to support 'mov' parameter, which would reorder branches;
(or maybe do it in the existing 'mod' with a new syntax)

For example, lets say I have the following branches in aufs union:

  /mnt/empty=rw
  /mnt/hda1=ro
  /mnt/hda2=ro
  /mnt/hda3=ro

In this situation, files from /mnt/hda1 precede all other branches.
Now I decide I need files from hda3 to take precedence.
So it's needed to move /mnt/hda3 to the index 1, for example like:

  mount -t aufs -o remount,mov:/mnt/hda3:1 aufs /mnt/union

or, if you prefer to do it with the existing 'mod' parameter, maybe something 
like:

  mount -t aufs -o remount,mod:/mnt/hda3=ro:1 aufs /mnt/union

This would take the last branch (index 3) and it would 'move' it to the index 
1, so the aufs union will look like this:

  /mnt/empty=rw
  /mnt/hda3=ro
  /mnt/hda2=ro
  /mnt/hda1=ro

Since then, files from hda3 take precedence. Currently, it is possible to do 
this by removing the branch and then adding it back to a different index, but 
this may break running applications or removing can be impossible at all.

I have no idea if this is very hard or easy to implement in aufs. If it is very 
hard, then please just add it to your todo list and focus on more important 
things :) But if it is very easy, it may be interesting to have such a feature.


Thank you for consideration

Tomas M


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Reply via email to