<br>
<br><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 10:44 PM, Martin Rusko <span dir="ltr"><<a href="mailto:martin.rusko@gmail.com">martin.rusko@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Mon, Nov 7, 2011 at 3:12 AM, Zhu Han <<a href="mailto:schumi.han@gmail.com">schumi.han@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I got several advanced format disk, whose physical size is 4096 bytes, but<br>
> its logical size is 512 bytes:<br>
> $ sudo fdisk -l /dev/sdb<br>
><br>
> Disk /dev/sdb: 750.2 GB, 750156374016 bytes<br>
> 255 heads, 63 sectors/track, 91201 cylinders<br>
> Units = cylinders of 16065 * 512 = 8225280 bytes<br>
> Sector size (logical/physical): 512 bytes / 4096 bytes<br>
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes<br>
> Disk identifier: 0x00000000<br>
><br>
> Disk /dev/sdb doesn't contain a valid partition table<br>
><br>
> Is there any special tuning knob I should notice before formating it? IMHO,<br>
> set the sector size as 4096 bytes is enough. The default block size is 4096<br>
> bytes.<br>
> $ sudo xfs_info /dev/sdb<br>
> meta-data=/dev/sdb isize=256 agcount=4, agsize=45785912 blks<br>
> = sectsz=4096 attr=2<br>
> data = bsize=4096 blocks=183143646,<br>
> imaxpct=25<br>
> = sunit=0 swidth=0 blks<br>
> naming = version 2 bsize=4096<br>
> ascii-ci=0<br>
> log =internal bsize=4096 blocks=89425, version=2<br>
> = sectsz=4096 sunit=1 blks,<br>
> lazy-count=1<br>
> realtime =none extsz=4096 blocks=0, rtextents=0<br>
><br>
><br>
<br>
</div></div>One thing is to make sure, that your partitions are aligned to<br>
physical sector size. Recent fdisk will do it properly. See options<br>
'-c' (or 'c' in interactive mode) which sets DOS compatibility mode<br>
and '-u' (or 'u' in interactive mode) which sets units which fdisk<br>
uses. You want no DOS compatibility and units of sectors. Then first<br>
partition starts on 2048 sector (so 1MiB is available for GRUB for<br>
example) and it's gets things nicely aligned ... 2048 logical sectors<br>
= 256 physical sectors.<br></blockquote><div><br>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?<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
If you are creating more than one partition, use something like +34G<br>
while specifying end of the partition (so the next one is aligned as<br>
well).<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br>