Linux Add new Hard disk

Source: Internet
Author: User

First, set the partition:

1. View the hard drive

Fdisk-l


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/B0/wKioL1Zr4s-DL209AACGEcZwJFo000.png "title=" 2015-12-12_170205.png "alt=" Wkiol1zr4s-dl209aacgeczwjfo000.png "/>

2, the partition


Fdisk/dev/sdb

3. Enter N to add a new partition

4. Input p is set to primary partition

5. Input 1 Set the partition number to 1

6, specify the starting sector, press ENTER default start, and then press ENTER by default end, representing the use of all hard disk space

7. Press W to write settings



Second, hanging on the hard disk


1. Format HDD to XFS format


Mkfs.xfs-f/DEV/SDB1


2. Create mount Directory

Mkdir-p/NEWDISK/SDB1


3. Mount the hard drive


Mount-t XFS/DEV/SDB1/NEWDISK/SDB1


Iii. Viewing mounted partitions

Df-th




Linux Add new Hard disk

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.