Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-12-2015, 06:36 PM   #1
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Rep: Reputation: 21
Disk is not getting detected after run the scsi command


RHEL 6.4 (64 Bit) is running as a Virutal Machine in a VCenter Server 5.5
As per our request, Vmware team added 500GB of disk space to this VM. Disk is not visible in "fdisk -l" after run the following command/script, but the new disk could be seen from the "multipath -l" command.

for i in `ls -ld /sys/class/scsi_host/host* | awk '{print $9}' `
echo "- - -" > $i/scan

Could someone clarify why it is not visible in "fdisk -l" output?
Old 05-13-2015, 07:22 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,713

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
fdisk reads the list in /proc/partitions. If the disk doesn't show up there it won't be used. You can also check to see if there is a device in /dev/sd? that isn't already in use (if you only have one, it should be /dev/sda, a new one would be /dev/sdb. If /dev/sdb exists there but not in /proc/partitions, then try using partprobe to read any existing tables.

To get the partitions there requires the bus to be scanned (or the system rebooted). Partitions may be searched for using the partprobe, but I'm not sure it initiates a rescan of the SCSI bus for new devices (which is why rebooting is simpler).

Try using "partprobe" (no parameters - if the device exists in /dev, you can use partprobe /dev/sd? to load just that disk) to see if it adds the device.

Last edited by jpollard; 05-13-2015 at 07:28 AM.
Old 06-03-2015, 06:12 PM   #3
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215
Blog Entries: 1

Original Poster
Rep: Reputation: 21

Thanks for your reply. When checked, no relevant disks are found in /dev directory. Unfortunately, i didn't check the file /proc/partitions. Due to our environment design, i am not in the position to use partprobe command (we are partitioning into 8 slices and hiding the extended partitions before presenting to the application/database). All these things cornered me to reboot the server when fdisk/scsi scan failed to show up the newly added disk.

On a different note, i think partprobe will only re-read the partition table for the disks which is available/visible to the OS kernel where scsi scan will re-read the scsi bus to detect the newly added disks. Please correct me if am wrong.

Even this behaviour (not detecting the new disks) is odd as this is reflecting the disks sometimes and sometimes it is not. Hence got confused and decided to end up with this LQ thread to get it cleared.

Thanks in advance for more help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CD-ROM not detected, then hard disk not detected helpless-new-fulla Linux - Newbie 4 06-28-2010 02:39 AM
Command which gives "scsi disk out put and fdisk -l output" vnykr Linux - Enterprise 5 12-18-2008 11:58 PM
Now I have a scsi hard disk, two IDE hard disk, i want install linux on scsi hard dis tecpenguin Linux - Server 4 11-10-2007 07:44 AM
Need scsi command to get serial number of a scsi tape romeshs Programming 1 09-04-2006 07:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration