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.
- [root@yaokj ~]# fdisk -l /dev/SDB
- Disk /dev/sdb: 2147 MB, 2147483648 bytes
- 255 heads, sectors/track, 261 cylinders
- Units = cylinders of 16065 * 8225280 bytes
- 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.
- [root@yaokj ~]# fdisk /dev/SDB
- Command (m for help): p
- Disk /dev/sdb: 2147 MB, 2147483648 bytes
- 255 heads, sectors/track, 261 cylinders
- Units = cylinders of 16065 * 8225280 bytes
- Device Boot Start End Blocks Id System
- Command (m for help): n
- Command Action
- E Extended
- P Primary partition (1-4)
- P
- Partition Number (1-4): 1
- First cylinder (1-261, default 1):
- Using default Value 1
- Last cylinder or +size or +sizem or +Sizek ( 1-261, default 261):
- Using default Value 261
- Command (m for help): p
- Disk /dev/sdb: 2147 MB, 2147483648 bytes
- 255 heads, sectors/track, 261 cylinders
- Units = cylinders of 16065 * 8225280 bytes
- Device Boot Start End Blocks Id System
- /Dev/sdb1 1 261 2096451 Linux
- 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.
- [root@yaokj~] # Mount -t ext3 /dev/sdb1 /u01
- [root@yaokj ~] # DF -H
- Filesystem Size used Avail use% mounted on
- /Dev/sda2 3. 9G 2. 4G 1. 3G% /
- /Dev/sda1 46M 11M 33M% /Boot
- None 252M 0 252M 0 /dev/SHM
- /Dev/sda3 7. 0G 49M 6. 6G 1 /Home
- /Dev/sdb1 2. 0G 36M 1. 9G 2% /u01
- [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