From: Dewangga Bachrul Alam <dewanggaba@xtremenitro.org>
To: Eric Sandeen <sandeen@sandeen.net>, xfs@oss.sgi.com
Subject: Re: Change sector size on existing partition
Date: Fri, 23 Jan 2015 22:40:15 +0700 [thread overview]
Message-ID: <54C26B5F.7000803@xtremenitro.org> (raw)
In-Reply-To: <54C268ED.2000801@sandeen.net>
Hi,
I'm sorry, didnt fill any information here, but here is my nodes details.
$ uname -a
Linux catalyst-db01.jkt3d.xxx 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec
17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 6.6 (Final)
The xfs and partition table build from anaconda from first install,
instalation came from CentOS 6.6. But it's weird, only this node has 4k
sector size, the others is 512.
catalyst-db01$ yum history info 1 | grep xfsprogs | fpaste
Uploading (0.2KiB)...
http://ur1.ca/jihyu -> http://paste.fedoraproject.org/173606/27434142
catalyst-db02$ yum history info 1 | grep xfsprogs | fpaste
Uploading (0.2KiB)...
http://ur1.ca/jihzp -> http://paste.fedoraproject.org/173608/27517142
Is it bug?
On 01/23/2015 10:29 PM, Eric Sandeen wrote:
> On 1/23/15 7:04 AM, Dewangga Bachrul Alam wrote:
>> Hi,
>>
>> I'm new to XFS, I have RAID-10 array with 4 disk, when I check with
>> xfs_info, the information print like this.
>>
>> $ xfs_info /var/lib/mysql
>> meta-data=/dev/mapper/vg_catalystdb01-lv_database isize=256
>> agcount=16, agsize=1600000 blks
>> = sectsz=4096 attr=2, projid32bit=0
>> data = bsize=4096 blocks=25600000, imaxpct=25
>> = sunit=0 swidth=0 blks
>> naming =version 2 bsize=4096 ascii-ci=0
>> log =internal bsize=4096 blocks=12500, version=2
>> = sectsz=4096 sunit=1 blks, lazy-count=1
>> realtime =none extsz=4096 blocks=0, rtextents=0
>>
>> Is it possible to change `sectsz` value to 512 without re-format it? Or
>> any suggestion? I have issue with current sector size, my TokuDB
>> engines[1] can't start because of this.
>>
>> [1] https://groups.google.com/forum/#!topic/tokudb-user/kvQFJLCmKwo
>
> You almost certainly need this commit to resolve the issue.
>
> You didn't say here what kernel you were using, but from your other
> post it looks like CentOS 6.4. Are you using stock xfsprogs from centos6.4
> as well? I don't remember if it chooses 4k sectors for 4k physical block
> devices or not; unless you have a custom xfsprogs version or overrode
> sector size at mkfs time, I guess it must.
>
> commit 7c71ee78031c248dca13fc94dea9a4cc217db6cf
> Author: Eric Sandeen <sandeen@sandeen.net>
> Date: Tue Jan 21 16:46:23 2014 -0600
>
> xfs: allow logical-sector sized O_DIRECT
>
> Some time ago, mkfs.xfs started picking the storage physical
> sector size as the default filesystem "sector size" in order
> to avoid RMW costs incurred by doing IOs at logical sector
> size alignments.
>
> However, this means that for a filesystem made with i.e.
> a 4k sector size on an "advanced format" 4k/512 disk,
> 512-byte direct IOs are no longer allowed. This means
> that XFS has essentially turned this AF drive into a hard
> 4K device, from the filesystem on up.
>
> XFS's mkfs-specified "sector size" is really just controlling
> the minimum size & alignment of filesystem metadata.
>
> There is no real need to tightly couple XFS's minimal
> metadata size to the minimum allowed direct IO size;
> XFS can continue doing metadata in optimal sizes, but
> still allow smaller DIOs for apps which issue them,
> for whatever reason.
>
> This patch adds a new field to the xfs_buftarg, so that
> we now track 2 sizes:
>
> 1) The metadata sector size, which is the minimum unit and
> alignment of IO which will be performed by metadata operations.
> 2) The device logical sector size
>
> The first is used internally by the file system for metadata
> alignment and IOs.
> The second is used for the minimum allowed direct IO alignment.
>
> This has passed xfstests on filesystems made with 4k sectors,
> including when run under the patch I sent to ignore
> XFS_IOC_DIOINFO, and issue 512 DIOs anyway. I also directly
> tested end of block behavior on preallocated, sparse, and
> existing files when we do a 512 IO into a 4k file on a
> 4k-sector filesystem, to be sure there were no unexpected
> behaviors.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-01-23 15:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 13:04 Change sector size on existing partition Dewangga Bachrul Alam
2015-01-23 13:39 ` Brian Foster
2015-01-23 13:46 ` Dewangga Bachrul Alam
2015-01-23 14:06 ` Brian Foster
2015-01-23 14:35 ` Dewangga Bachrul Alam
2015-01-23 15:29 ` Eric Sandeen
2015-01-23 15:40 ` Dewangga Bachrul Alam [this message]
2015-01-23 15:49 ` Eric Sandeen
2015-01-23 16:26 ` Dewangga Bachrul Alam
2015-01-23 16:44 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C26B5F.7000803@xtremenitro.org \
--to=dewanggaba@xtremenitro.org \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox