LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to see my hardisk when i connected in redhat linux (http://www.linuxquestions.org/questions/linux-general-1/how-to-see-my-hardisk-when-i-connected-in-redhat-linux-4175450523/)

venkatesh51 02-17-2013 06:38 AM

how to see my hardisk when i connected in redhat linux
 
if i connected any pendrive or hardisk is not showing
how to scan it and display the hardisk or pendrives

suicidaleggroll 02-17-2013 09:01 AM

"fdisk -l" will show all attached drives and their partition table. You need to run it as root.

venkatesh51 02-18-2013 04:25 AM

Quote:

Originally Posted by suicidaleggroll (Post 4893631)
"fdisk -l" will show all attached drives and their partition table. You need to run it as root.

actuall i know that when i connected the disk is not recognized.
for example if i connected pendrive the image of pen drive is not showing like that

fortran 02-18-2013 04:40 AM

Does it show new device name in out put of "fdisk -l".
If it is there, then we can access it.

If it is not there then have you checked using another pen drive/disk?

If another pen drive is detected easily, your pen drive's LED is turned on or blink one it is attached?

venkatesh51 02-18-2013 05:08 AM

Quote:

Originally Posted by pavi_kanetkar (Post 4894263)
Does it show new device name in out put of "fdisk -l".
If it is there, then we can access it.

If it is not there then have you checked using another pen drive/disk?

If another pen drive is detected easily, your pen drive's LED is turned on or blink one it is attached?

Thanks for replying
my pendrive is ok in interview asked me that (if your device is not detected how you will detect(in your linux os) in command wise

suicidaleggroll 02-18-2013 08:27 AM

The question is worded poorly in my opinion. The disk will always be detected to some degree (you should at least see some handshaking information in /var/log/messages), even if it's not recognized as a storage device or auto-mounted. The correct action to take depends on what happened when you plugged it in.

If it's not detected at all (like the question is asking) then there's probably a hardware failure somewhere in the mix (either the USB port, the USB cable, or the drive itself is busted) and there's not much you can do besides trying other ports, cables, or drives. That is assuming you know your USB drivers are working correctly in the OS.

John VV 02-18-2013 12:25 PM

a guess
the "if i connected any pendrive or hardisk is not showing "

is ( for RHEL 6.3 ) if Gnome2 is not Auto listing it in nautilus
but
it might not be auto mounting in /media ( might require clicking on the drive in nautilus first)

or
any of the above

the question is very ambiguous

chrism01 02-18-2013 11:02 PM

Actually I'd expect to see handshaking msgs in /var/log/dmesg.

lleb 02-19-2013 07:35 AM

in RHE /var/log/messages should show the USB, in this case, New Device... and it should show as some type of mass storage device.

Code:

Feb 19 04:26:24 centos kernel: usb 1-2: new high speed USB device number 4 using ehci_hcd
Feb 19 04:26:24 centos kernel: usb 1-2: New USB device found, idVendor=154b, idProduct=0044
Feb 19 04:26:24 centos kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 19 04:26:24 centos kernel: usb 1-2: Product: USB 2.0 FD
Feb 19 04:26:24 centos kernel: usb 1-2: Manufacturer: PNY Technologies
Feb 19 04:26:24 centos kernel: usb 1-2: SerialNumber: AAB71A8400000050
Feb 19 04:26:24 centos kernel: usb 1-2: configuration #1 chosen from 1 choice
Feb 19 04:26:24 centos kernel: scsi12 : SCSI emulation for USB Mass Storage devices
Feb 19 04:26:25 centos kernel: scsi 12:0:0:0: Direct-Access    PNY      USB 2.0 FD      8192 PQ: 0 ANSI: 4
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: Attached scsi generic sg2 type 0
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] 15826944 512-byte logical blocks: (8.10 GB/7.54 GiB)
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] Write Protect is off
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] Assuming drive cache: write through
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] Assuming drive cache: write through
Feb 19 04:26:25 centos kernel: sdb: sdb1
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] Assuming drive cache: write through
Feb 19 04:26:25 centos kernel: sd 12:0:0:0: [sdb] Attached SCSI removable disk

im running CentOS 6.3, so should be same results for RHE6.3 that is the end of my /var/log/messages when I plug in a new flash drive, pen drive as the OP calls it. It is clearly marked as new USB device and also clearly marked as a USB mass storage device. it goes so far as to tell you what type of device it is.

This is the info the OP should be looking for.

Code:

# tail -f /var/log/messages
run that command, then plug in the flash drive. watch and see what happens.


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