Sponsored Content
Full Discussion: How to check HDD Rpm?
Operating Systems Linux Red Hat How to check HDD Rpm? Post 302702683 by Corona688 on Tuesday 18th of September 2012 04:57:40 PM
Old 09-18-2012
Find out the model of your hard drive and look it up.

You can often get the model from /sys/.

Code:
$ awk '{ print FILENAME, $0 }' /sys/class/block/sd[a-z]/device/model

/sys/class/block/sda/device/model ST2000DL003-9VT1
/sys/class/block/sdb/device/model ST32000542AS
/sys/class/block/sdc/device/model Maxtor 6L160P0

$

This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies

2. Shell Programming and Scripting

Check if rpm is installed

Hi all im hoping someone can help, i want to check if a rpm package is installed, if it is then display one text if not then another text, below is what i have got so far, im am very much a noob at this, as you can probably can see so if possible make it simple, and a big thankyou if you can help... (3 Replies)
Discussion started by: dave123
3 Replies

3. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

4. Shell Programming and Scripting

HDD free space check

Hi, I need to add a condition in a script. The script is executed only if there is free 8 Gigas space. I know if then fi I don't know how to write the condition on free space Thanks :) (1 Reply)
Discussion started by: pppswing
1 Replies

5. UNIX for Dummies Questions & Answers

Old HDD copy to new HDD ? im lost...

Over the last few months the HDD spins louder and louder, so I fiqured its time to replace the HDD. Its been running 24/7/365 since 98 :eek:. yes i said since 98 :D I have an IBM system 43P Model 240. 233 MHz. running AIX Version 4. The current HDD is an IBM DGHS COMP IEC -950 FRU PN#... (5 Replies)
Discussion started by: Chevy89rocks
5 Replies

6. HP-UX

How to check HDD partno:

Hi Friends, I am running true64unix in compaq ES40 server. I am New to true64unix. My question is how to check the partno: of HDD without changing the state of the server. Is there any similar command of solaris like showfru or format there to check the partno. Thanks N regards (1 Reply)
Discussion started by: subhankar
1 Replies

7. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

8. Shell Programming and Scripting

awk to check for rpm packages

I have a list of rpm packages... and want to check if the version is equal to or greater than the package in the package list. This is what I have so far... but I would like to add more intelligence to it. while read line do COUNT=`rpm -qa --qf "%{n}-%{v}-%{r} (%{arch})\n" | grep -c "$line"` ... (0 Replies)
Discussion started by: linux4life
0 Replies

9. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

10. AIX

IBM AIX Internal HDD vs SAN HDD and Oracle

Hi Folks, I am facing an issue with the performance. P4 with 1 processor and 16 GB RAM and SAN HDD = Oracle report takes 25 minutes P5 with 2 processors and 16 GB RAM internall HDD with LPAR = Oracle Report takes 1 hour 15 minutes ( please note I have assigned all the max processors and... (7 Replies)
Discussion started by: filosophizer
7 Replies
SG_MAP26(8)							     SG3_UTILS							       SG_MAP26(8)

NAME
sg_map26 - maps a special file to a SCSI generic (sg) device (or vice versa) SYNOPSIS
sg_map26 [--dev_dir=DIR] [--given_is=0|1] [--help] [--result=0|1|2|3] [--symlink] [--verbose] [--version] DEVICE DESCRIPTION
Maps a special file (block or char) associated with a SCSI device to the corresponding SCSI generic (sg) device, or vice versa. Can also be given a sysfs file, for example '/sys/block/sda' or '/sys/block/sda/dev'. Rather than map to or from a sg device, the sysfs file name matching a given device special file (or vice versa) can be requested. This is done with '--result=2' and '--result=3'. This feature works on ATA devices (e.g. 'dev/hdc') as well as SCSI devices. In this utility, "mapped" refers to finding the relationship between a SCSI generic (sg) node and the higher level SCSI device name; or vice versa. For example '/dev/sg0' may "map" to '/dev/sda'. Mappings may not exist, if a relevant module is not loaded, for example. Also there are SCSI devices that can only be accessed via a sg node (e.g. SAF-TE and some SES devices). In this utility, "matching" refers to different representations of the same device accessed via the same driver. For example, '/dev/hdc' and '/sys/block/hdc' usually refer to the same device and thus would be considered matching. A related example is that '/dev/cdrom' and '/dev/hdc' are also considered matching if '/dev/cdrom' is a symlink to '/dev/hdc'. OPTIONS
Arguments to long options are mandatory for short options as well. -d, --dev_dir=DIR where DIR is the directory to search for resultant device special files in (or symlinks to same). Only active when '--result=0' (the default) or '--result=2'. If this option is not given and DEVICE is a device special file then the directory part of DEVICE is assumed. If this option is not given and DEVICE is a sysfs name, then if necessary '/dev' is assumed as the directory. -g, --given_is=0 | 1 specifies the DEVICE is either a device special file (when the argument is 0), or a sysfs 'dev' file (when the argument is 1). The parent directory of a sysfs 'dev' file is also accepted (e.g. either '/sys/block/sda/dev' or '/sys/block/sda' are accepted). Usu- ally there is no need to give this option since this utility first checks for special files (or symlinks to special files) and if not, assumes it has been given a sysfs 'dev' file (or its parent). Generates an error if given and disagrees with variety of DEVICE. -h, --help output the usage message then exit. -r, --result=0 | 1 | 2 | 3 specifies what variety of file (or files) that this utility tries to find. The default is a "mapped" device special file, when the argument is 0. When the argument is 1, this utility tries to find the "mapped" sysfs node name. When the argument is 2, this util- ity tries to find the "matching" device special file. When the argument is 3, this utility tries to find the "matching" sysfs node name. -s, --symlink when a device special file is being sought (i.e. when '--result=0' (the default) or '--result=2') then also look for symlinks to that device special file in the same directory. -v, --verbose increase the level of verbosity, (i.e. debug output). -V, --version print the version string and then exit. NOTES
This utility is designed for the linux 2.6 kernel series. It uses special file major and minor numbers (and whether the special is block or character) together with sysfs to do its mapping or matching. In the absence of any other information, device special files are assumed to be in the '/dev' directory while sysfs is assumed to be mounted at '/sys'. Device names in sysfs are predictable, given the corresponding major and minor number of the device. However, due to udev rules, the name of device special files can be anything the user desires (e.g. '/dev/sda' could be named '/dev/my_boot_disk'). When trying to find a resultant device special file, this utility uses the major and minor numbers (and whether a block or char device is sought) to search the device directory. This utility only shows one relationship at a time. To get an overview of all SCSI devices, with special file names and optionally the "mapped" sg device name, see the lsscsi utility. EXAMPLES
Assume sg2 maps to sdb while dvd, cdrom and hdc are all matching. # sg_map26 /dev/sg2 /dev/sdb # sg_map26 /dev/sdb /dev/sg2 # sg_map26 --result=0 /dev/sdb /dev/sg2 # sg_map26 --result=3 /dev/sdb /sys/block/sda # sg_map26 --result=1 /dev/sdb /sys/class/scsi_generic/sg0 Now look at '/dev/hdc' and friends # sg_map26 /dev/hdc <error: a hd device does not map to a sg device> # sg_map26 --result=3 /dev/hdc /sys/block/hdc # sg_map26 --result=2 /dev/hdc /dev/hdc # sg_map26 --result=2 --symlink /dev/hdc /dev/cdrom /dev/dvd /dev/hdc # sg_map26 --result=2 --symlink /sys/block/hdc /dev/cdrom /dev/dvd /dev/hdc EXIT STATUS
The exit status of sg_map26 is 0 when it is successful. Otherwise see the sg3_utils(8) man page. AUTHORS
Written by Douglas Gilbert. REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>. COPYRIGHT
Copyright (C) 2005-2007 Douglas Gilbert This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. SEE ALSO
udev(8), udevinfo(8), lsscsi(lsscsi) sg3_utils-1.23 January 2007 SG_MAP26(8)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy