* mkfs.xfs cannot make sector size 64 KiB?
@ 2007-04-29 16:20 Justin Piszcz
2007-04-29 16:25 ` Justin Piszcz
2007-04-29 23:07 ` David Chinner
0 siblings, 2 replies; 4+ messages in thread
From: Justin Piszcz @ 2007-04-29 16:20 UTC (permalink / raw)
To: xfs
>From the manpage:
-b Block size options.
This option specifies the fundamental block size of the filesys-
tem. The valid suboptions are: log=value and size=value; only
one can be supplied. The block size is specified either as a
base two logarithm value with log=, or in bytes with size=. The
default value is 4096 bytes (4 KiB), the minimum is 512, and the
maximum is 65536 (64 KiB). XFS on Linux currently only supports
pagesize or smaller blocks.
The maximum size is 64 KiB, yet it seems only up to 32 KiB is valid?
I am running x86_64.
$ uname -m
x86_64
p34:~# mkfs.xfs -b size=512 /dev/md3
mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
p34:~# mkfs.xfs -b size=4096 /dev/md3
mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
p34:~# mkfs.xfs -b size=8192 /dev/md3
mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
p34:~# mkfs.xfs -b size=16384 /dev/md3
mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
p34:~# mkfs.xfs -b size=32768 /dev/md3
mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
p34:~# mkfs.xfs -b size=65536 /dev/md3
illegal sector size 65536
Usage: mkfs.xfs
/* blocksize */ [-b log=n|size=num]
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
(sunit=value,swidth=value|su=num,sw=num),
sectlog=n|sectsize=num,unwritten=0|1]
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n
sunit=value|su=num,sectlog=n|sectsize=num]
/* label */ [-L label (maximum 12 characters)]
/* naming */ [-n log=n|size=num,version=n]
/* prototype file */ [-p fname]
/* quiet */ [-q]
/* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */ [-s log=n|size=num]
/* version */ [-V]
devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
p34:~#
Unless, the page size is not <= 64 for x86_64?
Justin.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mkfs.xfs cannot make sector size 64 KiB?
2007-04-29 16:20 mkfs.xfs cannot make sector size 64 KiB? Justin Piszcz
@ 2007-04-29 16:25 ` Justin Piszcz
2007-04-29 17:22 ` Eric Sandeen
2007-04-29 23:07 ` David Chinner
1 sibling, 1 reply; 4+ messages in thread
From: Justin Piszcz @ 2007-04-29 16:25 UTC (permalink / raw)
To: xfs; +Cc: linux-kernel
Adding LKML to cc list.
On Sun, 29 Apr 2007, Justin Piszcz wrote:
>> From the manpage:
>
> -b Block size options.
>
> This option specifies the fundamental block size of the
> filesys-
> tem. The valid suboptions are: log=value and size=value;
> only
> one can be supplied. The block size is specified either as
> a
> base two logarithm value with log=, or in bytes with size=.
> The
> default value is 4096 bytes (4 KiB), the minimum is 512, and
> the
> maximum is 65536 (64 KiB). XFS on Linux currently only
> supports
> pagesize or smaller blocks.
>
> The maximum size is 64 KiB, yet it seems only up to 32 KiB is valid?
>
> I am running x86_64.
>
> $ uname -m
> x86_64
>
>
> p34:~# mkfs.xfs -b size=512 /dev/md3
> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
> mkfs.xfs: Use the -f option to force overwrite.
> p34:~# mkfs.xfs -b size=4096 /dev/md3
> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
> mkfs.xfs: Use the -f option to force overwrite.
> p34:~# mkfs.xfs -b size=8192 /dev/md3
> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
> mkfs.xfs: Use the -f option to force overwrite.
> p34:~# mkfs.xfs -b size=16384 /dev/md3
> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
> mkfs.xfs: Use the -f option to force overwrite.
> p34:~# mkfs.xfs -b size=32768 /dev/md3
> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
> mkfs.xfs: Use the -f option to force overwrite.
> p34:~# mkfs.xfs -b size=65536 /dev/md3
> illegal sector size 65536
> Usage: mkfs.xfs
> /* blocksize */ [-b log=n|size=num]
> /* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
> (sunit=value,swidth=value|su=num,sw=num),
> sectlog=n|sectsize=num,unwritten=0|1]
> /* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]
> /* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n
> sunit=value|su=num,sectlog=n|sectsize=num]
> /* label */ [-L label (maximum 12 characters)]
> /* naming */ [-n log=n|size=num,version=n]
> /* prototype file */ [-p fname]
> /* quiet */ [-q]
> /* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx]
> /* sectorsize */ [-s log=n|size=num]
> /* version */ [-V]
> devicename
> <devicename> is required unless -d name=xxx is given.
> <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
> xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
> <value> is xxx (512 byte blocks).
> p34:~#
>
> Unless, the page size is not <= 64 for x86_64?
>
> Justin.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mkfs.xfs cannot make sector size 64 KiB?
2007-04-29 16:25 ` Justin Piszcz
@ 2007-04-29 17:22 ` Eric Sandeen
0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2007-04-29 17:22 UTC (permalink / raw)
To: Justin Piszcz; +Cc: xfs, linux-kernel
Justin Piszcz wrote:
> Adding LKML to cc list.
>
> On Sun, 29 Apr 2007, Justin Piszcz wrote:
>
>>> From the manpage:
>>
>> -b Block size options.
>>
>> This option specifies the fundamental block size of the
>> filesys-
>> tem. The valid suboptions are: log=value and
>> size=value; only
>> one can be supplied. The block size is specified
>> either as a
>> base two logarithm value with log=, or in bytes with
>> size=. The
>> default value is 4096 bytes (4 KiB), the minimum is 512,
>> and the
>> maximum is 65536 (64 KiB). XFS on Linux currently only
>> supports
>> pagesize or smaller blocks.
>>
>> The maximum size is 64 KiB, yet it seems only up to 32 KiB is valid?
above is block size, not sector size
>> I am running x86_64.
then you are limited to blocks (and therefore sectors) <= page size, so
<= 4096.
You can -mkfs- something bigger, but you won't be able to mount it.
>> $ uname -m
>> x86_64
>>
>>
>> p34:~# mkfs.xfs -b size=512 /dev/md3
>> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
>> mkfs.xfs: Use the -f option to force overwrite.
>> p34:~# mkfs.xfs -b size=4096 /dev/md3
>> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
>> mkfs.xfs: Use the -f option to force overwrite.
>> p34:~# mkfs.xfs -b size=8192 /dev/md3
>> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
>> mkfs.xfs: Use the -f option to force overwrite.
>> p34:~# mkfs.xfs -b size=16384 /dev/md3
>> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
>> mkfs.xfs: Use the -f option to force overwrite.
>> p34:~# mkfs.xfs -b size=32768 /dev/md3
>> mkfs.xfs: /dev/md3 appears to contain an existing filesystem (xfs).
>> mkfs.xfs: Use the -f option to force overwrite.
>> p34:~# mkfs.xfs -b size=65536 /dev/md3
>> illegal sector size 65536
This is mkfs.xfs trying to be smart about making larger "sectors" (==
blocksize) on an md device, so that it does not switch the size of the
IO requests between data & metadata, slowing things down significantly.
however,
-s Sector size options.
This option specifies the fundamental sector size of
the filesystem. The
valid suboptions are: log=value and size=value; only one
can be supplied.
The sector size is specified either as a base two
logarithm value with
log=, or in bytes with size=. The default value is 512
bytes. The minimum
value for sector size is 512; the maximum is 32768 (32
KiB). The sector
size must be a power of 2 size and cannot be made larger
than the filesys-
tem block size.
looks like a buglet where it is trying to make a block == sector == 64k,
but sectors are limited to 32.
But this is not what you want anyway, assuming you want to actually
*mount* your new filesystem on x86_64. Just make take default
blocksize (4k) and be happy.
>> Usage: mkfs.xfs
>> /* blocksize */ [-b log=n|size=num]
>> /* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
>> (sunit=value,swidth=value|su=num,sw=num),
>> sectlog=n|sectsize=num,unwritten=0|1]
>> /* inode size */ [-i
>> log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]
>> /* log subvol */ [-l
>> agnum=n,internal,size=num,logdev=xxx,version=n
>> sunit=value|su=num,sectlog=n|sectsize=num]
>> /* label */ [-L label (maximum 12 characters)]
>> /* naming */ [-n log=n|size=num,version=n]
>> /* prototype file */ [-p fname]
>> /* quiet */ [-q]
>> /* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx]
>> /* sectorsize */ [-s log=n|size=num]
>> /* version */ [-V]
>> devicename
>> <devicename> is required unless -d name=xxx is given.
>> <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
>> xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
>> <value> is xxx (512 byte blocks).
>> p34:~#
>>
>> Unless, the page size is not <= 64 for x86_64?
it's not, but that's not why this broke.
-Eric
>> Justin.
>>
>>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mkfs.xfs cannot make sector size 64 KiB?
2007-04-29 16:20 mkfs.xfs cannot make sector size 64 KiB? Justin Piszcz
2007-04-29 16:25 ` Justin Piszcz
@ 2007-04-29 23:07 ` David Chinner
1 sibling, 0 replies; 4+ messages in thread
From: David Chinner @ 2007-04-29 23:07 UTC (permalink / raw)
To: Justin Piszcz; +Cc: xfs
On Sun, Apr 29, 2007 at 12:20:26PM -0400, Justin Piszcz wrote:
> >From the manpage:
>
> -b Block size options.
>
> This option specifies the fundamental block size of the
> filesys-
> tem. The valid suboptions are: log=value and size=value;
> only
> one can be supplied. The block size is specified either as
> a
> base two logarithm value with log=, or in bytes with size=.
> The
> default value is 4096 bytes (4 KiB), the minimum is 512, and
> the
> maximum is 65536 (64 KiB). XFS on Linux currently only
> supports
> pagesize or smaller blocks.
>
> The maximum size is 64 KiB, yet it seems only up to 32 KiB is valid?
> I am running x86_64.
First question - What's the page size on x86_64?
Answer: 4k.
So while mkfs will allow you to make >4k block size filesystems,
you can't mount them on x86_64 (yet).
> p34:~# mkfs.xfs -b size=65536 /dev/md3
> illegal sector size 65536
That's not an illegal block size it's complaining about - that's a sector
size that it thinks is wrong. By the time we check this, we've already
validated the block size:
1312 if (sectorsize < XFS_MIN_SECTORSIZE ||
1313 sectorsize > XFS_MAX_SECTORSIZE || sectorsize > blocksize) {
1314 fprintf(stderr, _("illegal sector size %d\n"), sectorsize);
1315 usage();
1316 }
But then we probe the underlying volume and get a "sectoralign" variable:
1301 if (!nodsflag && !xi.disfile)
1302 get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
1303 &xlv_dsunit, &xlv_dswidth, §oralign);
1304 if (sectoralign) {
1305 sectorsize = blocksize;
1306 sectorlog = libxfs_highbit32(sectorsize);
1307 if (loginternal) {
1308 lsectorsize = sectorsize;
1309 lsectorlog = sectorlog;
1310 }
1311 }
1312 if (sectorsize < XFS_MIN_SECTORSIZE ||
1313 sectorsize > XFS_MAX_SECTORSIZE || sectorsize > blocksize) {
1314 fprintf(stderr, _("illegal sector size %d\n"), sectorsize);
1315 usage();
1316 }
And if we have sectoralign returned, we adjust the sector size to the
block size and then we fail due to (xfs_alloc_btree.h):
#define XFS_MAX_SECTORSIZE_LOG 15 /* i.e. 32768 bytes */
Hmmmm - I bet this is because you are using md raid here - this is probably
the code that ensures that XFS doesn't use 512 byte writes that cause md
raid cache flushes. This is triggers on:
*sectalign = (md.level == 4 || md.level == 5 || md.level == 6);
So I bet that you're using RAID4/5/6 on your md device.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-29 23:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-29 16:20 mkfs.xfs cannot make sector size 64 KiB? Justin Piszcz
2007-04-29 16:25 ` Justin Piszcz
2007-04-29 17:22 ` Eric Sandeen
2007-04-29 23:07 ` David Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox