Add a hard drive for CentOS using VMware _vmware

Source: Internet
Author: User

A few days ago, a colleague would install an Oracle database on the CentOS. Need to add a disk to the existing system, this is not very rare problem results are not written to the Fstab file, reboot the disk and then reload, this record the solution.

1. First edit virtual machine-add

2. Select the type of device you want to add-hard drive

3. Create a new disk (my requirement is a new disk)

4. Select the size of the disk according to your requirements (this is the experimental environment 5GB is enough)

5. Select the Virtual device node (I am the default, you can look at the first picture of the hard drive 1 is scsi (0:0) new Hard drive 2 is scsi (0:1) No problem, the independent option of the persistent non-persistent is for the snapshot, the settings will be very clear, not to say more.

6. Here to see if the choice is in line with your needs , does not conform to the last step can be changed.

7 Start Virtual machine console , or remote SSH connection to your virtual machine

8. Use

Fdisk-l

See if you have added the disk

9. Use

Fdisk/dev/sdb

Partition to Disk

M: Show All Commands
P: Display partition status
N: Set a new partition
E: Yes (extend) extended partition
P: that is (primary) main partition, we choose P here
1-4: Is the partition number, 1 to 4 can be
First/last cylinder: Start/end cylinder (I only need a zone to enter directly, if divided into multiple areas to be counted well)
W: Saving

10. Use

Fdisk-l

Check your new score (the last one/dev/sdb1)

11. Specify the file operating system for your partition (duration will be formatted longer)

12. Use

mount/dev/sdb1/test/

Mount to the directory you need

13. See the Fstab file and the sdb1 uuid under etc

Blkid/etc/sdb1

14. Open Fstab file to sdb1 the file format written in the previous line, do not move other things otherwise easy to open the machine.

15. Since then, the Mount disk has been completed. reboot can be restarted. Use

Df-h

Check it out.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.