[Lustre-discuss] Lustre and Automount

Andreas Dilger andreas.dilger at oracle.com
Fri May 28 21:36:49 PDT 2010


On 2010-05-28, at 09:47, Bernd Schubert wrote:
> Without having checked the code, I think it should be fairly simple to add 
> support for that in mount.lustre:
> 
> - Cut off the directory from the filesystem name
> 
> - Mount Lustre into a temporary directory
> 
> - Bind mount lustre into the target directory
> 
> The most difficult part will be to write a single entry into /etc/mtab

After the bind mount is created, I think it should be possible to unmount the original mount.

Of course, having built-in support for this would be even better.  I always thought it would be possible to do this by changing the client mount to first get the Lustre ROOT (if it isn't already mounted), and then walk the rest of the path and instantiate the specified directory.

The other possibility is to do this at the server, but it would need a change to the network protocol (i.e. passing the subdirectory pathname as part of the GETINFO RPC) and have the MDS only return the FID of the subdirectory to the client.

>> An approach that we are testing (but haven't tried in production yet)
>> was suggested by an earlier post from Andreas Dilger, and involves two
>> automounts. The first mounts the base Lustre filesystem(s) somewhere
>> (say, /lustre) as a direct mount, the second is /etc/auto.home and looks
>> like this:
>> 
>> *    -bind    :/lustre/&
>> 
>> In our case we have an executable map that generates the mount line
>> based on the contents of the description field in LDAP (which indicates
>> which Lustre FS contains the home - we have two), but the principle is
>> the same.
> 
> That should work. The disadvantage of bind mounts is that 'lfs' does not 
> recognize it as type lustre and therefore all those nice lfs subcommands will 
> not work.

Another way to have lfs detect Lustre filesystems is to use statfs() on the filesystems and check the magic number against LL_SUPER_MAGIC instead of using the filesystem mount type.

Cheers, Andreas
--
Andreas Dilger
Lustre Technical Lead
Oracle Corporation Canada Inc.




More information about the lustre-discuss mailing list