Quantcast
Viewing latest article 1
Browse Latest Browse All 9

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

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.


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 1
Browse Latest Browse All 9

Trending Articles