LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-12-2015, 05:36 PM   #1
kingston
Member
 
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


Hi

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}' `
do
echo "- - -" > $i/scan
done

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

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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 06:28 AM.
 
Old 06-03-2015, 05:12 PM   #3
kingston
Member
 
Registered: Mar 2008
Location: Bengaluru, India
Distribution: RHEL 5.5, Solaris 5.10
Posts: 215

Original Poster
Blog Entries: 1

Rep: Reputation: 21
Hi

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.
 
  


Reply



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 01:39 AM
Command which gives "scsi disk out put and fdisk -l output" vnykr Linux - Enterprise 5 12-18-2008 10: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 06:44 AM
Need scsi command to get serial number of a scsi tape romeshs Programming 1 09-04-2006 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:30 PM.

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