LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Device Manager equivalent? I want to check HDDs (https://www.linuxquestions.org/questions/linux-newbie-8/device-manager-equivalent-i-want-to-check-hdds-669218/)

chococharlie 09-11-2008 09:20 AM

Device Manager equivalent? I want to check HDDs
 
Hi Guys,

I got a linux box at work to which I SSH. It doesn't have a GUI just CLI.

I want to know how many HDDs and their type/size are physically in the box, I'm sure it's possible but how?

Thank you :)

Choco

CRC123 09-11-2008 09:22 AM

As root:
Code:

fdisk -l

chococharlie 09-11-2008 09:28 AM

ah cool!

So every time I see a line such as:

Disk /dev/sda: 40.0 GB, 40000000000 bytes

I assume it's a physical HDD?

I can see the following:

Disk /dev/scsi/host0/bus0/target0/lun0/disc: 257 MB, 257949696 bytes
8 heads, 62 sectors/track, 1015 cylinders

Disk /dev/ide/host0/bus0/target0/lun0/disc: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders

Disk /dev/ide/host0/bus0/target1/lun0/disc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders

farslayer 09-11-2008 09:39 AM

another way to view the drive information is with lshw.

lshw -C disk

note: this does NOT show how the drives are partitioned.

CRC123 09-11-2008 09:40 AM

yep, but I've never seen those "target/lun0" things b4. Are they scsi? What distro are you using?

chococharlie 09-11-2008 09:43 AM

If you tell me how to find the distro from the CLI I will tell you :)

CRC123 09-11-2008 09:50 AM

Code:

cat /etc/*release
should work depending on the distro you have, lol.

chococharlie 09-11-2008 09:51 AM

Quote:

Originally Posted by farslayer (Post 3277162)
another way to view the drive information is with lshw.

lshw -C disk

note: this does NOT show how the drives are partitioned.

This command doesn't work on my box ~_~

chococharlie 09-11-2008 09:52 AM

Quote:

Originally Posted by CRC123 (Post 3277185)
Code:

cat /etc/*release
should work depending on the distro you have, lol.

hehe.. man you're good!

here it is:
Gentoo Base System version 1.4.3.13

CRC123 09-11-2008 09:59 AM

Cool. I don't have the lshw command either (it may only come standard with Debian or maybe farslayer installed it manually). but anyways, anything that fdisk -l prints will only be physical disks and it should list the partitions on that disk under it. If it doesn't, they may be unrecognized partitions(lvm, raid, etc).

CRC123 09-11-2008 10:02 AM

Quote:

Originally Posted by chococharlie (Post 3277189)
hehe.. man you're good!

You'll find that there are many people here that are much more skilled than me. I love this place!


Quote:

Originally Posted by chococharlie (Post 3277189)
here it is:
Gentoo Base System version 1.4.3.13

LOL, I swore that just said Red Hat not 2 minutes ago :). Next time you edit the post, please place an "edit" tag of some sort so it doesn't confuse people ;)

chococharlie 09-11-2008 10:07 AM

Quote:

Originally Posted by CRC123 (Post 3277202)
You'll find that there are many people here that are much more skilled than me. I love this place!




LOL, I swore that just said Red Hat not 2 minutes ago :). Next time you edit the post, please place an "edit" tag of some sort so it doesn't confuse people ;)

You are correct hehe I was connected to two machines and made a mistake, I was hoping that the edit was quick enough for you not to notice, but I failed. :p Thanks again, you are right this place rocks!

By the way, I am planning to install Linux on my windows box with VMware, what distro do you recommend?

CRC123 09-11-2008 10:19 AM

If your not confident with Linux yet, I'd recommend a distro that has good support/documentation. Ubuntu, opensuse, and fedora come to mind when take those things into consideration (they are also normally the top 3 on distrowatch.com). I obviously prefer suse because it has great documentation, YAST(some hate, some love, I love it), good hardware support, and lots of extra repositories to download programs from. The latest one even has an opensource version of vmware tools that will be automatically installed if you run it in a vmware virtual machine.

chococharlie 09-11-2008 10:45 AM

Thanks again sir, I will install Ubuntu for now.

Be ready for MANY MANY questions hehe :)

farslayer 09-11-2008 10:59 AM

Yes I installed lshw manually as you say, it is not in Debian by default either.. aptitude install lshw
lshw is an excellent command line utility for gathering hardware information.


Heres a preview of how it displays some information.

Code:

it-etch:~# lshw -C disk
  *-disk                 
      description: ATA Disk
      product: Hitachi HDS72161
      vendor: Hitachi
      physical id: 0.0.0
      bus info: scsi@0:0.0.0
      logical name: /dev/sda
      version: P22O
      serial: PVB12345T2WGWH
      size: 149GiB (160GB)
      capabilities: partitioned partitioned:dos
      configuration: ansiversion=5 signature=0e1234f4
  *-disk
      description: SCSI Disk
      physical id: 0.0.0
      bus info: scsi@4:0.0.0
      logical name: /dev/sdb
      size: 1009MiB (1058MB)
      capabilities: partitioned partitioned:dos
      configuration: signature=0123bda7
  *-cdrom
      description: DVD writer
      product: PHILIPS DVD+/-RW DVD8801
      vendor: Philips
      physical id: 0
      bus info: ide@0.0
      logical name: /dev/hda
      logical name: /media/cdrom0
      version: 4D28
      capabilities: packet atapi cdrom removable nonmagnetic dma lba iordy audio cd-r cd-rw dvd dvd-r
      configuration: mode=udma2 mount.fstype=iso9660 mount.options=ro,nosuid,nodev,noexec state=mounted status=ready
    *-medium
          physical id: 0
          logical name: /dev/hda
          logical name: /media/cdrom0
          configuration: mount.fstype=iso9660 mount.options=ro,nosuid,nodev,noexec state=mounted


it-etch:~# lshw -C storage
  *-storage             
      description: SATA controller
      product: SB600 Non-Raid-5 SATA
      vendor: ATI Technologies Inc
      physical id: 12
      bus info: pci@0000:00:12.0
      logical name: scsi0
      version: 00
      width: 32 bits
      clock: 66MHz
      capabilities: storage pm msi bus_master cap_list emulated
      configuration: driver=ahci latency=64 module=ahci
  *-usb
      description: Mass storage device
      product: Flash Disk
      vendor: CBM
      physical id: 7
      bus info: usb@6:7
      logical name: scsi4
      version: 1.00
      serial: 01171234AFEF1002
      capabilities: usb-2.00 scsi emulated scsi-host
      configuration: driver=usb-storage maxpower=100mA speed=480.0MB/s
  *-ide
      description: IDE interface
      product: SB600 IDE
      vendor: ATI Technologies Inc
      physical id: 14.1
      bus info: pci@0000:00:14.1
      version: 00
      width: 32 bits
      clock: 66MHz
      capabilities: ide msi bus_master cap_list
      configuration: driver=ATIIXP_IDE latency=64 module=atiixp

Very clean detailed listings of pretty much any hardware in your system.


All times are GMT -5. The time now is 06:28 PM.