准备工作:打开虚拟机端的Oracle Linux Server 6.9的系统,然后使用root用户登录。打开终端界面,输入ifconfig -a查看IP地址。
然后在本地打开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 20479 / 80.00 GiB
Free PE / Size 0 / 0
VG UUID bv7LMk-cOzr-Phzu-VDe3-6odo-82Fs-WupLgs
--- Volume group ---
VG Name vg_oracle
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
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 20479 / 80.00 GiB
Free PE / Size 0 / 0
VG UUID j4BdLM-Mdwf-D4m4-gKFD-rYi6-M5hD-Yc26SF
第三步:创建逻辑空间,运行以下命令