[Lustre-discuss] creating and using loopback device on a file on a lustre filesystem?

Andreas Dilger adilger at sun.com
Sat Dec 5 17:21:05 PST 2009

On 2009-12-05, at 16:13, Richard Lefebvre wrote:
> Would it be safe to create a file on a lustre file system and use it  
> as
> a loop device for mounting?
> Sort of doing something like this (creates a 100G file):
> mount -t lustre msdserver at o2ib0:/lustre /mnt/lustre
> dd if=/dev/zero of=/mnt/lustre/myfsfile bs=1024 count=104857600
> mkfs.ext3 /mnt/lustre/myfsfile
> mkdir /mnt/myfs
> mount -o loop /mnt/lustre/myfsfile /mnt/myfs

You mean like sanity.sh test 54c does?  Yes.  However, I'm not totally  
sure that ext3 on top of a loop device is "safe", regardless of  
whether this is Lustre or not.

Some users do this (with ext2) to have a node-local mechanism for  
accessing a lot of small files.  It is also possible to use such  
loopback files in read-only mode (again with ext2 only) from many  
nodes at one time.

Cheers, Andreas
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

More information about the lustre-discuss mailing list