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 [2012/07/26 18:12]
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 ======
  
-This information is equally or more important for SSD's as it is for spinning hard drives.+:!: 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.
  
 ===== Partition Alignment and 4K Sector Disk Drives ===== ===== Partition Alignment and 4K Sector Disk 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
  
 ===== Partitions over 2TB ===== ===== Partitions over 2TB =====
 +
 +http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/
 +
 +http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03479326&cc=us&dlc=en&lc=en
  
 http://www.ibm.com/developerworks/linux/library/l-gpt/ http://www.ibm.com/developerworks/linux/library/l-gpt/
  
 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 44: Line 57:
 yum install parted yum install parted
 </file> </file>
- 
  
 ==== Display Partitions ==== ==== Display Partitions ====
Line 83: Line 95:
                                                                                                        
 ==== Partition the Drive ==== ==== Partition the Drive ====
 +
 +Common filesystems:
 +
 +  * ''ext3''
 +  * ''ext4''
 +  * ''xfs''
 +
 +''mkpart'' command syntax:
 +
 +<file>
 +mkpart PART-TYPE [FS-TYPE] START END
 +</file>
 +
 +:!: 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 100: Line 126:
 </file> </file>
  
-==== Create the Filesystem ====+===== Create the Filesystem =====
  
 The XFS filesystem is a good choice for very large disks. The XFS filesystem is a good choice for very large disks.
Line 107: Line 133:
  
 <file> <file>
-mkfs.xfs -L Backup /dev/sdb1+mkfs.xfs -L Backup /dev/sdx1
 </file> </file>
  
Line 114: Line 140:
 <file> <file>
 yum --enablerepo=centosplus install kmod-xfs xfsdump xfsprogs dmapi yum --enablerepo=centosplus install kmod-xfs xfsdump xfsprogs dmapi
 +</file>
 +
 +==== Enable XFS on CentOS 6 ====
 +
 +<file>
 +yum install xfsdump xfsprogs
 </file> </file>
computing/storage/disk_partitioning.1343347932.txt.gz · Last modified: 2012/07/26 18:12 by gcooper