How to Align Disk Partitions using the fdisk utility
Résumé: Our charter is to deliver solutions that simplify IT by providing database solutions, custom development, dynamic datacenters, flexible computing.
Cet article concerne
Cet article ne concerne pas
Cet article n’est associé à aucun produit spécifique.
Toutes les versions du produit ne sont pas identifiées dans cet article.
Symptômes
Applies to:
Operating System(s) - Oracle Enterprise Linux 4.x, Oracle Enterprise Linux 5.x, RedHat Enterprise Kernel 4.x, RedHat Enterprise Kernel 5.x, Unbreakable Enterprise Kernel for Oracle Linux 5.5 and higher
Storage Platform(s) - Dell EqualLogic PS Series, Dell PowerVault MD Series
Author:
Naveen Iyengar
Problem:
How do I align disk partitions for systems running a Linux operating system using the fdisk utility?
Solution:
This article uses Linux's native partition utility fdisk to align the partitions on the Volumes/Virtual Disks (VD). The following example indicates the arguments for the fdisk utility.
To use the fdisk utility to adjust a disk partition, do the following steps:
NOTE: This article assumes that the disk to be aligned already contains a single primary partition. If that is not the case then create a new single primary partition on the disk before following the steps below.
CAUTION: In a system running the Linux operating system, align the partition table before data is written to the Volume/Virtual Disk (VD). The partition map is rewritten and all data on the Volume/VD is destroyed.
At the command prompt, type:
- #> fdisk /dev/<block_device> where <block_device> is the name of the block device that you are adjusting. For example, if the block device is /dev/sdb, type: fdisk /dev/sdb
The system displays the following message:
The number of cylinders for this disk is set to 8782. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:
Software that runs at boot time (e.g., old versions of LILO)2)booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
- Command (m for help): x # To enter the expert Mode
- Expert command (m for help): b # To move beginning of data in a partition
- Partition number (1-4): 1 # The partition number to be aligned
- New beginning of data (128-xxxxx, default 128): 128
NOTE: 128 blocks or 64KB is the default Stripe Element Size of EqualLogic PS Series and PowerVault MD Line of storage arrays. Hence we adjust the beginning of the data partition to 128 blocks.
- Expert command (m for help): wq # write and quit
- Repeat step 1 for all the disks that need to be aligned
- Run the following command to re-scan all the partitions:
- Verify that the partition has been aligned by running the following command:
where <block_device> is the name of the block device that we aligned the partition of. Below is an example of a sample output of the above command on a block device that has been aligned. If you partition is properly aligned then you will see 128 under the Start column against your partition.
Disk /dev/mapper/mpath70: 53.6 GB, 53697576960 bytes
255 heads, 63 sectors/track, 6528 cylinders, total 104878080 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/mapper/mpath70p1 128 104872319 52436096 83 Linux
- If required, reboot the system for the kernel to be able to re-read the new partition table or if you do not see your newly created aligned partition.
Propriétés de l’article
Numéro d’article: 000147734
Type d’article: Solution
Dernière modification: 21 févr. 2021
Version: 3
Trouvez des réponses à vos questions auprès d’autres utilisateurs Dell
Services de support
Vérifiez si votre appareil est couvert par les services de support.