I tried the verbose option, but it doesn't produce enough output.

 > mkdir union a b
 > mount -t aufs aufs union -o verbose,br:a=rw:b=rw
 > cat > union/lock # in separate term
 > mount union -o remount,del:a
[  114.704254] aufs au_br_del:758:mount[1215]: 1 file(s) opened
mount: /tmp/union is busy

It doesn't produce any output for other operations.
 > mount union -o remount,ro,mod:a=ro
mount: /tmp/union is busy


I recompiled and tried the sysrq, which produced hundreds of lines of 
output (snippet of the "lock" file below)
 > echo a > /proc/sysrq-trigger
[  131.748018] aufs: files
[  131.748018] f-1: mode 0x1e, flags 0100001, cnt 1, v 0, pos 0, mmapped 0
[  131.748018] d-1: /?/lock, aufs, cnt 1, flags 0x0
[  131.748018] i-1: i11, aufs, cnt 1, nl 1, 0100666, sz 0, blk 0, ct 
4562, np 0, st 0x0, f 0x0, v 2, g 33601049
[  131.748018] f0: mode 0x1e, flags 0100001, cnt 1, v 0, pos 0
[  131.748018] d0: a?/lock, tmpfs, cnt 3, flags 0x0
[  131.748018] i0: i1717, tmpfs, cnt 2, nl 1, 0100666, sz 0, blk 0, ct 
4562, np 0, st 0x0, f 0x0, v 0, g 4c4cf59f


Well, I'm not happy with the answer, but I have to admit you did answer 
my question.

I don't think I want to go down the route of parsing the output from a 
debugging interface.
It'll be easier to kill and restart all the processes on the union when 
a branch is locked.

Thanks again,

Lou


BTW, I have a simple perl script which shows the mounts, including aufs 
branches, in a columnar layout.
If anyone wants it let me know; I'll clean it up and post it somewhere.

/           aufs       rw,relatime,si=49b928fd   /mnt/root=rw
                                                  /mnt/initrd=rr
/dev        tmpfs      rw,relatime,size=2048k    tmpfs
/dev/pts    devpts     rw,relatime,mode=600      devpts
/dev/shm    tmpfs      rw,relatime,size=262144k  tmpfs
/mnt/boot   ext2       rw,relatime,errors=continue /dev/hda1
/mnt/initrd squashfs   ro,relatime               /dev/loop0
/mnt/root   ext2       rw,relatime,errors=continue /dev/hda1
/proc       proc       rw,relatime               proc
/sys        sysfs      rw,relatime               sysfs
/tmp        tmpfs      rw,relatime,size=262144k  tmpfs
/tmp/union  aufs       rw,relatime,si=4b0e66fd,verbose /tmp/a=rw
                                                  /tmp/b=rw


On 07/25/2010 07:57 PM, sf...@users.sourceforge.net wrote:
> Lou Gosselin:
>    
>> How do I know which processes are locking a specific branch?
>>      
>       :::
>    
>> # Any manipulation on the union results in locked file errors
>>   >  mount union -o remount,del:branch1
>> mount: /tmp/union is busy
>>      
> How about the "verbose" option?
>
> (from the aufs manual)
> ----------------------------------------------------------------------
> .B verbose | v
> Print some information.
> Currently, it is only busy file (or inode) at deleting a branch.
> ----------------------------------------------------------------------
>
> If you enable AUFS_DEBUG and MAGIC_SYSRQ, then Magic SysRq + A will
> print the all opened files.
>
>
> J. R. Okajima
>    


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/

Reply via email to