RE: fdisk versus parted

  • From: "Amaral, Rui" <Rui.Amaral@xxxxxxxxxxxxxxxx>
  • To: "Walker, Jed S" <Jed_Walker@xxxxxxxxxxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 7 Feb 2013 10:11:01 -0500

One other thing is to turn of dos compatibility (this is version dependant so 
confirm it with the version of fdisk you are using) - this would cause 
cylinders (or sectors) to be overlapped so disable that.



Rui Amaral 
Senior Oracle DBA
Oracle Database Engineering, TDBFG
E-Mail: rui.amaral@xxxxxxxxxxxxxxxx| Blackberry: 416-625-3280 | 


-----Original Message-----
From: Walker, Jed S [mailto:Jed_Walker@xxxxxxxxxxxxxxxxx] 
Sent: Thursday, February 07, 2013 10:09 AM
To: Amaral, Rui; oracle-l@xxxxxxxxxxxxx
Subject: RE: fdisk versus parted

Thanks Rui. That is probably the closest I'll get to confirm my thoughts. I 
always use sectors. It would seem from this blog that maybe the people who 
wrote the document at my company simply weren't aware that fdisk can be 
switched to sectors.

>>Do not trust cylinder numbers reported by Linux **fdisk or parted**, because 
>>both may be rounded to the nearest cylinder. As described in the Linux 
>>specific section below, set units to sectors in both tools to verify 
>>alignment.

I also check afterwards to ensure they are all correct:

  fdisk -u -l /dev/mapper/ORA*  | grep "/dev/mapper/ORA*" | grep -v "^Disk "


-----Original Message-----
From: Amaral, Rui [mailto:Rui.Amaral@xxxxxxxxxxxxxxxx] 
Sent: Thursday, February 07, 2013 7:51 AM
To: Walker, Jed S; oracle-l@xxxxxxxxxxxxx
Subject: RE: fdisk versus parted

Look in the caveats section:

https://blogs.oracle.com/dlutz/entry/partition_alignment_guidelines_for_unified


Rui Amaral 
Senior Oracle DBA
Oracle Database Engineering, TDBFG

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Walker, Jed S
Sent: Thursday, February 07, 2013 9:33 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: fdisk versus parted

We have a company document that says to not use fdisk to partition disks for 
Oracle. It says to use parted or sfdisk. It says you can't guarantee alignment 
with fdisk. My best guess is they didn't know about changing fdisk to sector 
mode, or maybe the risk that you miss it on one, but we are not sure.
While building a new system I partitioned one LUN with fdisk and one with 
parted (just for testing). Using fdisk they both show the same partition, 
except for parted ended the partition earlier than fdisk, but if I'm looking 
correctly not at an amount that would somehow make a difference. I also checked 
the previous RAC I built with fdisk and saw the same result for all those 
partitions as this fdisked one.

If anyone has any insight on this I'd appreciate it.

Here is what fdisk shows on the partitions. ORADATA01 was fdisk, ORADATA02 was 
parted. Note the "End" sector. If I'm missing something obvious please let me 
know.

[root@kdb-ch2-a1p ~]# fdisk /dev/mapper/ORADATA01

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/mapper/ORADATA01: 107.4 GB, 107374510080 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715840 sectors Units = 
sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 
0x215a6aaa

                 Device Boot      Start         End      Blocks   Id  System
/dev/mapper/ORADATA01p1            2048   209715839   104856896   83  Linux

Command (m for help): q



[root@kdb-ch2-a1p ~]# fdisk /dev/mapper/ORADATA02

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/mapper/ORADATA02: 107.4 GB, 107374510080 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715840 sectors Units = 
sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 
bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 
0x00007076

                 Device Boot      Start         End      Blocks   Id  System
/dev/mapper/ORADATA02p1            2048   209713151   104855552   83  Linux

Command (m for help): q



- Jed


--
//www.freelists.org/webpage/oracle-l



NOTICE: Confidential message which may be privileged. Unauthorized 
use/disclosure prohibited. If received in error, please go to www.td.com/legal 
for instructions.
AVIS : Message confidentiel dont le contenu peut être privilégié. 
Utilisation/divulgation interdites sans permission. Si reçu par erreur, prière 
d'aller au www.td.com/francais/avis_juridique pour des instructions.
--
//www.freelists.org/webpage/oracle-l


Other related posts: