Fast partition formatting in Linux is larger than 2 TB large storage capacity

Source: Internet
Author: User


In Linux, fast partition formatting is larger than 2 TB and large capacity is stored in the production environment. We will encounter a disk with a partition larger than 2 TB (for example, adding a 10 TB storage). Since MBR partition tables only support 2 TB disks, therefore, GPT partition tables must be used for disks larger than 2 TB, while multiple VD partitions are used for system installation during raid. However, after the system is installed, all disks cannot be identified, in this case, you need to manually mount the GPT partition. How can I mount a disk larger than 2 TB in linux? I will share this process with you: www.2cto.com tips: GPT-format disks are equivalent to 4*16 bytes of four partition tables in the original MBR disk, leave only the first 16 bytes, similar to the extended partition. The real partition table is 512 bytes later, and the GPT disk has no restrictions on four primary partitions. Fdisk does not support GPT partitioning. We can use parted to operate GPT disks. The parted function is very powerful. It can be used for both command lines and interactions. Inputting parted at the prompt will enter interactive mode. If there are multiple disks, run select sdX (X is the disk) to select the disk. You can also use parted/dev/sdX to specify the disk. [Root @ server ~] # Fdisk-lDisk/dev/sda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 16 128488 + 83 Linux/dev/sda2 17 49 265072 + 82 Linux swap /Solaris/dev/sda3 50 2610 20571232 + 83 LinuxDisk/dev/sdb: 2190.4 GB, 2190433320960 bytes255 heads, 63 sectors/track, 266305 cylindersUnits = cylind Ers of 16065*512 = 8225280 bytesDisk/dev/sdb doesn't contain a valid partition table [root @ server ~] # PartedGNU Parted 1.8.1Using/dev/sdaWelcome to GNU Parted! Type 'help' to view a list of commands. (parted) select/dev/sdb // select disk sdb Using/dev/sdb (parted) mklabel gpt // format MBR disk as GPT (parted) mkpart primary 0-1 // divide the entire Disk into one partition (parted) print Model: VMware, VMware Virtual S (scsi) Disk/dev/sdb: 2190 GBSector size (logical/physical): 512B/512 BPartition Table: gptNumber Start End Size File system Name Flags 1 17.4kB 2190 GB 2190 GB primary (parted) quit Informa Tion: Don't forget to update/etc/fstab, if necessary. PS: When a SCSI disk array is attached to a Linux System and the partition size exceeds 2 TB, The mk2fs command cannot be used for formatting, but mkfs is used. the-T largefile parameter must be added when formatting the ext3 command. Otherwise, the formatting process will be very slow. if you add a 10 TB storage, it will be a long process to directly format it in linux, 10 TB, which is estimated to be less than 30 hours. [Root @ server ~] # Mkfs. ext3-T largefile/dev/sdb1 hurry and try it. Xtep, flying feeling [root @ server ~] # E2label/dev/sdb1/data1 // Add (modify) The/dev/sdb1 label to/data1 [root @ server ~] # E2label/dev/sdb1 // view the partition tag/data1 [root @ server ~] # Mkdir/data1 // create a quota mount point under the/partition [root @ server ~] # Mount/dev/sdb1/data1 // manually mount the partition. After the partition is successfully mounted, df-h is used to view the disk size.
[Root @ server ~] # Df-hFilesystem Size Used Avail Use % Mounted on/dev/sda3 20G 3.9G 15G 22% // dev/sda1 122 M 12 M 104 M 10%/boottmpfs 62 M 0 62 M 0%/dev/shm/dev/sdb1 2.0 T 199 M 1.9 T 1%/data1 Add the following line in fstab, the partition can be automatically mounted. [root @ server ~] # Vi/etc/fstab/dev/sdb1/data1 ext3 defaults 0 0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.