[Top] [All Lists]

Re: Initial mount with inode32 option

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: Initial mount with inode32 option
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 25 Jan 2013 06:38:59 +1100
Cc: Harry Edmon <harry@xxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130124185515.GB27055@xxxxxxx>
References: <51006D3E.6080704@xxxxxx> <20130123232244.GZ27055@xxxxxxx> <510160F4.5050101@xxxxxx> <20130124185515.GB27055@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Jan 24, 2013 at 12:55:15PM -0600, Ben Myers wrote:
> Hi Harry,
> On Thu, Jan 24, 2013 at 08:27:32AM -0800, Harry Edmon wrote:
> > I see that some of the discussion on the mailing list has to do with
> > smaller disk partition. 
> Dave showed that filesystems which are too small to create 64 bit inodes will
> report still report an inode allocation policy of inode64 even when inode32 is
> specified in the mount options.  This doesn't mean that 64 bit inodes will be
> created.
> > I would like this option for big partisions
> > (i.e. 2 TB and greater)
> Lets try a 2TB filesystem:

Keep in mind that it is the size of the inodes that determines the
offset at which inode32 becomes active due to the encoding that is
used to index the inode location. For the default 256 byte inodes,
it's 1TB, for 512 byte inodes it is 2TB, 1k inodes is 4TB and 2k
inodes it is 8TB....

> ## create a sparse file by writing a byte at 2 terabyte offset 
> # xfs_io -c "pwrite 2t 1" -f 2t
> wrote 1/1 bytes at offset 2199023255552
> ## make a filesystem in that sparse file
> # mkfs.xfs 2t

# mkfs.xfs -i size=512 2t
meta-data=2t                     isize=512    agcount=4, agsize=134217728 blks
         =                       sectsz=512   attr=2, projid32bit=0
         =                       crc=0
data     =                       bsize=4096   blocks=536870912, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=262144, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
# mount -o loop,inode32 2t /mnt/scr
# grep scr /proc/mounts
/dev/loop0 /mnt/scr xfs rw,relatime,attr2,inode64,noquota 0 0


Dave Chinner

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