[Lustre-discuss] can not create VHD format file in the client's shared directory using lustre FS ??
adilger at whamcloud.com
Wed Oct 26 00:47:53 PDT 2011
On 2011-10-25, at 9:24 AM, chen guihua wrote:
> I have¡¡configured lustre 1.6.5 FS, and in the client,i tried¡¡to create a VHD file in the shared directory , using command strace ¨Co logfile vhd-tuil create ¨Cn vhd.img ¨Cs 2048, and execute the command to test whether the lustre support the VHD-format file or not?, I find some information as follows:(all command are excuted in client )
> 1 in the lustre share directory,logfile records:
> open("vhd.img", O_WRONLY|O_CREAT|O_TRUNC|O_DIRECT, 0644) = 3
> lseek(3, 0, SEEK_SET) = 0
> write(3, "conectix\0\0\0\2\0\1\0\0\0\0\0\0\0\0\2\0\0267\306\212tap\0"..., 512) = -1 EINVAL (Invalid argument)
The "sector size" for Lustre is 4096 bytes (actually PAGE_SIZE),
not 512 bytes. You are using O_DIRECT (which, by the way, is
_really_ slow with such small IO sizes), so the IO needs to be
sized and aligned at 4096-byte boundaries.
This will be true of newer "advanced format" disk drives as well,
so you need to update your code to use 4kB IOs, or better yet to
just use buffered IO.
More information about the lustre-discuss