CentOS Mount New Hard Drive

Source: Internet
Author: User

1. View current drive usage: [email protected]_node1 ~]# df-hfilesystem Size used Avail use% mounted on/dev/mapper/volgroup-             Lv_root 35G 25G 8.3G 76%/tmpfs 1.9G 0 1.9G 0%/dev/shm/dev/sda1 485M 35M 425M 8%/boot/dev/mapper/volgroup-lv_home 33G 176M 31G 1%/home 2. View New Hard Drive

#fdisk –l

The newly added hard drive is numbered/dev/sdb

 3.Hard disk Partitioning
1) Enter Fdisk mode
#/sbin/fdisk/dev/sdb
2) enter N to partition

3) Select the partition type

Here are two options:
? P: Primary partition can have a maximum of 4 main partitions on Linux
? E: There can be only 1 extended partitions on the extended partition Linux, the extended partition cannot be used directly after creation, and the logical partition on the extended partition will be created.
Here I choose the P.
4) Select the number of partitions

can choose 4 partitions, here I only divided into 1 partitions
5) Set the cylinder, select the default value here to

6) Enter W, write to partition table, partition
4. Formatting partitions

Format the new partition as a ext3 file system
1) If you are creating a primary partition
#mkfs-T EXT3/DEV/SDB1

5. Mount the hard drive

1) Create mount point
Create the storage directory under the root directory
#mkdir/storage
2) mount the/DEV/SDB1 to the/storage
#mount/dev/sdb1/storage

6. Set up auto mount on boot
The newly created partition cannot be mounted automatically and will be mounted manually each time the machine is restarted.
Set boot auto mount requires modification of/etc/fstab file
#vi/etc/fstab
Add a line at the end of the file
/dev/sdb5/storage ext3 Defaults 1 2

CentOS Mount New Hard Drive

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.