How to mount a hard disk (9TB) Shell version under Ubuntu 12

Source: Internet
Author: User
Tags root directory

I. BACKGROUND

We have the Ubuntu Server 12.04 version installed on our servers, and because of the development environment, we have no centeos or red Hat, and we have a few big hard drives that need to be mounted to the root directory, which is not the same as Windows.

A single machine mount method can refer to: Under the Ubuntu12 mounted hard disk (9TB), if we need to install N machine, we have any good way? Is it impossible to install a single one? No, the shell can help you at this time.

Second, Mount detailed command

1. Check the disk information first

ls/dev/sd*

/dev/sda/dev/sda2/dev/sdb/dev/sdc/dev/sdd/dev/sde/dev/sdf

/dev/sda1/dev/sda5/dev/sdb1/dev/sdc1/dev/sdd1/dev/sde1/dev/sdf1

2. Format

sudo mkfs.ext4/dev/sdb1

sudo mkfs.ext4/dev/sdc1

sudo mkfs.ext4/dev/sdd1

sudo mkfs.ext4/dev/sde1

sudo mkfs.ext4/dev/sdf1

3. Create PV

sudo pvcreate/dev/sdb1

sudo pvcreate/dev/sdc1

sudo pvcreate/dev/sdd1

sudo pvcreate/dev/sde1

sudo pvcreate/dev/sdf1

4. Query the volume of the situation, obtain the VG name

sudo vgdisplay

VG Name UBUNTU1

5. Join VG (note the VG name obtained by using the query)

sudo vgextend ubuntu1/dev/sdb1

sudo vgextend UBUNTU1/DEV/SDC1

sudo vgextend ubuntu1/dev/sdd1

sudo vgextend ubuntu1/dev/sde1

sudo vgextend ubuntu1/dev/sdf1

6. Obtain available PE size (free PE)

sudo vgdisplay

Alloc pe/size 471797/1.80 TiB

Free Pe/size 1912136/7.29 TiB

7. Get LV Name

sudo lvdisplay

LV Name/dev/ubuntu1/root

8. Add LV

sudo lvextend-l+1912136/dev/ubuntu1/root

9. Modify Capacity

sudo resize2fs/dev/ubuntu1/root

10. View Effects

Df–h

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.