User Tools

Site Tools


computing:storage:disk_partitioning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:storage:disk_partitioning [2014/05/05 22:50]
gcooper
computing:storage:disk_partitioning [2014/05/05 23:41] (current)
gcooper
Line 1: Line 1:
 ====== Advanced Format (4K Sector) Drive Partitioning ====== ====== Advanced Format (4K Sector) Drive Partitioning ======
 +
 +:!: If in doubt or you just don't want to read this page, start your partition at **sector 2048** (''1MiB'').
 +
 +**Background**: https://www.ibm.com/developerworks/linux/library/l-linux-on-4kb-sector-disks/
 +
 +**Great info**: http://petersmithphotog.no-ip.biz/wiki/index.php/Partition_Alignment
  
 :!: This information is equally or more important for SSD's as it is for spinning hard drives. :!: This information is equally or more important for SSD's as it is for spinning hard drives.
Line 11: Line 17:
 There may also be a label on the drive advising that it is an Advanced Format drive. There may also be a label on the drive advising that it is an Advanced Format drive.
  
-**A simple rule to go by for creating properly aligned partitions:**+**A simple rule to go by for creating properly aligned partitions on AF drives:**
  
 Verify that every partition begins on a **sector** which is a multiple of 8.  If your partitioning tool is showing **bytes**, make sure the beginning is divisible by 4096, the new Advanced Format sector size. Verify that every partition begins on a **sector** which is a multiple of 8.  If your partitioning tool is showing **bytes**, make sure the beginning is divisible by 4096, the new Advanced Format sector size.
Line 24: Line 30:
       * Use ''unit s'' to set older parted to sector-based       * Use ''unit s'' to set older parted to sector-based
   * Start first partition at ''1M'' to assure proper alignment   * Start first partition at ''1M'' to assure proper alignment
 +      * ''1M'' equals ''2048s'' with 512-byte blocks
       * Additional partitions will also be aligned       * Additional partitions will also be aligned
   * Using the graphical ''gparted'', be sure to clear the "Round to cylinders" check box in the Create New Partition dialog box   * Using the graphical ''gparted'', be sure to clear the "Round to cylinders" check box in the Create New Partition dialog box
Line 29: Line 36:
 **''fdisk''** still uses cylinder-based alignment and does not support GPT partition tables. **''fdisk''** still uses cylinder-based alignment and does not support GPT partition tables.
  
-  * Newer versions of ''fdisk'' default to using 2048 (bytes) as the starting point+  * Newer versions of ''fdisk'' default to using ''2048s'' as the starting point
       * Creates aligned partitions       * Creates aligned partitions
       * Same default as newer Windows       * Same default as newer Windows
Line 42: Line 49:
  
 http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
 +
 +**For RAID arrays**: http://ubuntuforums.org/archive/index.php/t-1715375.html
  
 Install ''parted'' if it's not already installed: Install ''parted'' if it's not already installed:
Line 99: Line 108:
 </file> </file>
  
-:!: We make the assumption that ''2048s'' is a fairly safe assumption to create an aligned partition.  This is not always true, but is very common.  See here for more info: https://communities.netapp.com/message/97449+:!: Many newer partition tools make the assumption that ''2048s'' (or ''1MiB''is a fairly safe assumption to create an aligned partition.  This is not always true, but is very common.  See here for more info: https://communities.netapp.com/message/97449
  
 This partitions a 'data' drive with a single large, properly aligned, primary partition that will have an XFS filesystem: This partitions a 'data' drive with a single large, properly aligned, primary partition that will have an XFS filesystem:
Line 110: Line 119:
 (parted) u s (parted) u s
  
-(parted) mkpart primary xfs 2048s 100%+(parted) mkpart primary xfs 0% 100%
  
 (parted) p (parted) p
computing/storage/disk_partitioning.1399351851.txt.gz · Last modified: 2014/05/05 22:50 by gcooper