Many times I have added a disk to a virtual machine (VM) Linux and I rebooted to recognize him. Well, well, both Linux and Windows are able to recognize hot. In the case of Windows is something already well known (Disk Manager, Refresh and format ...).
Linux If we can come in handy in times when that VM can not stop either on their criticality or precisely because we have problems and need a backup disk to another you just added.
(This PRODEC is for Red Hat 4, but most distros work in a similar way. In fact no different from the procedure of adding a hot disk (which is not RAID) a Physical Linux . It is also possible that other distros provide it):
The first is to add the disk from the VIC or as you normally do. Then we can look
/ proc / scsi / scsi devices and see our VM: Important data are what puts us in the first line of each item listed.
For example: Host: scsi0 Channel: 00 Id: 00 Lun: 00
- The first number is the number of the scsi controller. Eg scsi0
- The second is channel Third is
- SCSI disk ID.
- And finally there is the LUN. (Fiber or iSCSI Fits ...)
When we added to the VIC our Linux disk, we must set the Virtual SCSI node (eg 0:0 is the SCSI controller 0 ID 0, SCSI 0: 1 is the controller 0 ID 1, etc, etc) and the SCSI controller it is. With this we have the first two numbers.
The number is usually changed to add a hard disk is the SCSI ID (1,2,3,4,5,6 ...) because usually our VMs have a single SCSI controller.
Once we have the data disk you want to "see" in the VM to do:
echo "scsi add-single-device" 0 0 1 0> / proc / scsi / scsi
(This corresponds to scsi0, Cahnnel = 0, ID = 1, LUN = 0, which is typical when you add a second disk. With this we tell the OS to recognize the disc and make it ready for use, its speed, but the virtual disks do not spin ...)
The process to remove a hot disk ( looking process that has no clicking, of course ), would be with the command :
echo "scsi remove-single-device 0 0 1 0> / proc / scsi / scsi
0 comments:
Post a Comment