Operating System - Linux
1752339 Members
5544 Online
108787 Solutions
New Discussion юеВ

Linux RH 3 Disk Information

 
SOLVED
Go to solution
GerGon
Regular Advisor

Linux RH 3 Disk Information

Hi all,

Does anybody know, Which command(s) can I use to see every disk in linux system?
I need some command that give me information like "ioscan command".

* Using line commands, not graphical interface, and not dmseg command, please.

df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p7 40313964 4380656 33885424 12% /
/dev/cciss/c0d0p6 50394964 38184760 9650248 80% /APP
/dev/cciss/c0d0p2 125988632 114292388 5296352 96% /APPDATA
/dev/cciss/c0d0p8 30233896 9022716 19675368 32% /ODP
/dev/cciss/c0d0p3 115907564 32828 109986916 1% /ODPDATA
/dev/cciss/c0d0p5 50394964 30448484 17386524 64% /STAGE
/dev/cciss/c0d0p1 101089 14944 80926 16% /boot

** I need to know, how many disk do I have and the size of each one?

Thanks...

8 REPLIES 8
Rick Garland
Honored Contributor

Re: Linux RH 3 Disk Information

There is a utility called 'lshw' that will gather and display this info for you

It parses through the /proc area and displays the stats relevant to your system

Check out the following URL
http://ezix.sourceforge.net/software/lshw.html
Rick Garland
Honored Contributor

Re: Linux RH 3 Disk Information

Use the 'lshw -short' command syntax, looks like ioscan


GerGon
Regular Advisor

Re: Linux RH 3 Disk Information

Rick, I just executed the guidelines "How to install the lshw", but only source file appear on the server, all seems to be right when executed the command "make" and "rpmbuild -ta lshw-B.02.05.01".

Below, it is part of output from installation script:

+ cp -pr README COPYING docs/TODO docs/Changelog docs/lshw.xsd /var/tmp/lshw-B.02.05.01-1-root/usr/share/doc/lshw-B.02.05.01
+ exit 0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgcc_s.so.1(GLIBC_2.0) libm.so.6 libstdc++.so.5 libstdc++.so.5(CXXABI_1.2) libstdc++.so.5(GLIBCPP_3.2) libstdc++.so.5(GLIBCPP_3.2.2)
Processing files: lshw-debuginfo-B.02.05.01-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/lshw-B.02.05.01-1-root
Wrote: /usr/src/redhat/SRPMS/lshw-B.02.05.01-1.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/lshw-B.02.05.01-1.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/lshw-debuginfo-B.02.05.01-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.23293
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd lshw-B.02.05.01
+ /bin/rm -rf /var/tmp/lshw-B.02.05.01-1-root
+ exit 0
[root@dmodp util]# lshw
-bash: lshw: command not found
[root@dmodp util]# find ./ -name lshw
./lshw-B.02.05.01/src/lshw
[root@dmodp util]# cd \
>
[root@dmodp root]# cd /
[root@dmodp /]# find ./ -name lshw
./APP/util/lshw-B.02.05.01/src/lshw
GerGon
Regular Advisor

Re: Linux RH 3 Disk Information

Is There another command that give me how many disk and size...?

Because I'm newbie in Linux, I wonder:
What do linux people do to see disk information whithout graphical tool???

Any help is appreciated...!!


GerGon
Regular Advisor

Re: Linux RH 3 Disk Information

Rick, excuseme.. you are right,now I can use lshw..

If I can reassign points, you have 10pts now.

Thanks a lot..
Rick Garland
Honored Contributor
Solution

Re: Linux RH 3 Disk Information

With the lshw utility you can do 'lshw -short' and get a output similar to ioscan.

Doing the 'lshw' will get you a longer output.

Doing 'lshw -html' will get yopu a html output that you can view in your browser.

Using the 'lshw -short' option, it shows you have disk(s) but will noit show size. Using the long or html option will display the info for you.

There will be a stanza of output for each disk that is discovered. This includes the html output.
SAKET_5
Honored Contributor

Re: Linux RH 3 Disk Information

How about "cat /proc/partitions" or "format .." with the correct parameters?

Would you necessarily install a utility on a production host if you can get away with just using the native OS commands?

My 2 cents worth...
Andrew Cowan
Honored Contributor

Re: Linux RH 3 Disk Information

Try "fdisk -l" this should show all the partitions that Linux can see.