After loading Ubuntu in VirtualBox, found that the hard disk space is too small, how to increase the capacity of hard disk? That's to build another hard drive.

Source: Internet
Author: User

After loading Ubuntu in VirtualBox, I found that the hard disk space is too small to increase the capacity of the hard disk. That is to build another hard drive:

1. Add a new hard drive

Settings, Storage, SATA controller, right-click, select “ Add virtual hard disk ”

Then, create the right hard drive on demand

2. Restart the virtual machine

To view disk space for an existing system

sudo fdisk-l

You can see the newly added virtual hard disk, the general name is: Disk/dev/sdb

3. Add a new hard drive partition

Fdisk/dev/sdb

Type m to see the 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

First cylinder (1-15908,default 1): Enter

Write and exit

Command (M for help): W

4. Format the partition of the disk

/DEV/SDB1 into format using the EXT4 format

sudo mkfs.ext4/dev/sdb1

5. Mount Partitions

Create a new mount point

sudo mkdir/work

Mount the new disk partition under the/work directory

sudo mount-t ext4/dev/sdb1/work

View Mounts

Df-h

You can see the newly added hard drive:/dev/sdb1

6. Auto mount on Boot

Modify a file

sudo vim/etc/fstab

In the last line join:

/dev/sdb1/work ext4 Errors=remount-ro 0 1

Complete!

This article is from the "Cool Ice" blog, please make sure to keep this source http://liangbing8612.blog.51cto.com/2633208/652333

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.