xfs
[Top] [All Lists]

Re: LVM and XFS cannot set blocksize on block device

To: Chris Wedgwood <cw@xxxxxxxx>
Subject: Re: LVM and XFS cannot set blocksize on block device
From: Shailendra Tripathi <stripathi@xxxxxxxxx>
Date: Wed, 27 Sep 2006 17:25:09 +0530
Cc: Rene Salmon <rsalmon@xxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20060926224053.GA31542@xxxxxxxxxxxxxxxxxxxxx>
References: <45185424.2030707@xxxxxxxxxx> <20060926001737.GA10224@xxxxxxxxxxxxxxxxxxxxx> <45193204.3030500@xxxxxxxxxx> <20060926224053.GA31542@xxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)
Thanks for the reply. The "-s size=4096" helped I was able to create
the file system, then mount it and use it.  I did however get a
warning still about "cannot set blocksize on block device".


I don't know much about the LVM code, my guess is that
ioctl(... ,BLKBSZSET, ...) is failing, strace would confirm this.


libxfs_device_open () seems to be working with the pre-conceived notion of assuming block devices of only 512 bytes in size.

if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK)
   platform_set_blocksize(fd, path, statb.st_rdev, 512);

This eventually calls to set the blk sz to 512. Since, your volume does not support less than 4k, it returns EINVAL. I think, libxfs_init should be modified to take pass on the -s size option to this call so that it does not happen. However, I don't see any problem despite this failure. Everything else should work fine.




Everything seems to be working but I am a bit worried about the
warning message.  Following is the message.  Any ideas if it is safe
to ignore this or any way to get rid of it?


What does:

  blockdev --getbsz /dev/vg_u00/lv_u00

say?


If mkfs.xfs is trying to set a blocksize that already matches the
underlying device, it woudn't be hard to silence the warning by doing
a check before unconditionally setting it, though I don't know that
it's worth it.




<Prev in Thread] Current Thread [Next in Thread>