Oracle MVA

Tales from a Jack of all trades

Why reboot when you could just scan your scsi-bus?

with one comment

Whenever I read install guides about Oracle and installations on VM-Ware I always see remarks telling you to reboot your system after you added a disk. This is not necessary.

While your virtual machine is running, click on edit hardware and add a disk. When using VMWare workstation you cannot choose which scsi bus to use. Either try all buss-es, or check the .vmx file. In my case, I called the newdisk newdisk.vmdk, which represents these lines in the vmx file:

scsi0:2.present = “TRUE”
scsi0:2.fileName = “newdisk.vmdk”
scsi0:2.redo = “”

By looking at the code, I can see that the disk has been added to scsi bus 0. Next I scan the bus:

[root@wls2 ~]# echo – – – >/sys/class/scsi_host/host0/scan

This command scans every channel, every target and every lun on the host0 device. When checking dmesg, I notice that the disk is present.

[root@wls2 ~]# dmesg
[..]
Vendor: VMware,   Model: VMware Virtual S  Rev: 1.0
Type:   Direct-Access                      ANSI SCSI revision: 02
target0:0:2: Beginning Domain Validation
target0:0:2: Domain Validation skipping write tests
target0:0:2: Ending Domain Validation
target0:0:2: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
SCSI device sdf: 16777216 512-byte hdwr sectors (8590 MB)
sdf: Write Protect is off
sdf: Mode Sense: 5d 00 00 00
sdf: cache data unavailable
sdf: assuming drive cache: write through
SCSI device sdf: 16777216 512-byte hdwr sectors (8590 MB)
sdf: Write Protect is off
sdf: Mode Sense: 5d 00 00 00
sdf: cache data unavailable
sdf: assuming drive cache: write through
sdf: unknown partition table
sd 0:0:2:0: Attached scsi disk sdf
sd 0:0:2:0: Attached scsi generic sg5 type 0

Now I can create a partition using fdisk and start using the disk without rebooting.

Advertisements

Written by Jacco H. Landlust

August 18, 2009 at 9:16 am

Posted in Linux, VMWare

One Response

Subscribe to comments with RSS.

  1. […] notice that most guides on VMWare ask you to reboot after adding disks. Refer to this post to see how to scan your bus without […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: