虛擬機器配置共享磁碟
虛擬機器版本:VMware Workstation 10
1、建立4塊磁碟
C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -c -s 1G -a
lsilogic -t 2 E:\oracle11g_rac_sharedisk\vote.vmdk
VixDiskLib: Invalid configuration file parameter. Failed to read configuration
file.
Creating disk 'E:\oracle11g_rac_sharedisk\vote.vmdk'
Create: 100% done.
Virtual disk creation successful.
C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -c -s 1G -a
lsilogic -t 2 E:\oracle11g_rac_sharedisk\ocr.vmdk
VixDiskLib: Invalid configuration file parameter. Failed to read configuration
file.
Creating disk 'E:\oracle11g_rac_sharedisk\ocr.vmdk'
Create: 100% done.
Virtual disk creation successful.
C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -c -s 10G -
a lsilogic -t 2 E:\oracle11g_rac_sharedisk\data.vmdk
VixDiskLib: Invalid configuration file parameter. Failed to read configuration
file.
Creating disk 'E:\oracle11g_rac_sharedisk\data.vmdk'
Create: 100% done.
Virtual disk creation successful.
C:\Program Files (x86)\VMware\VMware Workstation>vmware-vdiskmanager -c -s 10G -
a lsilogic -t 2 E:\oracle11g_rac_sharedisk\flash.vmdk
VixDiskLib: Invalid configuration file parameter. Failed to read configuration
file.
Creating disk 'E:\oracle11g_rac_sharedisk\flash.vmdk'
Create: 100% done.
Virtual disk creation successful.
C:\Program Files (x86)\VMware\VMware Workstation>
2、往虛擬機器新增硬碟,結果狀態如下圖
3、修改檔案
分別在兩個虛擬機器的配置檔案中加入如下內容
disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
scsi1:0.deviceType = "disk"
scsi1:1.deviceType = "disk"
scsi1:2.deviceType = "disk"
scsi1:3.deviceType = "disk"
scsi1.sharedBus = "VIRTUAL"
4、磁碟分割槽、格式化及載入
[root@rac1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xddb38873.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305):
Using default value 1305
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2620595 blocks
131029 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@rac1 ~]# mount /dev/sdb1 /mnt/sdb1/
[root@rac1 ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 22G 5.3G 16G 26% /
tmpfs 1000M 100K 1000M 1% /dev/shm
/dev/sda1 3.9G 92M 3.6G 3% /boot
/dev/sdb1 9.9G 151M 9.2G 2% /mnt/sdb1
對其他磁碟重複以上操作
5、在第二臺虛擬機器上掛載相應磁碟
[root@rac2 ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 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: 0x0009cd88
Device Boot Start End Blocks Id System
/dev/sda1 * 1 511 4096000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 511 3407 23264256 83 Linux
/dev/sda3 3407 3917 4096000 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0xddb38873
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x824b7789
Device Boot Start End Blocks Id System
/dev/sdc1 1 1305 10482381 83 Linux
Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 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: 0xe3ae100e
Device Boot Start End Blocks Id System
/dev/sdd1 1 130 1044193+ 83 Linux
Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 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: 0xfb137d21
Device Boot Start End Blocks Id System
/dev/sde1 1 130 1044193+ 83 Linux
[root@rac2 mnt]# mount /dev/sdb1 /mnt/sdb1/
[root@rac2 mnt]# mount /dev/sdc1 /mnt/sdc1/
[root@rac2 mnt]# mount /dev/sdd1 /mnt/sdd1/
[root@rac2 mnt]# mount /dev/sde1 /mnt/sde1/
[root@rac2 mnt]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 22G 5.2G 16G 25% /
tmpfs 1000M 100K 1000M 1% /dev/shm
/dev/sda1 3.9G 92M 3.6G 3% /boot
/dev/sdb1 9.9G 151M 9.2G 2% /mnt/sdb1
/dev/sdc1 9.9G 151M 9.2G 2% /mnt/sdc1
/dev/sdd1 1004M 18M 936M 2% /mnt/sdd1
/dev/sde1 1004M 18M 936M 2% /mnt/sde1
6、修改配置檔案
[root@rac1 ~]# vi /etc/rc.local
新增如下內容
mount /dev/sdb1 /mnt/sdb1/
mount /dev/sdc1 /mnt/sdc1/
mount /dev/sdd1 /mnt/sdd1/
mount /dev/sde1 /mnt/sde1/
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30031456/viewspace-1358772/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VirtualBox虛擬機器新增共享磁碟虛擬機
- 如何建立虛擬機器上建立 Cluster 共享磁碟虛擬機
- vmware 虛擬機器中配置共享裸裝置虛擬機
- 虛擬機器磁碟不足,新增磁碟擴容虛擬機
- 虛擬機器磁碟擴容parted虛擬機
- 虛擬機器(三)虛擬機器配置靜態Ip虛擬機
- linux虛擬機器磁碟擴容Linux虛擬機
- 虛擬機器磁碟中毒解密恢復虛擬機解密
- 虛擬機器做ISCSI共享儲存虛擬機
- 虛擬機器網路卡配置虛擬機
- 使用虛擬機器配置dataguard虛擬機
- vmware虛擬機器與主機檔案共享虛擬機
- 虛擬機器VMware 安裝centos、常規配置、共享檔案等虛擬機CentOS
- Linux虛擬機器擴充套件磁碟Linux虛擬機套件
- 虛擬機器增加磁碟分割槽的大小虛擬機
- vmware克隆虛擬機器centos6.5,虛擬機器從新配置虛擬機CentOS
- ubuntu虛擬機器 掛載共享目錄Ubuntu虛擬機
- Linux無停機增加虛擬機器磁碟容量Linux虛擬機
- 虛擬機器虛擬磁碟丟失的資料恢復成功案例虛擬機資料恢復
- VMware虛擬機器與主機共享資料夾虛擬機
- 一、虛擬機器環境配置虛擬機
- nginx之 nginx虛擬機器配置Nginx虛擬機
- Dalvik虛擬機器、Java虛擬機器與ART虛擬機器虛擬機Java
- VM虛擬機器 linux系統新增磁碟虛擬機Linux
- vsphere 虛擬機器線上新增磁碟linux虛擬機Linux
- 擴充套件VirtualBox虛擬機器磁碟容量套件虛擬機
- 為Linux虛擬機器增加磁碟空間Linux虛擬機
- Windows 與 虛擬機器VirtualBox 共享掛載Windows虛擬機
- VMware虛擬機器共享資料夾的使用虛擬機
- RedHat虛擬機器打不開磁碟問題如何解決?RedHat虛擬機器打不開磁碟的解決方法Redhat虛擬機
- win10怎樣和虛擬機器共享藍芽 win10和虛擬機器共享藍芽的步驟Win10虛擬機藍芽
- 虛擬機器和windows主機中的檔案共享虛擬機Windows
- 虛擬機器VMWARE與其網路配置(包你玩轉虛擬機器)(轉)虛擬機
- 配置虛擬機器NAT模式網路虛擬機模式
- VMware Fusion虛擬機器配置固定IP虛擬機
- 克隆後虛擬機器網路配置虛擬機
- 虛擬機器配置和環境搭建虛擬機
- 虛擬機器基礎環境配置虛擬機