然后在本地打开XShell软件使用以下命令进入虚拟机的终端。
ssh root@192.168.91.129
192.168.91.129为自己的IP地址。
查看硬盘分区
[root@linuxidc ~]# fdisk -l
得到以下内容:其中/dev/sdb用来挂载oracle,/dev/sdc用来挂载ogg。
Disk /dev/sdc: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
第一步:创建物理空间,分别运行以下命令
1 [root@linuxidc ~]# pvcreate /dev/sdb
2 [root@linuxidc ~]# pvcreate /dev/sdc
运行pvdisplay查看创建是否成功
--- Physical volume ---
PV Name /dev/sdc
VG Name
PV Size 80.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 20479
Free PE 0
Allocated PE 20479
PV UUID 68xjYx-EhLY-1W9m-2XJ9-FXJI-CnnM-5218YP
--- Physical volume ---
PV Name /dev/sdb
VG Name
PV Size 80.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 20479
Free PE 0
Allocated PE 20479
PV UUID ddjPX3-t9dE-Z0XW-2cnF-Zd9E-1M6Q-zNAmoe
第二步:创建卷组,分别运行以下命令
1 [root@linuxidc ~]# vgcreate vg_oracle /dev/sdb
2 [root@linuxidc ~]# vgcreate vg_ogg /dev/sdc
运行vgdisplay查看创建是否成功
--- Volume group ---
VG Name vg_ogg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 80.00 GiB
PE Size 4.00 MiB
Total PE 20479
Alloc PE / Size 2