Re: LVM and XFS cannot set blocksize on block device

Chris Wedgwood
2006-09-26T22:48:32Z

On Tue, Sep 26, 2006 at 08:58:28AM -0500, Rene Salmon wrote:

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

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