[ydl-gen] command for hard drives?
Luke Scharf
lscharf at vt.edu
Mon Mar 12 07:39:37 MDT 2007
Jim Ricken wrote:
> Is there a command that you can use to find out how your hard drives
> are labeled hda ,sda,etc?
>
One of my favorite drive-inventory tricks that I haven't head yet is the
following:
ls /proc/ide/*/model
cat /proc/ide/*/model
cat /proc/scsi/scsi
cat /proc/partitions
But, it doesn't tell you the device names right off, you have to put the
items together in your head -- but that's how I do it. Running mount
and df show you what the machine is already using -- if you put that
together with the information form /proc, you can figure out what the
new hard drive is called.
Another option for inventorying ATA devices quickly would be:
grep $ /proc/ide/*/model
If you want a smoking gun, you can ls -l /dev/hda and then match the
major number to the number in in "cat /proc/devices". Also, running
/sbin/lspci, /sbin/lsusb, and /sbin/lsmod can also tell you a lot about
PCI cards, USB devices, and loaded kernel-modules ("device drivers and
more").
Anyway, Linux gives you a lot of information about the system -- but I
haven't yet found a convenient command-line tool that gives you a good
picture of what the system looks like. Solaris has prtconf, which does
provide a full picture (but I usually cause it to produce too little or
too much output), and Apple has "System Profiler", but that's a GUI tool
that only runs on Mac OS X -- so I just put together my own mental image
by probing around manually. :-)
That's probably more than you wanted to know -- but if you like to
figure out the machine, these are good tols for the job.
-Luke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3271 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/attachments/20070312/4ad04f36/attachment.bin
More information about the yellowdog-general
mailing list