Re: Max theoretical XFS filesystem size in review

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 08, 2024 at 10:54:08AM +1100, Dave Chinner wrote:
> On Wed, Feb 07, 2024 at 02:26:53PM -0800, Luis Chamberlain wrote:
> > I'd like to review the max theoretical XFS filesystem size and
> > if block size used may affect this. At first I thought that the limit which
> > seems to be documented on a few pages online of 16 EiB might reflect the
> > current limitations [0], however I suspect its an artifact of both
> > BLKGETSIZE64 limitation. There might be others so I welcome your feedback
> > on other things as well.
> 
> The actual limit is 8EiB, not 16EiB. mkfs.xfs won't allow a
> filesystem over 8EiB to be made.

A truncated 9 EB file seems to go through:

truncate -s 9EB /mnt-pmem/sparse-9eb; losetup /dev/loop0 /mnt-pmem/sparse-9eb
mkfs.xfs -K /dev/loop0
meta-data=/dev/loop0             isize=512    agcount=8185453, agsize=268435455 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=1
         =                       reflink=1    bigtime=1 inobtcount=1 nrext64=1
data     =                       bsize=4096   blocks=2197265625000000, imaxpct=1
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Should we be rejecting that?

Joining two 8 EB files with device-mapper seems allowed:

truncate -s 8EB /mnt-pmem/sparse-8eb.1; losetup /dev/loop1 /mnt-pmem/sparse-8eb.1
truncate -s 8EB /mnt-pmem/sparse-8eb.2; losetup /dev/loop2 /mnt-pmem/sparse-8eb.2

cat /home/mcgrof/dm-join-multiple.sh 
#!/bin/sh
# Join multiple devices with the same size in a linear form
# We assume the same size for simplicity
set -e
size=`blockdev --getsz $1`
FILE=$(mktemp)
for i in $(seq 1 $#) ; do
        offset=$(( ($i -1)  * $size))
	echo "$offset $size linear $1 0" >> $FILE
	shift
done
cat $FILE | dmsetup create joined
rm -f $FILE

/home/mcgrof/dm-join-multiple.sh /dev/loop1 /dev/loop2

And mkfs.xfs seems to go through on them, ie, its not rejected

mkfs.xfs -f /dev/mapper/joined
meta-data=/dev/mapper/joined     isize=512    agcount=14551916, agsize=268435455 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=1
         =                       reflink=1    bigtime=1 inobtcount=1 nrext64=1
data     =                       bsize=4096   blocks=3906250000000000, imaxpct=1
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...

I didn't wait, should we be rejecting that?

Using -K does hit some failures on the bno number though:

mkfs.xfs -K -f /dev/mapper/joined
meta-data=/dev/mapper/joined     isize=512    agcount=14551916, agsize=268435455 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=1
         =                       reflink=1    bigtime=1 inobtcount=1 nrext64=1
data     =                       bsize=4096   blocks=3906250000000000, imaxpct=1
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
mkfs.xfs: pwrite failed: Invalid argument
libxfs_bwrite: write failed on (unknown) bno 0x6f05b59d3b1f00/0x100, err=22
mkfs.xfs: Releasing dirty buffer to free list!
found dirty buffer (bulk) on free list!
mkfs.xfs: pwrite failed: No space left on device
libxfs_bwrite: write failed on (unknown) bno 0x0/0x100, err=28
mkfs.xfs: Releasing dirty buffer to free list!
found dirty buffer (bulk) on free list!
mkfs.xfs: pwrite failed: No space left on device
libxfs_bwrite: write failed on xfs_sb bno 0x0/0x1, err=28
mkfs.xfs: Releasing dirty buffer to free list!
mkfs.xfs: libxfs_device_zero seek to offset 8000000394407514112 failed: Invalid argument

I still gotta chew through the rest of your reply, thanks for the
details!

  Luis




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux