In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the Linux commands fdisk and parted to create disk partition alignment, which is very detailed and has a certain reference value. Interested friends must read it!
The track area of the storage system is aligned with the Linux partition:
In order to meet the performance requirements of * *, any Imax O to the back-end storage array needs to be properly structured to avoid the cross-border phenomenon of any Imax O operation. If the Imap O operation crosses multiple boundaries, it will incur additional resource overhead and result in performance degradation. Therefore, in order to avoid the performance impact caused by partition misalignment. You need to use the worker fdisk or parted tool to create and align partitions.
How to choose the correct offset value for disk partitions, basically the value recommended by EMC and other vendors is "64KB". Why did you choose the value of 64KB? explain it here. First of all, let's talk about a concept called physical track region. Because for different types of protection levels, which can also be called Raid and disk types, the scope of this area varies. Let's give two examples:
The track area unit size in the Symmetrix cache is one Track, that is, 64 Block, 32KB sizes. "as shown in figure 2, if the disk partition is not aligned, any 32KB or larger I 8KB O needs to be done across two Track, and 50% of the 16KB 8KB may span two Track,25% or two Track, resulting in additional storage system performance overhead."
Figure 1
After looking at the example of * *, the reader may think that it would be nice to move the starting bit to the right by one Block, (MBR+Reserved=63Block), and there would be no cross-Track. Next, let's look at another example. The single stripe size of a 3x1 Raid5 is four Track, or 256Block, 128KB size. If for this type of disk, the 64th block is used as the starting position, and when the size of the linux Iblock O reaches 64KB, if the Iblock O is directly from the cache (a single track is 32KB), then exactly two reads are completed. However, if there are two consecutive 64KB I 64KB O, and physical disk reads and writes involving the back-end Raid5 are required, as shown in the following figure, the second 64KB will span two stripes, thus doubling the read or write overhead.
Figure 2
In this case, the starting position needs to be adjusted to the recommended configuration (64KB), so that the Linux***I/O size does not occur across multiple stripes. (figure 3)
Figure 3
Therefore, whether the data is read from the cache of the storage system, or in the case where the Imax O does not exist in the cache, the data needs to be read from the underlying physical disk. For different types of disks, the starting point of 64KB is a recommended configuration.
Linux creates partition alignment method:
After describing the principle of disk partition alignment, here is an example of how to create an aligned partition using fdisk. In Linux, the alignment partition operation requires empty data, because the alignment partition operation will empty the partition table and the data on the LUN will be deleted. In this example, for the / dev/emcpowerfw device, we create a disk device with a size of 51281 Cylinder (Cylinder is the unit of measurement of Symmetrix, each Cylinder size is 960KB, so the disk size is about 50GB) and the Offset dislocation size is 128block. The method and command output (figure 4) is as follows:
Method 1, use fdisk to create partition alignment
Enter at the Linux command prompt:
# fdisk / dev/emcpowerfw
Enter n to create a partition
Enter p to create the primary partition
Enter the starting Cylinder location. Default is *.
Enter the * Cylinder location, which defaults to * a Cylinder of the disk device
Enter x to enter expect mode
Enter b, the initial location of a certain partition
Set the initial position to 128block (128block size to 64KB)
Enter p again to confirm the initial location information of the partition
Enter w to save exit.
Figure 4
Method 2: create an aligned partition using parted. Parted supports more types (GPT) and larger partition sizes than fdisk. The following example shows an example of creating 128bloc partition start bits for a dev/sdb disk. The method and command output are as follows
Enter at the Linux command prompt:
# parted / dev/sdb
Adjust the display units to Sector (size 512 bytes):
(parted) unit s
List the current logical volumes:
(parted) print
Remove the original Number1 and create a primary partition with a starting bit of 128 sector and a small size of 976735934 sector.
(parted) rm 1 (parted) mkpart primary 128 976735934 (parted) print
These are all the contents of the article "how to use the Linux commands fdisk and parted to create disk partition alignment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.