Sponsored Content
Operating Systems HP-UX determine the physical size of the hard disk Post 302145465 by fpmurphy on Wednesday 14th of November 2007 09:16:24 AM
Old 11-14-2007
What about diskinfo?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies

2. Solaris

Solaris 10 - How to find the total size of my hard disk?

Friends, I have an 80 GB HDD, but I wish to know if there is a direct command in Solaris 10 to find out the size of my hard disk (similar to fdisk -l in Linux). Thank you saagar (3 Replies)
Discussion started by: saagar
3 Replies

3. Filesystems, Disks and Memory

Does vmstat -d give a count of actual physical writes/reads done to/from hard disk?

Hi, I am trying to find the reliability of 'vmstat -d' for showing the actual physical writes on sectors on hard disk. Can anyone please tell me if the numbers in the "sectors" field under "read" or "write" headers show a count of the actual write commands sent to disk from the low level... (2 Replies)
Discussion started by: jake24
2 Replies

4. Filesystems, Disks and Memory

How do I check 4 physical damaged on Linux hard disks?

How do I check for physical damage on red hat linux hard disks? I tried smartctl /dev/sdb but it came back so fast saying it was ok. Is there a better linux command to check for bad sectors or physical disks in linux? Is there a good way such as with parted or something else? I normally in HP... (4 Replies)
Discussion started by: taekwondo
4 Replies

5. Solaris

Solaris sun4v - how do you determine physical RAM?

I have a Sun T5120, and I want to programmatically determine how much RAM it has. # uname -a SunOS myhost 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5120 The box has 64Gb; I tried prtdiag and prtconf, but they give me bogus info prtconf gives me: # prtconf |grep -i... (12 Replies)
Discussion started by: thomn8r
12 Replies

6. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

7. AIX

How to determine the physical volume fo the disks

This is the report I got running the comand rptconf, but I would like to know what is the capacity of the disks installed into our server power 6 with AIX System Model: IBM,7778-23X Machine Serial Number: 1066D5A Processor Type: PowerPC_POWER6 Processor Implementation Mode: POWER 6... (6 Replies)
Discussion started by: cucosss
6 Replies

8. UNIX for Dummies Questions & Answers

Display total hard disk size?

Hi, Using Redhat, how do I display total hard disk size? I know how to do that in Solaris, you can type, format. It will show how big the disks are. This is what I did so for. $ df -t ext3 -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 ... (1 Reply)
Discussion started by: samnyc
1 Replies

9. UNIX for Advanced & Expert Users

Physical disk IO size smaller than fragment block filesystem size ?

Hello, in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a ... (4 Replies)
Discussion started by: rarino2
4 Replies

10. Solaris

T5220 How to determine physical memory installed?

Hi, looking to upgrade memory on a pair of T5220's from 32GB to 64GB. Cannot determine current DIMM size and slots used. i.e. not sure if Qty 16 x 2GB or Qty 8 x 4GB. If there are no empty slots, i need to go with higher density DIMMs and retire exsisting the 2GB prtdiag follows. #... (3 Replies)
Discussion started by: edrew
3 Replies
scsi(7) 						 Miscellaneous Information Manual						   scsi(7)

NAME
scsi - Small Computer System Interface device drivers DESCRIPTION
The Small Computer System Interface (SCSI) is an American National Standard for interconnecting computers and peripheral devices. HP-UX supports the SCSI device protocol on parallel SCSI interfaces (see ANSI Std X3.131-199X, "SCSI-2"), Fibre Channel interfaces (see ANSI Std X3.269-199X, "Fibre Channel Protocol for SCSI"), and Serial Attached SCSI interfaces (SAS). The SCSI standard includes specifications for a variety of device types. This section describes the general SCSI interface for all SCSI device drivers. Information about specific device types can be found in the manual sections which describe SCSI peripheral device drivers for those device types. The ioctls described here can be issued either on persistent device files or legacy devices (see intro(7)). Legacy device files are depre- cated with HP-UX release 11i V3. They are maintained for backward compatibility, and may be obsolete in future releases. The behavior of some ioctls may differ depending on whether issued on persistent device files or legacy device files, and whether multi- pathing is enabled on legacy device files. Typically ioctls issuing SCSI commands to a device may use any available LUN path to send the commands. However, when multi-pathing is disabled on legacy device files (see attribute in scsimgr(1M)), the ioctl only attempts to use the LUN path corresponding to the legacy device file. If this LUN path is not available, the ioctl will fail even if there are other LUN paths available. This behavior corresponds to the legacy behavior. The ioctl is supported by all SCSI device drivers. This ioctl returns the SCSI device-specific INQUIRY command data. This data contains device identification and capability information. Since there have been multiple versions of the SCSI standard for inquiry data, multiple versions of the inquiry data declaration are provided. The SCSI-1 version is provided for backward compatibility only. If issued on a legacy device file, this ioctl only tries to use the LUN path corresponding to the legacy device file even if multi-pathing is enabled on legacy device files. The ioctl indicates the current device size. A device size is defined to be a logical block size and some number of logical blocks. The means of determining this device-size data is particular to the specific device type. Logical block size and/or number of logical blocks equal to zero indicates: the device size is unknown, the device is not currently capable of I/O operations, or I/O operations are not mean- ingful for the device. Note that for very large devices, the ioctl argument can overflow, is a better choice, than where devices can be large. Also note that is preferred (see disk(7)). The header file has useful information for SCSI devices. The following is included from #define SIOC_INQUIRY _IOR('S', 2, union inquiry_data) #define SIOC_CAPACITY _IOR('S', 3, struct capacity) #define SIOC_STORAGE_CAPACITY _IOR('S', 101, storage_capacity_t) /* SCSI inquiry structure */ struct inquiry { unsigned char dev_type; unsigned int rmb :1; unsigned int dtq :7; unsigned int iso :2; unsigned int ecma :3; unsigned int ansi :3; unsigned int resv :4; unsigned int rdf :4; unsigned char added_len; unsigned char dev_class[3]; char vendor_id[8]; char product_id[16]; char rev_num[4]; unsigned char vendor_spec[20]; unsigned char resv4[40]; unsigned char vendor_parm_bytes[32]; }; /* SCSI-2 inquiry structure */ struct inquiry_2 { unsigned int periph_qualifier:3; unsigned int dev_type :5; unsigned int rmb :1; unsigned int dtq :7; unsigned int iso :2; unsigned int ecma :3; unsigned int ansi :3; unsigned int aenc :1; unsigned int trmiop :1; unsigned int resv1 :2; unsigned int rdf :4; unsigned char added_len; unsigned char resv2[2]; unsigned int reladr :1; unsigned int wbus32 :1; unsigned int wbus16 :1; unsigned int sync :1; unsigned int linked :1; unsigned int resv3 :1; unsigned int cmdque :1; unsigned int sftre :1; char vendor_id[8]; char product_id[16]; char rev_num[4]; unsigned char vendor_spec[20]; unsigned char resv4[40]; unsigned char vendor_parm_bytes[32]; } inquiry_2_t; /* Definition for version description in SPC-2, SPC-3, and SPC-4 inquiry */ typedef uint8_t vdesc_t[2]; /* SCSI-3 inquiry structure */ /* * Note that this stucture does not match the SCSI-3 (SPC) spec. Structures * have been added below for SPC, SPC-2, SPC-3, and SPC-4. This structure is * kept here for binary compatibility. */ typedef struct inquiry_3 { uint32_t pq :3; uint32_t pdt :5; uint32_t rmb :1; uint32_t rsvd1 :7; uint32_t version :8; uint32_t aerc :1; uint32_t obslt1 :1; uint32_t naca :1; uint32_t hisup :1; uint32_t rdf :4; uint32_t added_len :8; uint32_t sccs :1; uint32_t rsvd2 :7; uint32_t bque :1; uint32_t encserv :1; uint32_t vs1 :1; uint32_t multip :1; uint32_t mchngr :1; uint32_t obslt2 :1; uint32_t obslt3 :1; uint32_t addr16 :1; uint32_t reladr :1; uint32_t obslt4 :1; uint32_t wbus16 :1; uint32_t sync :1; uint32_t linked :1; uint32_t obslt5 :1; uint32_t cmdque :1; uint32_t vs2 :1; uint8_t vendor_id[8]; uint8_t product_id[16]; uint8_t rev_num[4]; uint8_t vendor_spec[20]; uint16_t rsvd3 :4; uint16_t clcking :2; uint16_t qas :1; uint16_t ius :1; uint16_t rsvd4 :8; vdesc_t vers_desc[8]; uint8_t rsvd5[22]; uint8_t vendor_parm_bytes[32]; } inquiry_3_t; /* SCSI-3 inquiry structure for SPC */ typedef struct inquiry_3_new { uint32_t pq :3; uint32_t pdt :5; uint32_t rmb :1; uint32_t rsvd1 :7; unsigned int iso :2; unsigned int ecma :3; unsigned int ansi :3; uint32_t aerc :1; uint32_t trmtsk :1; uint32_t naca :1; uint32_t rsvd2 :1; uint32_t rdf :4; uint32_t added_len :8; uint32_t rsvd3 :8; uint32_t rsvd4 :1; uint32_t encserv :1; uint32_t vs1 :1; uint32_t multip :1; uint32_t mchngr :1; uint32_t ackreqq :1; uint32_t addr32 :1; uint32_t addr16 :1; uint32_t reladr :1; uint32_t wbus32 :1; uint32_t wbus16 :1; uint32_t sync :1; uint32_t linked :1; uint32_t trandis :1; uint32_t cmdque :1; uint32_t vs2 :1; uint8_t vendor_id[8]; uint8_t product_id[16]; uint8_t rev_num[4]; uint8_t vendor_spec[20]; uint8_t rsvd5[40]; uint8_t vendor_parm_bytes[32]; } inquiry_3_t_new; /* SPC-2 inquiry structure */ typedef struct inquiry_4 { uint32_t pq :3; uint32_t pdt :5; uint32_t rmb :1; uint32_t rsvd1 :7; uint32_t version :8; uint32_t aerc :1; uint32_t obslt1 :1; uint32_t naca :1; uint32_t hisup :1; uint32_t rdf :4; uint32_t added_len :8; uint32_t sccs :1; uint32_t rsvd2 :7; uint32_t bque :1; uint32_t encserv :1; uint32_t vs1 :1; uint32_t multip :1; uint32_t mchngr :1; uint32_t obslt2 :1; uint32_t obslt3 :1; uint32_t addr16 :1; uint32_t reladr :1; uint32_t obslt4 :1; uint32_t wbus16 :1; uint32_t sync :1; uint32_t linked :1; uint32_t obslt5 :1; uint32_t cmdque :1; uint32_t vs2 :1; uint8_t vendor_id[8]; uint8_t product_id[16]; uint8_t rev_num[4]; uint8_t vendor_spec[20]; uint16_t rsvd3 :4; uint16_t clcking :2; uint16_t qas :1; uint16_t ius :1; uint16_t rsvd4 :8; vdesc_t vers_desc[8]; uint8_t rsvd5[22]; uint8_t vendor_parm_bytes[32]; } inquiry_4_t; /* SPC-3 and SPC-4 inquiry structure */ typedef struct inquiry_5 { uint32_t pq :3; uint32_t pdt :5; uint32_t rmb :1; uint32_t rsvd1 :7; uint32_t version :8; uint32_t obslt1 :2; uint32_t naca :1; uint32_t hisup :1; uint32_t rdf :4; uint32_t added_len :8; uint32_t sccs :1; uint32_t acc :1; uint32_t tpgs :2; uint32_t third_pc :1; uint32_t rsvd2 :2; uint32_t protect :1; uint32_t bque :1; /* Obsolete for SPC-4 */ uint32_t encserv :1; uint32_t vs1 :1; uint32_t multip :1; uint32_t mchngr :1; /* Obsolete for SPC-4 */ uint32_t obslt2 :2; uint32_t addr16 :1; uint32_t obslt3 :2; uint32_t wbus16 :1; uint32_t sync :1; uint32_t linked :1; /* Obsolete for SPC-4 */ uint32_t obslt4 :1; uint32_t cmdque :1; uint32_t vs2 :1; uint8_t vendor_id[8]; uint8_t product_id[16]; uint8_t rev_num[4]; uint8_t vendor_spec[20]; uint16_t rsvd3 :4; uint16_t clcking :2; uint16_t qas :1; uint16_t ius :1; uint16_t rsvd4 :8; vdesc_t vers_desc[8]; uint8_t rsvd6[22]; uint8_t vendor_parm_bytes[32]; } inquiry_5_t; /* union for SIOC_INQUIRY ioctl */ union inquiry_data { struct inquiry inq1; /* SCSI-1 inquiry */ inquiry_2_t inq2; /* SCSI-2 inquiry */ inquiry_3_t inq3; /* SCSI-3 inquiry */ inquiry_3_t_new inq3n; /* SCSI-3 (SPC) inquiry */ inquiry_4_t inq4; /* SPC-2 inquiry */ inquiry_5_t inq5; /* SPC-3 and SPC-4 inquiry */ }; /* structure for SIOC_CAPACITY ioctl */ struct capacity { uint32_t lba; uint32_t blksz; }; /* structure for SIOC_STORAGE_CAPACITY ioctl */ typedef struct { uint64_t lba; uint32_t blksz; } storage_capacity_t; The ioctl returns detailed information about device status and errors when such information is available. Since there have been multiple versions of the SCSI standard for sense (status) data, multiple versions of the sense data declaration are provided. The SCSI-1 and non- aligned versions are provided for backward compatibility only. If no new CHECK-CONDITION-caused REQUEST SENSE command data has been obtained since the last ioctl call, the and fields will contain the value zero. Applications which require more accurate REQUEST SENSE data handling should use the SCSI device-control driver (see scsi_ctl(7)). The following information is included from #define SIOC_XSENSE _IOR('S', 7, union sense_data) /* structure for SIOC_XSENSE ioctl */ typedef union sense_data { xsense_aligned_t r_sense1a; /* SCSI and CCS devices */ sense_2_aligned_t r_sense2a; /* SCSI-2 devices */ xsense_t r_sense1; /* Do not use; for * compatibility only */ sense_2_t r_sense2; /* Do not use; for * compatibility only */ } sense_data_t; /* * Struct xsense_aligned is for examining the sense data of SCSI-1 * and CCS devices. */ typedef struct xsense_aligned { unsigned int valid :1; unsigned int error_class :3; unsigned int error_code :4; unsigned char seg_num; unsigned int parms:4; unsigned int sense_key :4; unsigned char lba[4]; unsigned char add_len; unsigned char copysearch[4]; /* Unused by HP-UX */ unsigned char sense_code; unsigned char resv; unsigned char fru; unsigned char field; unsigned char field_ptr[2]; unsigned char dev_error[4]; unsigned char misc_bytes[106]; } xsense_aligned_t; /* * Struct sense_2_aligned is for examining the sense data * of SCSI-2 devices */ typedef struct sense_2_aligned { unsigned int info_valid :1; unsigned int error_code :7; unsigned char seg_num; unsigned int filemark :1; unsigned int eom :1; unsigned int ili :1; unsigned int resv :1; unsigned int key :4; unsigned char info[4]; unsigned char add_len; unsigned char cmd_info[4]; unsigned char code; unsigned char qualifier; unsigned char fru; unsigned char key_specific[3]; unsigned char add_sense_bytes[113]; } sense_2_aligned_t; /* * Struct xsense is provided for backward source code * compatibility only. * Struct xsense_aligned is the appropriate struct for * examining the sense * data of SCSI-1 and CCS devices. */ typedef struct xsense { unsigned int valid :1; unsigned int error_class :3; unsigned int error_code :4; unsigned char seg_num; unsigned int parms :4; unsigned int sense_key :4; unsigned char lba[4]; unsigned char add_len; unsigned char copysearch[4]; /* Unused by HP-UX */ unsigned char sense_code; unsigned char resv; unsigned char fru; unsigned char field; unsigned short field_ptr; uint32_t dev_error; unsigned char misc_bytes[106]; } xsense_t; /* * Struct sense_2 is provided for backward source code * compatibility only. * Struct sense_2_aligned is the appropriate struct for * examining the sense * data of SCSI-2 devices. */ typedef struct sense_2 { unsigned int info_valid :1; unsigned int error_code :7; unsigned char seg_num; unsigned int filemark :1; unsigned int eom :1; unsigned int ili :1; unsigned int resv :1; unsigned int key :4; unsigned char info[4]; unsigned char add_len; unsigned int cmd_info; unsigned char code; unsigned char qualifier; unsigned char fru; unsigned char key_specific[3]; unsigned char add_sense_bytes[113]; } sense_2_t; ERRORS
The following errors may result from a call to a SCSI device driver: Required permission is denied for the device or operation. If resulting from an open call, this indicates there is no device at the specified address. For other calls, this indicates the specified address is out of range or the device may no longer be accessed. If resulting from an open call, this indicates the device is not supported by the device driver (e.g., incorrect device type). For other calls, this indi- cates the request or some request argument is invalid. If resulting from the ioctl, one or more of the fields in the argu- ment structure may have overflowed. This indicates the device is not ready for use or that the requested operation conflicts with other operations (e.g., the device is currently open via another device driver or exclusive access is in effect). Indicates a SCSI protocol or communication problem has occurred, or that a SCSI command resulted in a non-good status. Manual entries that describe specific SCSI peripheral device drivers may provide additional qualification of error results. WARNINGS
Use of devices that are not officially supported can cause data loss, system panics and device damage. HP-UX device drivers expect devices to be SCSI-2 compliant. Unsupported devices that are only SCSI-CCS compliant may work but their use is discouraged. Use of unsupported devices that are only SCSI-1 compliant is strongly discouraged. Changing SCSI bus connectivity (recabling) while the system is running is not supported. Switching SCSI device power on or off while the device is connected to a system that does not support powerfail recovery is not supported. These activities are known to cause data loss and system panics. On systems that support the interface, the and ioctls are obsolete (see scsi_ctl(7)). Direct manipulation of SCSI devices via the inter- face provides a more functionally complete and easier-to-use means of low level SCSI device control (see scsi_ctl(7)). Drivers that support only devices which have no meaningful size may not support the ioctl. Total device size in bytes may exceed for some devices. DEPENDENCIES
esdisk/estape/eschgr/sdisk/schgr/stape The ioctl may be used to obtain and release exclusive access. Exclusive access, which prevents simultaneous access by other applications, is required for some operations and may be desirable in other circumstances. The following exclusive access control arguments are sup- ported. The corresponding values are defined in If the ioctl is issued on a persistent device file, target and bus exclusive access actu- ally result to LUN exclusive access. SIOC_REL_LUN_EXCL Release exclusive access to logical unit (LUN). SIOC_SET_LUN_EXCL Gain exclusive access to logical unit (LUN). SIOC_REL_TGT_EXCL Release exclusive access to associated SCSI target. SIOC_SET_TGT_EXCL Gain exclusive access to associated SCSI target. SIOC_REL_BUS_EXCL Release exclusive access to associated SCSI bus. SIOC_SET_BUS_EXCL Gain exclusive access to associated SCSI bus. The ioctl indicates when the media in a removable-media device may have changed. A value of "1" indicates the device media may have changed since the last ioctl call. Note that only the first such call after a media change receives this indication. This means that media changes are likely to be missed if multiple applications are attempting to detect media changes. Exclusive access, obtained through use of the ioctl, can be used to avoid this problem. The following information is included from #define SIOC_MEDIUM_CHANGED _IOR('S', 42, int) #define SIOC_EXCLUSIVE _IOR('S', 68, int) disc3 The ioctl allows access to detailed device specific information. The field specifies which SCSI vital product data page is requested. The field is filled with the requested page data. This ioctl when issued on a legacy device file only attempts to send the INQUIRY command through the LUN path corresponding to the legacy device file even if multi-pathing is enabled on legacy device files. The following information is included from #define SIOC_VPD_INQUIRY _IOWR('S', 10, struct vpd_inquiry) /* union for SIOC_VPD_INQUIRY ioctl */ struct vpd_inquiry { char page_code; /* VPD page code */ char page_buf[126]; /* buffer for VPD page info */ }; FILES
SEE ALSO
diskinfo(1M), ioctl(2), autochanger(7), intro(7), scsi_ctl(7), scsi_disk(7), scsi_tape(7). scsi(7)
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy