Scenario:
Suppose you have added a new hard disk to your Linux OS running on any Virtual Environment which in my case is VMware workstation. Once added the new hard drive, generally the changes won't reflect unless you reboot the Guest OS.
But what if you are in no position to reboot the Gues Linux OS?
Solution:
In the below path you can find a list of host symlinks pointing to the iscsi device configured on your Linux box
But to detect a new hard drive attached you need to first get your host bus number used which you can get by using below command
You should get a output like below
So as you see your host2 is the relevant fiels where you need to reset the storage buffer values. Run the below command
Here "- - -" defines the three values stored inside host*/scan i.e. channel number, SCSI target ID, and LUN values. We are simply replacing the values with wild cards so that it can detect new changes attached to the Linux box. This procedure will add LUNs, but not remove them.
Once done verify if you can see the new hard drive which in my case worked very fine as I see below
Let me know your success and failures.
Related Articles:
How to extend/resize Logical Volume and Volume Group in Linux
How to detect new NIC/Ethernet card without rebooting in Linux
How do you check Linux machine is Physical or Virtual remotely?
What are the maximum and minimum limits for RHEL 4 vs 5 vs 6 ?
Step by Step Linux Boot Process Explained In Detail
What is the difference between ext3 and ext4 filesystem in Linux ?
How to configure Private Network in VMware Workstation
9 examples to help you understand top command usage in Unix/Linux
Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
Understanding Load Average in Linux and when to be worried about it?
Disk Attachment Technology FC vs SAS vs iSCSI
Understanding UMASK value in Linux
How to keep a track of all the commands run by any user in Linux
How do you check Linux machine is Physical or Virtual remotely?
Suppose you have added a new hard disk to your Linux OS running on any Virtual Environment which in my case is VMware workstation. Once added the new hard drive, generally the changes won't reflect unless you reboot the Guest OS.
But what if you are in no position to reboot the Gues Linux OS?
Solution:
In the below path you can find a list of host symlinks pointing to the iscsi device configured on your Linux box
But to detect a new hard drive attached you need to first get your host bus number used which you can get by using below command
# grep mpt /sys/class/scsi_host/host?/proc_name
You should get a output like below
/sys/class/scsi_host/host2/proc_name:mptspi
So as you see your host2 is the relevant fiels where you need to reset the storage buffer values. Run the below command
# echo "- - -"> /sys/class/scsi_host/host2/scan
Here "- - -" defines the three values stored inside host*/scan i.e. channel number, SCSI target ID, and LUN values. We are simply replacing the values with wild cards so that it can detect new changes attached to the Linux box. This procedure will add LUNs, but not remove them.
Once done verify if you can see the new hard drive which in my case worked very fine as I see below
# fdisk -l
Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Let me know your success and failures.
Related Articles:
How to extend/resize Logical Volume and Volume Group in Linux
How to detect new NIC/Ethernet card without rebooting in Linux
How do you check Linux machine is Physical or Virtual remotely?
Follow the below links for more tutorials
What is the difference/comparison between Unix and Linux ?What are the maximum and minimum limits for RHEL 4 vs 5 vs 6 ?
Step by Step Linux Boot Process Explained In Detail
What is the difference between ext3 and ext4 filesystem in Linux ?
How to configure Private Network in VMware Workstation
9 examples to help you understand top command usage in Unix/Linux
Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
Understanding Load Average in Linux and when to be worried about it?
Disk Attachment Technology FC vs SAS vs iSCSI
Understanding UMASK value in Linux
How to keep a track of all the commands run by any user in Linux
How do you check Linux machine is Physical or Virtual remotely?