On 07/02/2013 04:06 PM, sf...@users.sourceforge.net wrote:

> Hello Gaetan,
>
> Ga tan Harter:
>>      board_specific_files -> RO    |----> Board_specific_mount_folder-->
>>      mounted via nfs
>>      linux_basic_image    -> RW    |
>>
>> And this, for 200 hundreds of board.
>> (actually 800, but for the 600 remaining, the linux image might even be =
>>
>> read only as not given to the users)
> Unfortunately I don't fully understand what you wrote.
> I will try translating your above diagram into linux commands.
>
> # mount server:/board_specific_files /board_specific_files
> # mount server:/linux_basic_image /linux_basic_image
> # mount -t aufs -o br:/linux_basic_image=rw,/board_specific_files=ro /aufs
>
> Am I correct? Particulary the branch order and the permissions are right?
> Anyway I will try answering.
>
>
>> Questions
>> ---------
>>
>> How would aufs behave in this case?
>> If one board modifies a file, it's modified in the 'RW' branch, but will =
>>
>> the other ones see the modification?
>> Will it be considered as a "User's Direct Branch Access"?
>> Do I need to set it to 'ubda=3Dnotify' for all the image?
>> Will each file be monitored by libnotify 200 times (I for each aufs mount)?
> If the modification is made on the NFS client via /aufs, then
> - this is not UDBA
> - aufs makes the change on /linux_basic_image
> - NFS client tells the change to NFS server
> - when another NFS client accesses the file, the NFS server replies the
>    latest data. but your NFS client may cache the data and as long as the
>    NFS cache is valid, you won't see the latest data.
>
> If the modification is made on the NFS client via /linux_basic_image, then
> - this is UDBA
> - if "udba=notify" is given, aufs detects the change on
>    /linux_basic_image and makes the cached aufs data obsolete.
> - NFS client tells the change to NFS server
> - next time when the same NFS client accesses the file, aufs doesn't
>    refer the cached data in aufs (since it was already obsolete) and asks
>    NFS the latest data. but your NFS client may cache the data here.
>
> If the modification is made on the NFS server, then
> - this is not UDBA
> - when NFS client accesses the file, aufs uses its cached data but asks
>    NFS client whether the data is still valid or not.
> - if NFS client replies that the cached data is already expired, then
>    the cached data is not used. aufs requests the latest data via NFS
>    client.
>
> Hmm, it is hard for me to answer without fully understand how you mount
> aufs. So I will wait for your answer now.
>
>
> J. R. Okajima
>

Thanks J. R. for taking some of your time for me,

I didn't correctly explained my problem, I should have used a correct mount 
lines instead of diagrams.
My case is not the one you explained, but it's my fault.

Regarding your different cases, I will be in the first one, where I modify 
files on the client, so basically, if there is only one client, there is no 
problem.
The problem is that I have 200 clients.



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
     ...
     server# mount -t aufs  -o  
br:/mnt/linux_basic_image=rw,/mnt/board_199_files=ro   /export/image_board_199
     server# mount -t aufs  -o  
br:/mnt/linux_basic_image=rw,/mnt/board_200_files=ro   /export/image_board_200



And on several clients I will have the following:
(done during boot process by the initrd, that's why I would like to do all in 
one mount)

     client_1# mount -t nfs server:/export/image_board_1  /
     client_2# mount -t nfs server:/export/image_board_2  /
     ...
     client_199# mount -t nfs server:/export/image_board_199  /
     client_200# mount -t nfs server:/export/image_board_200  /


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'.


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 ?


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"



Hoping my case is clearer now.

Gaëtan


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

Build for Windows Store.

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

Reply via email to