Linux Mounts above 2T storage

Source: Internet
Author: User
Tags uuid

In a production environment, we will encounter disks with partitions larger than 2T (e.g. add a 3TB storage), because the MBR partition table only supports 2T disks, so a disk larger than 2T must use the GPT partition table

While Fdisk does not support GPT partitioning, we can use parted to operate on GPT disks. Parted function is very powerful, both command line can also be used for interactive, at the prompt input parted will enter the interactive mode, if there are more than one disk, we need to run select SdX (x is disk) for disk selection, can also be directly used parted/dev/ SDX specify the appropriate hard disk

To view disk information:
[Email protected] ~]# fdisk-l


disk/dev/sdm:299.4 GB, 299439751168 bytes
255 heads, Sectors/track, 36404 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk Identifier:0x2ebc66f6


Device Boot Start End Blocks Id System
/DEV/SDM1 1 2089 16777216 for Linux Swap/solaris
/DEV/SDM2 * 2089 36405 275643392 Linux


disk/dev/sdn:3200.0 GB, 3199999672320 bytes
255 heads, Sectors/track, 389044 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000


[Email protected] ~]# parted
GNU Parted 2.1
Wan-Apply/DEV/SDA
Welcome to GNU parted! Type ' help ' to view a list of commands.
(parted)

(parted) SELECT/DEV/SDN//SELECT Disk SDN
Wan-Apply/DEV/SDN


(parted) Mklabel GPT//format MBR disk as GPT

(parted) Mkpart primary 0-1//partitioning the entire disk into one partition

(parted) Quit//exit


[[email protected] ~]# MKFS.EXT4/DEV/SDN1//format
MKE2FS 1.41.12 (17-may-2010)
Discarding device blocks:20447232/454545159

[Email protected] ~]# Mkdir/io

[[email protected] ~]# Mount/dev/sdn1/io//Mount

[Email protected] ~]# BLKID/DEV/SDN1
/dev/sdn1:uuid= "5abd6300-8375-4310-b1b5-5daf8576d6ff" type= "Ext4"

[Email protected] ~]# Vi/etc/fstab

Uuid=5abd6300-8375-4310-b1b5-5daf8576d6ff/io EXT4 Defaults 1 2

[Email protected] ~]# df-h
/DEV/SDN1 2.9T 200M 2.8T 1%/io

Linux Mounts above 2T storage

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.