VMware add hard drives under Linux

Source: Internet
Author: User

1. Add a hard disk to the settings of the virtual machine. setting, add disk, create a new virtual disk, SCSI set size, here to 3G; change the name, I use this hard drive to install Oracle, named ORADATA.VMDK 2. Formatting Hard disk.
  1. [root@yaokj ~]# fdisk -l /dev/SDB

  2. Disk /dev/sdb: 2147 MB, 2147483648 bytes
  3. 255 heads, sectors/track, 261 cylinders
  4. Units = cylinders of 16065 * 8225280 bytes

  5. Disk/dev/sdb doesn ' t contain a valid partition table

To format the hard disk, there is no need to specify the partition type, the default Linux is available.


  1. [root@yaokj ~]# fdisk /dev/SDB

  2. Command (m for help): p

  3. Disk /dev/sdb: 2147 MB, 2147483648 bytes
  4. 255 heads, sectors/track, 261 cylinders
  5. Units = cylinders of 16065 * 8225280 bytes

  6. Device Boot Start End Blocks Id System

  7. Command (m for help): n
  8. Command Action
  9. E Extended
  10. P Primary partition (1-4)
  11. P
  12. Partition Number (1-4): 1
  13. First cylinder (1-261, default 1):
  14. Using default Value 1
  15. Last cylinder or +size or +sizem or +Sizek ( 1-261, default 261):
  16. Using default Value 261

  17. Command (m for help): p

  18. Disk /dev/sdb: 2147 MB, 2147483648 bytes
  19. 255 heads, sectors/track, 261 cylinders
  20. Units = cylinders of 16065 * 8225280 bytes

  21. Device Boot Start End Blocks Id System
  22. /Dev/sdb1 1 261 2096451 Linux

  23. Command (M for help): W
    The partition table has been altered!
    Calling IOCTL () to re-read partition table.

3. Creating a File system

[Email protected] ~]# MKFS.EXT3/DEV/SDB1
4. Mount the partition. Here we will mount Oracle in the/U01 directory.

  1. [root@yaokj~] # Mount -t ext3 /dev/sdb1 /u01
  2. [root@yaokj ~] # DF -H
  3. Filesystem Size used Avail use% mounted on
  4. /Dev/sda2 3. 9G 2. 4G 1. 3G% /
  5. /Dev/sda1 46M 11M 33M% /Boot
  6. None 252M 0 252M 0 /dev/SHM
  7. /Dev/sda3 7. 0G 49M 6. 6G 1 /Home
  8. /Dev/sdb1 2. 0G 36M 1. 9G 2% /u01
  9. [root@yaokj ~] #

We see that the/DEV/SDB1 has been mounted to the/U01 directory.

After this reboot, you will have to mount the directory again. We write in the config file, and the next reboot is automatically mounted. Modify the Vi/etc/fstab partition table file

Add at end of file /dev/sdb1 /u01 ext3 defaults 0 0

Reboot .

A detailed description of the Fstab file. You can see the configuration and understanding of Fstab files in Linux.


Note: Because the data is re-mounted, the Oracle directory will be recreated and executed (otherwise Oracle would be error-included):

2.3 Creating a Directory

Mkdir-p/u01/app/

Chown-r oracle:oinstall/u01/app/

Chmod-r 775/u01/app/

VMware add hard drives under Linux

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.