yzc8046
新新人类
帖子
4
精华
0
无忧币 14
积分 8
阅读权限 20
|
发表于:2007-9-18 16:41
标题:vmware创建共享磁盘的方法
<上一帖 |
下一帖>
Enabling SCSI Reservation
9w!R
t!@-e"\E_"~51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 bbs.51cto.com:?1bLX@nNW4qP
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.
3|ih{(v Y!{51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 bbs.51cto.com3_6e*TM(uhN;sd
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.
8A8C1]-DV51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 bbs.51cto.com c/I-C,M0V o-s
For example, to enable SCSI reservation for devices on the scsi1 bus, add the following line to the virtual machine's configuration file: 51CTO技术论坛L
?[1pP$?[c;t
oW)bhqbG51CTO技术论坛scsi1.sharedBus = "virtual"
EBf&g
V5D51CTO技术论坛 *nQ+AM~
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: bbs.51cto.com'i$f1kz8F$yc^-u$N
51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离q`ro {1S;ZY
scsi1:1.shared = "true" 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离?D
NK!x(C;H
-z+\ k AhjQ4W LIf SCSI reservation is enabled (that is, scsi1.sharedBus is set to "virtual"), then this setting is ignored.
~ni8t?5iN\bbs.51cto.com
Q"^$tXrhy7Ibbs.51cto.comIn 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: bbs.51cto.comZ+A}Mu
51CTO技术论坛R8im;Y"P(Z&W
disk.locking = "false"
-}K8I8a+z@,I"W(r51CTO技术论坛 bbs.51cto.com&J?J
hw-n1dv
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.
B#c bHBOHv
maqu1U~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. 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离({.r:V.e7J
gP(Yf8l*O#zf3Dbbs.51cto.comFor example, if the disk scsi1:0.filename is defined in the configuration file as ?#PO x,B
51CTO技术论坛(\N.geZ:W4M&n^
scsi1:0.fileName = "//vmSCSI.pln" 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离9i
hQ-S)y/g8c
h|P#s$z
then the reservation lock file for this disk is given the default name
a5BD p"o-H"Ie51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离
eWZnOlrG{51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离"//vmSCSI.pln.RESLCK" 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离M"o|#Dm|Sl
O!lU`ff,M0Y51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离However, you can provide your own lock file name. Add a definition for scsi1:0.reslckname to the configuration file. For example, if
q]Y:vxP HIy51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 .Se)S-||\7YE)}
N
scsi1:0.reslckname = "/tmp/scsi1-0.reslock" 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离kx;d3\nX-zN'K%v;V
51CTO技术论坛ym|z\
is added to the configuration file, it overrides the default lock file name. 51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 x-s4_!Qc7I2G,U
SM"_y1M
Selecting the Disk G$[EUR1G
;Cay}
km d;ebbs.51cto.comOnce 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.
hV!Kvb2A.[*A,R 3|n"?\s W/W)t9o`7x'C
Sharing a Disk on the scsi0 Bus q y4U3V0[7\,F3mQ.q
51CTO|计算机|网络|信息|技术|安全|路由器|网管|Windows|Vista|数据库|网站|开发|下载|灌水|零距离 p{WoN%[!?'_
VMware does not recommend sharing a disk on SCSI bus 0.
|
 网络工程师到底该不该去考CCIE认证? |
|