Install a new hard disk on CentOS

Source: Internet
Author: User
Tags disk usage
1. view the current hard disk status

 Fdisk-l

2. Create a formatting hard disk and create a new partition

 Fdisk/dev/sda

Command (m for help ):

N// Create a partition
Command action
E extended
P primary partition (1-4)

P// Create the original Partition
Partition number (1-4 ):1// Partition Number
First cylinder (1-4161, default 1 ):1// Use the default start cylindrical number
Last cylinder or size or sizeM or sizeK (1-4161, default 4161 )://
EnterUse the default end cylindrical number, that is, the partition uses the entire hard disk space.
Command (m for help ):W// Save the partition

3. format the new partition.

Mkfs. ext3/dev/hdb1

4. mount a new partition

Mkdir/mnt/sda1
// Create a mount point.


Mount/dev/sda1/mnt/sda1 // mount.

Df-h
// View the current disk usage

5. automatically mount partitions

Add the mount information of the New Hard Disk in vi/etc/fstab. Add the following line:
  /Dev/hdb1/mnt/hdb1 ext3 defaults 1 2(If another partition is 1 3, and so on)

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.