<br>
<br><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 10:44 PM, Martin Rusko <span dir="ltr">&lt;<a href="mailto:martin.rusko@gmail.com">martin.rusko@gmail.com</a>&gt;</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 &lt;<a href="mailto:schumi.han@gmail.com">schumi.han@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I got several advanced format disk, whose physical size is 4096 bytes, but<br>
&gt; its logical size is 512 bytes:<br>
&gt; $ sudo fdisk -l /dev/sdb<br>
&gt;<br>
&gt; Disk /dev/sdb: 750.2 GB, 750156374016 bytes<br>
&gt; 255 heads, 63 sectors/track, 91201 cylinders<br>
&gt; Units = cylinders of 16065 * 512 = 8225280 bytes<br>
&gt; Sector size (logical/physical): 512 bytes / 4096 bytes<br>
&gt; I/O size (minimum/optimal): 4096 bytes / 4096 bytes<br>
&gt; Disk identifier: 0x00000000<br>
&gt;<br>
&gt; Disk /dev/sdb doesn&#39;t contain a valid partition table<br>
&gt;<br>
&gt; Is there any special tuning knob I should notice before formating it? IMHO,<br>
&gt; set the sector size as 4096 bytes is enough. The default block size is 4096<br>
&gt; bytes.<br>
&gt; $ sudo xfs_info /dev/sdb<br>
&gt; meta-data=/dev/sdb         isize=256    agcount=4, agsize=45785912 blks<br>
&gt;                   =                       sectsz=4096  attr=2<br>
&gt; data          =                       bsize=4096   blocks=183143646,<br>
&gt; imaxpct=25<br>
&gt;                   =                       sunit=0      swidth=0 blks<br>
&gt; naming      =                        version 2              bsize=4096<br>
&gt; ascii-ci=0<br>
&gt; log            =internal               bsize=4096   blocks=89425, version=2<br>
&gt;                  =                       sectsz=4096  sunit=1 blks,<br>
&gt; lazy-count=1<br>
&gt; realtime   =none                   extsz=4096   blocks=0, rtextents=0<br>
&gt;<br>
&gt;<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>
&#39;-c&#39; (or &#39;c&#39; in interactive mode) which sets DOS compatibility mode<br>
and &#39;-u&#39; (or &#39;u&#39; 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&#39;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>