Add a new virtual hard disk for ubuntu in vbox

Source: Internet
Author: User
After a new virtual hard disk is added to the virtual ubuntu in the vbox and Ubuntu is installed in the virtualbox, the hard disk space is insufficient. The following solutions are available: 1. add new hard disk settings-& gt; Storage-& gt; SATA controller-& gt; right-click, select Add virtual hard disk, and then ,... after a new virtual hard disk is added to the virtual ubuntu in the vbox and Ubuntu is installed in the virtualbox, the hard disk space is insufficient. The following solutions are available: 1. add new hard disk Settings-> Storage-> SATA controller-> right-click, select "Add virtual hard disk", and create a suitable hard disk as needed. 2. restart the virtual machine to view the Disk space of the existing system sudo fdisk-l. you can see the newly added virtual hard Disk, which is generally named: Disk/dev/sdb3. enter m for the newly added hard Disk partition fdisk/dev/sdb, you can see the help information command (m for help): m adds a new Partition command (m for help): n selects a basic Partition, input: p to create a Partition number (1-4): 1 press Enter First cylinder (1-15908, default 1): Enter to write and exit command (m for help ): w4. format the disk partition in ext4 format for/dev/sdb1 to enter and format sudo mkfs. ext4/dev/s Db15. create a new mount point for the mount partition sudo mkdir/work. mount the new disk partition to the/work directory sudo mount-t ext4/dev/sdb1/home/hadoop/NewDisk1/view the mount df-h shows the newly added hard disk: /dev/sdb16. mount the file sudo vim/etc/fstab to the last line: /dev/sdb1/home/hadoop/NewDisk1/ext4 defaults 0 0 a total of six parameters, in turn, are "the device where the file system is located; Mount point; file system type; Mount parameters, most systems use "defaults" to meet their needs. the last two are dump and the first is the boot sequence. if there is no need for dump, it is not enough to set the system boot disk to 0. 7. after all the hard disks are set successfully, the partitions are mounted but cannot be written. you need to change the permission: sudo chmod-R 777/home/hadoop/NewDisk1/
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.