How to mount a new hard disk under centos on the aliyun Server

Source: Internet
Author: User
Tags aliyun

How to mount a new hard disk under centos on the aliyun Server
1. Use fdisk-l to check whether a new hard disk is not mounted. 2. initialize and format the hard disk.

1. fdisk/dev/xvdb1
2. m n p 1 w
3. fdisk-l check whether the partition is complete
4. mkfs. ext3/dev/xvdb1

3. Mount directory
1. Add the folder mkdir data22, mount the hard disk to data2: mount/dev/xvdb1/data23, vi/etc/fstab to write or use: echo '/dev/xvdb1/data2 ext3 defaults 0 0'>/etc/fstab 4. View df-h
Related usage

Move the old file to data2
Mv data0/* data2/

Detach a mount point:
Modify the mounting record: vi/etc/fstab

View the folder size

1. ls-lht
2. du-sh/data2 or du-sh *
3. du-s backup. sh, ls-lh backup. sh

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: 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.