Mount md1200 48 TB large storage on lvm in CentOS

Source: Internet
Author: User

Mount md1200 48 TB large storage on lvm in CentOS

1. Press CTRL + R to go to the raid settings page. Refer to Resetting raid-level on the email.

Perform RAID 5 for storage machines and raid 10 for servers. Then install the system on my server. (Choose to install the operating system on the R620 server instead of the storage server .)

In Linux, The fdisk tool does not support GPT, so parted is used for partitioning.

2. Two partition tables are introduced:

MBR Partition Table: (MBR meaning: Master Guide record)

Maximum supported volumes: 2 TB (T; terabytes, 1 TB = 1024 GB)

Limit on partitions: a maximum of four primary partitions or three primary partitions can be added with an extended partition.

GPT Partition Table: (GPT meaning: GUID partition table)

Maximum supported volume: 18EB, (E: exabytes, 1EB = 1024 TB)

Each disk supports a maximum of 128 partitions.

Method 1: directly Mount storage for formal operations

First, after the RAID Initialization is completed on the server and the storage, the server can normally see the size of the storage disk.

Fdisk-l | more # note that the file name is/dev/sdb.

Step 1: parted

1 parted # Use parted to partition disks with large data volumes

2 mklabelgpt # create a gpt Partition

3 mkpartprimary 0KB 44 TB # data size following mkpartprimary, which can be filled in according to the size you have allocated.

Mkpart primary 0-1 add all disk sizes

4 print # view information status

5 Quit # released

1.7.fdisk-l | more:/dev/sdb1

Step 2: Download the tool

Download Software Tools to recognize files larger than 16 TB.

Git clone git: // git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
Cd e2fsprogs
Mkdir build; cd build/
../Configure
Make
Make install
Cd misc

The above is the software installation process. When the partition is formatted, "Pay attention to the execution path. There is no space in the middle when the command is pasted"

1 <br>

./Mke2fs-O64bit, has_journal, extents, huge_file, flex_bg, uninit_bg, dir_nlink, extra_isize-i4194304/dev/myvg/mylv

Step 3: mount the initialized storage disk.

Mkdir/data

Mount/dev/sdb1/data

Umount/data

Last successful!

Df-h

View hard disk size:

Method 2: Expand the logical volume of LVM

The following is the lvm mounting document. Partition partitioning uses parted.

[Root @ localhost ~] # Pvcreate/dev/sdb1

Pvcreate/dev/sdb2

Pvcreate/dev/sdb3

Pvcreate/dev/sdb4

Physical volume "/dev/sdb" successfully created

For large storage, you can go to parted to view the physical volume:

2. logical volume group:

Vgcreate myvg/dev/sdb1

2.2 vgdisplay: The created logical volume group myvg is successfully created.

3. Create a logical volume

Lvcreate-n mylv-L 20 T myvg merge logical volume groups. -N: Specifies the name and-L specifies the size.

Lvdisplay

Initialize the file system. Use the following when the value is not greater than 16 TB:

Note ::

At last, because it is a 20 TB big data disk, mkfs cannot be used for formatting. the following error occurs: the disk is too large.

Mkfs. ext4/dev/myvg/mylv # This cannot be used, or you must use the following tools for formatting.

Format the logical volume using the following methods:

Git clone git: // git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
Cd e2fsprogs
Mkdir build; cd build/
../Configure
Make
Make install

During execution, note that the following file names should be written to the correct file name. When lvm executes the following initialization, it must be uninstalled (umount ).

./Mke2fs-O64bit, has_journal, extents, huge_file, flex_bg, uninit_bg, dir_nlink, extra_isize-i4194304/dev/myvg/mylv

Finally, you can mount it.

Mount/dev/myvg/mylv/data

New capacity

Previously, all the storage 40 TB has been added to the logical volume group,

Note: A single addition, and the total amount cannot exceed 16. Format a disk using mkfs. ext4

Add a new physical volume to an existing logical volume group

Vgextend/dev/mapper/vg_root/dev/sdb

Increase lv size

Lvextend-L + 269G/dev/myvg/mylv

Note the following command: if the new size cannot exceed 16 GB, do not run this command,

Note:

(Non-OnLine dynamic resizing: If the expansion capacity is greater than 16 TB, The resized area must be unmounted and the following command must be executed, the drive letter size can be added to a large partition larger than 16 TB. The drive letter must be initialized using the git tool)

E2fsck-f/dev/myvg/mylv

Increase size:

Resize2fs/dev/myvg/mylv

Summary: lvm dynamic resizing is based on the test procedure in this document. Currently, it is not allowed to dynamically scale up logic volumes over 16 TB online. However, you can use the git download tool, after the disk is initialized, You can resize the disk (the disk must be detached with the drive letter ).

Vgremove myvg Delete logical volume group

The following is a case:

After mounting/dev/sdb1 9.09 T, 20 T of the mounted/dev/sdb2/cannot be initialized.

Mount/dev/sdb1 9.09 T, and then mount 14 T of/dev/sdb3/

[Root @ localhost ~] # Resize2fs/dev/myvg/mylv

Resize2fs1.43-WIP (18-May-2014)

Resize2fs: New size too large to be expressed in 32 bits

An error message is returned. Mounting failed. With the help of the initialization tool, the previous data will be lost.

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.