Linux application disk (from disk) Mount method

Source: Internet
Author: User
Tags hex code

1. Confirm that the disk has been added

2. Restart the virtual machine
View disk space on an existing system
Fdisk-l
You can see the newly added virtual hard disk, typically named: DISK/DEV/HDB1

3. Partition the newly added hard disk
Fdisk/dev/hdb1
Type m to see Help information
Command (M for help): M
Add New partition
Command (M for help): N
Select Basic Partition, enter: P
Build a partition
Partition number (1-4): 1
Enter
The cylinder (1-15908,default 1): Enter

Set Partition type

Command (M for help): t

Set the partition number

Partition number (1-4): 1

Input partition type

Hex code (type L to list codes): 8e

View current partition

Command (M for help): P

Write and exit
Command (M for help): W

To make the partition table effective, restart, or execute the following command

Partprobe

Using pvcreate conversion

Pvcreate/dev/hdb1

4. Format a disk partition
Format the/DEV/HDB1 into the ext3 format
Mkfs.ext3/dev/hdb1
5. Mount Partition
Create a new mount point
Mkdir/work
To mount a new partition to the/work directory
Mount-t Ext3/dev/hdb1/work
View Mount
Df-h
You can see the newly added hard drive:/dev/sdb1
6. Automatic mount on Boot
modifying files
Vi/etc/fstab
On the last line, add:
/dev/hdb1/work ext3 defaults 0 0

: sq Save Exit can be

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.