1. 創(chuàng)建共享磁盤柜
成都創(chuàng)新互聯(lián)2013年至今,公司以成都網(wǎng)站建設(shè)、做網(wǎng)站、系統(tǒng)開發(fā)、網(wǎng)絡(luò)推廣、文化傳媒、企業(yè)宣傳、平面廣告設(shè)計等為主要業(yè)務(wù),適用行業(yè)近百種。服務(wù)企業(yè)客戶上千,涉及國內(nèi)多個省份客戶。擁有多年網(wǎng)站建設(shè)開發(fā)經(jīng)驗(yàn)。為企業(yè)提供專業(yè)的網(wǎng)站建設(shè)、創(chuàng)意設(shè)計、宣傳推廣等服務(wù)。 通過專業(yè)的設(shè)計、獨(dú)特的風(fēng)格,為不同客戶提供各種風(fēng)格的特色服務(wù)。
在虛擬機(jī)軟件的安裝目錄下,有個vmware-vdiskmanager.exe文件(老版本用plainmaker.exe),把它復(fù)制到共享磁盤柜目錄下,創(chuàng)建共享磁盤(老版本共享磁盤文件的擴(kuò)展名為.pln) F:\虛擬機(jī)\共享磁盤柜>vmware-vdiskmanager.exe -c -s 200Mb -a lsilogic -t 2 quorum.vmdk F:\虛擬機(jī)\共享磁盤柜>vmware-vdiskmanager.exe -c -s 4Gb -a lsilogic -t 2 sharedisk.vmdk 創(chuàng)建完畢后,目錄下有四個新文件 quorum-flat.vmdk quorum.vmdk sharedisk-flat.vmdk sharedisk.vmdk 2. 配置虛擬機(jī) 在虛擬機(jī)器界面選擇“Edit virtual machine settings”à添加硬盤,選“Use a existing virtual disk”,分別添加quorum.vmdk、sharedisk.vmdk 雙擊新加的磁盤,在彈出的磁盤屬性窗選“advance”,為新加的硬盤選擇虛擬設(shè)備節(jié)點(diǎn):quorum.vmdk選訂“SCSI 0:1”,sharedisk.vmdk選定“SCSI 1:1”。 分別打開兩臺虛擬機(jī)目錄中的vmx文件,在最后一行添加:
disk.locking="FALSE"
scsi0:1.SharedBus="Virtual"
scsi1:1.SharedBus="Virtual"
vmware中設(shè)置共享磁盤,需要滿足兩個條件:
1、硬盤的高級屬性中必須設(shè)置成1:0,如果增加第二塊共享硬盤,也設(shè)成1:0,系統(tǒng)就會報錯,所以設(shè)置成1:1(這種方式本人還沒試過,不過在oracle雙機(jī)的文章中看到過這樣的設(shè)置方法)
2、需要在vmware的配置屬性文件(如rhel3.vmx)中加入兩條屬性 scsi[n].sharedBus = "virtual" disk.locking = "false" 系統(tǒng)啟動的時候會鎖定磁盤,所以當(dāng)啟動linux1后共享磁盤被鎖定了,linux2就起不來了,因此需要加入disk.locking = "false" 。 一般來說,如果是scsi1:0,則n為1,也就是scsi1.sharedBus = "virtual" ,表示所有的bus都共享,vmare推薦這種做法。 如果說是不是所有的bus都共享的話,可以將上述scsi1.sharedBus = "virtual"改成scsi1:1.shared = "true" 。
SCSI reservation must be enabled in a virtual machine before you can share its disks. To enable it, make sure the virtual machine is powered off. Open the configuration file (.vmx file on Windows hosts, .cfg file on Linux hosts) in a text editor and add the line scsi[n].sharedBus = "virtual" anywhere in the file, where [n] is the SCSI bus being shared.
VMware recommends you set up the shared disks on their own SCSI bus, which is a different bus than the one the guest operating system uses. For example, if your guest operating system is on scsi0:0, you should set up disks to share on scsi1 bus.
For example, to enable SCSI reservation for devices on the scsi1 bus, add the following line to the virtual machine's configuration file: scsi1.sharedBus = "virtual"
This gives the whole bus the ability to be shared. However, if you would rather not share the whole bus, you can selectively enable SCSI
reservation for a specific SCSI disk on the shared bus. This prevents the locking of this specific disk. Add the following line to the configuration file:
scsi1:1.shared = "true"
If SCSI reservation is enabled (that is, scsi1.sharedBus is set to "virtual"), then this setting is ignored.
In addition to enabling SCSI reservation on the bus, you need to allow virtual machines to access the shared disk concurrently. Add the following line to the virtual machine's configuration file: disk.locking = "false"
This setting permits multiple virtual machines to access a disk
concurrently. Be careful though; if any virtual machine not configured for SCSI reservation tries to access this disk concurrently, then the shared disk is vulnerable to corruption or data loss.
When SCSI reservation is enabled, a reservation lock file that contains the shared state of the reservation for the given disk is created. The name of this file consists of the filename of the SCSI disk appended with .RESLCK.
For example, if the disk scsi1:0.filename is defined in the configuration file as
scsi1:0.fileName = "//vmSCSI.pln"
then the reservation lock file for this disk is given the default name "//vmSCSI.pln.RESLCK"
However, you can provide your own lock file name. Add a definition for scsi1:0.reslckname to the configuration file. For example, if scsi1:0.reslckname = "/tmp/scsi1-0.reslock"
is added to the configuration file, it overrides the default lock file name.
Selecting the DiskOnce SCSI reservation is enabled for a disk — that is, the
scsi[n].sharedBus = "virtual" and disk.locking = "false" settings are added to the configuration file for each virtual machine wanting to share this disk, you need to point to this disk for each virtual machine that wants to access it.
Sharing a Disk on the scsi0 Bus
在vmware中創(chuàng)建共享磁盤
plainmaker已經(jīng)不用了,現(xiàn)在直接添加磁盤
為一臺機(jī)器添加一個新的虛擬磁盤,然后再為另一臺機(jī)器添加一個已存在的虛擬磁盤
然后修改一下兩臺機(jī)器的配置文件,添加如下內(nèi)容 scsi1.sharedBus = "virtual" disk.locking = "false"
假定兩臺機(jī)器的虛擬磁盤都在scsi1這個總線上。
注意兩臺機(jī)器中要共享的盤的總線和總線地址應(yīng)該是一樣的,并且最好不要和主機(jī)操作系統(tǒng)使用的盤在一個總線上。
vmware-vdiskmanager.exe -c -s 1Gb -a lsilogic -t 2 J:\sharedisks\sharedisk1.vmdk
vmware-vdiskmanager.exe -c -s 1Gb -a lsilogic -t 2 J:\sharedisks\sharedisk2.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk3.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk4.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk5.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk6.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk7.vmdk
vmware-vdiskmanager.exe -c -s 25Gb -a lsilogic -t 2 J:\sharedisks\sharedisk8.vmdk
文章名稱:VMWARE中如何創(chuàng)建共享磁盤
文章源于:http://www.rwnh.cn/article10/scgigo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導(dǎo)航、建站公司、企業(yè)建站、靜態(tài)網(wǎng)站、商城網(wǎng)站、網(wǎng)站導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)