xfs
[Top] [All Lists]

Re: Advanced format disk

To: Zhu Han <schumi.han@xxxxxxxxx>
Subject: Re: Advanced format disk
From: Martin Rusko <martin.rusko@xxxxxxxxx>
Date: Mon, 7 Nov 2011 16:14:00 +0100
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Xl4N3rCjfbfl4mYPxdprwuY78R0waFjcVi2Kw1M+FwI=; b=R0+2FjP43rHq7vh+8vUdL2AHqVDsUWB0THU9Z8R4o9ZmjF7nsR3ZDHQ9CKRIMPJ8sX BE+ZVxpnOPTH1lNmweF1XtZTeUgX/cHy/zLAeNc3Dr/RguTPNy3OrufPCNrGpXsKo4ob zaQPQZBRto1lBffZYQ3sW4ADZNUhv/Mt8Cfi8=
In-reply-to: <CAF7KpS-7Vqjn07DvvVgO8xizAGnpLVZkaUNSZQ24+7NviDPO=A@xxxxxxxxxxxxxx>
References: <CAF7KpS_g1Zt9ubuXG3kqoUORUq04FNFwKbSYGKHLxkPWbcyR4A@xxxxxxxxxxxxxx> <CAMYYbY5TzxQrsfQ5ghP4VwZoQq62f4+Q4Wti2Zk6HKSWpRG1Ww@xxxxxxxxxxxxxx> <CAF7KpS-7Vqjn07DvvVgO8xizAGnpLVZkaUNSZQ24+7NviDPO=A@xxxxxxxxxxxxxx>
On Mon, Nov 7, 2011 at 3:51 PM, Zhu Han <schumi.han@xxxxxxxxx> wrote:
>
>
>
> On Mon, Nov 7, 2011 at 10:44 PM, Martin Rusko <martin.rusko@xxxxxxxxx>
> wrote:
>>
>> On Mon, Nov 7, 2011 at 3:12 AM, Zhu Han <schumi.han@xxxxxxxxx> wrote:
>> > Hi,
>> >
>> > I got several advanced format disk, whose physical size is 4096 bytes,
>> > but
>> > its logical size is 512 bytes:
>> > $ sudo fdisk -l /dev/sdb
>> >
>> > Disk /dev/sdb: 750.2 GB, 750156374016 bytes
>> > 255 heads, 63 sectors/track, 91201 cylinders
>> > Units = cylinders of 16065 * 512 = 8225280 bytes
>> > Sector size (logical/physical): 512 bytes / 4096 bytes
>> > I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> > Disk identifier: 0x00000000
>> >
>> > Disk /dev/sdb doesn't contain a valid partition table
>> >
>> > Is there any special tuning knob I should notice before formating it?
>> > IMHO,
>> > set the sector size as 4096 bytes is enough. The default block size is
>> > 4096
>> > bytes.
>> > $ sudo xfs_info /dev/sdb
>> > meta-data=/dev/sdb         isize=256    agcount=4, agsize=45785912 blks
>> >                   =                       sectsz=4096  attr=2
>> > data          =                       bsize=4096   blocks=183143646,
>> > imaxpct=25
>> >                   =                       sunit=0      swidth=0 blks
>> > naming      =                        version 2              bsize=4096
>> > ascii-ci=0
>> > log            =internal               bsize=4096   blocks=89425,
>> > version=2
>> >                  =                       sectsz=4096  sunit=1 blks,
>> > lazy-count=1
>> > realtime   =none                   extsz=4096   blocks=0, rtextents=0
>> >
>> >
>>
>> One thing is to make sure, that your partitions are aligned to
>> physical sector size. Recent fdisk will do it properly. See options
>> '-c' (or 'c' in interactive mode) which sets DOS compatibility mode
>> and '-u' (or 'u' in interactive mode) which sets units which fdisk
>> uses. You want no DOS compatibility and units of sectors. Then first
>> partition starts on 2048 sector (so 1MiB is available for GRUB for
>> example) and it's gets things nicely aligned ... 2048 logical sectors
>> = 256 physical sectors.
>
> If the whole disk is used for the file system (it is not a bootable disk so
> no partition is created), can I ignore these settings safely?
>

I've heard about some WD drives with jumper switch, which could be
used to shift logical sectors by one to be aligned somehow with
dos-compatible partitioning. If you don't have this jumper on or you
don't have drive with it, you can ignore it.

>>
>> If you are creating more than one partition, use something like +34G
>> while specifying end of the partition (so the next one is aligned as
>> well).
>>

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