Verifying that a disk is readable to the operating system (OS) using native OS commands

Article: 100028439
Last Published: 2013-03-19
Ratings: 0 0
Product(s): InfoScale & Storage Foundation

Problem

Verifying that a disk is readable to the operating system (OS) using native OS commands

Solution

 

This article is a part of a set on troubleshooting failed, or failing, disks. Click here to start at the beginning: https://www.veritas.com/docs/000080622

 


Table of Contents

Introduction
Using vxdisk to determine the native disk name
Reading a disk label using native tools
Using dd to verify that a disk is readable by the operating system
Additional considerations






Introduction
(Back to top)

When troubleshooting the status of a disk that appears to be unreadable, use native OS commands to confirm that the OS can actually read the disk outside of Veritas. This will help identify the source of a disk outage, and whether the outage is the result of a problem within Veritas itself, or the result of a problem at a lower layer, such as with the OS or with the storage area network (SAN).

Veritas depends on the operating system (OS) device drivers to communicate with disks. If the OS is unable to read a disk, Veritas will also fail to read it. If a disk does not have a label, or the label has been corrupted, Veritas will not recognize the disk.





Using vxdisk to determine the native disk name
(Back to top)

Use vxdisk, with the "-e" option, to determine the native OS name for the disk. Using the native disk name bypasses Veritas to confirm that the OS can read the disk label, outside of Veritas.

In Figure 1, notice the "OS_NATIVE_NAME" column. Use the OS native name when testing to see if the OS is able to read a disk label, or whether any blocks can be read from the disk.


Figure 1 - Using vxdisk with the "-e" option to review the "OS native name"


Syntax:

bash-3.00# vxdisk -e -o alldgs list


For example:
 
bash-3.00# vxdisk -e -o alldgs list
DEVICE    TYPE          DISK      GROUP   STATUS    OS_NATIVE_NAME
ams_wms0  auto          -         -       error           c3t0d0s2
ams_wms1  auto:cdsdisk  testdg02  testdg  online          c3t0d1s2
ams_wms2  auto:cdsdisk  testdg03  testdg  online          c3t0d2s2
ams_wms3  auto:cdsdisk  testdg04  testdg  online          c3t0d3s2
ams_wms4  auto:cdsdisk  testdg05  testdg  online          c3t0d4s2
disk_0    auto:cdsdisk  -         -       online          c1t1d0s2
disk_1    auto:none     -         -       online invalid  c1t0d0s2
-            -          testdg01  testdg    failed was:ams_wms0_59


 






Reading a disk label using native tools
(Back to top)

Use the native OS commands to verify that the OS can read the disk label.

If a disk does not have a label, or the label has been corrupted, Veritas will not recognize the disk. If the disk label is unreadable, it may be because the disk does not have a label, or because the OS is unable to read the disk at all.

Table 1 contains commands and syntax that can be used for reading a disk label for various operating systems, along with the typical output. The exact output that is printed will vary according to the hardware.

 


Note: These are not Veritas commands. This information is provided as a convenience and should not be regarded as authoritative. Review the official documentation supplied by the vendors for their respective platforms to confirm the correct usage of these commands.

 

Table 1 - Native operating system commands for reading a disk label

Platform Syntax and examples
Solaris
Syntax:

prtvtoc /dev/rdsk/<os_native_name>


Example, with typical output:

# prtvtoc /dev/rdsk/c3t0d0s2

* /dev/rdsk/c3t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     768 sectors/track
*      50 tracks/cylinder
*   38400 sectors/cylinder
*      54 cylinders
*      52 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0   1996800   1996799
       7     15    01          0   1996800   1996799

 
Linux
Syntax:

fdisk -l /dev/<os_native_name>


Example, with typical output:

# fdisk -l /dev/sde

Disk /dev/sde (Sun disk label): 64 heads, 32 sectors, 1022 cylinders
Units = cylinders of 2048 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sde3  u          0      1022   1046528    5  Whole disk
/dev/sde8  u          0      1022   1046528    f  Unknown

 
AIX
Syntax:

lspv <os_native_name>


Example, with typical output:

# lspv hdisk1

PHYSICAL VOLUME:    hdisk1                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      0001766a42fa7dd8 VG IDENTIFIER     0001766a0000d30000000137a9cd7d39
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  11
TOTAL PPs:          546 (69888 megabytes)    VG DESCRIPTORS:   2
FREE PPs:           407 (52096 megabytes)    HOT SPARE:        no
USED PPs:           139 (17792 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  109..80..00..109..109
USED DISTRIBUTION:  01..29..109..00..00
MIRROR POOL:        None

 
HP-UX
Syntax:

diskinfo /dev/rdsk/<os_native_name>


Example, with typical output:

# diskinfo /dev/rdsk/c0t15d1

SCSI describe of /dev/rdsk/c0t15d1:
             vendor: HITACHI
         product id: DF600F
               type: direct access
               size: 5242880 Kbytes
   bytes per sector: 512

 


 

 


Using dd to verify that a disk is readable by the operating system
(Back to top)

Use dd to determine if the disk is readable to the OS.

If dd is able to read blocks from the raw disk device, but not the label, use the native OS commands to manage, and possibly recreate, the label.

If dd is unable to read blocks from the disk device, then the cause of the error is likely outside of the scope of Veritas itself.  Problems at a lower layer, such as with the HBAs, OS or SAN should be suspected.

 


Note: These are not Veritas commands. This information is provided as a convenience and should not be regarded as authoritative. Review the official documentation supplied by the vendors for their respective platforms to confirm the correct usage of these commands.



Figure n - Using dd to read a raw disk device

Platform Syntax and examples
Solaris
Syntax:

dd if=/dev/rdsk/<os_native_name> count=1 bs=512 | od -v -t c

Note: For a hexadecimal dump, replace "c" with "x."


Example, with typical output:

# dd if=/dev/rdsk/c3t0d1s2 count=1 bs=512 | od -v -t c

00000001+0 records in
1+0 records out
   H   I   T   A   C   H   I   -   D   F   6   0   0   F   -   0
0000020   0   0   0       c   y   l       5   2       a   l   t       2
0000040       h   d       5   0       s   e   c       7   6   8  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000120  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000160  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200  \0  \0  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \b  \0  \0
0000220  \0  \0  \0  \0  \0  \0  \0 005  \0 001  \0  \0  \0  \0  \0  \0
0000240  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 017  \0 001  \0  \0
0000260  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   `  \r 336 356
0000300  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000340  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000400  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000420  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000440  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000460  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000500  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000520  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000540  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000560  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000600  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000620  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000640  \0  \0  \0  \0 025 030  \0   6  \0  \0  \0  \0  \0  \0  \0 001
0000660  \0   4  \0 002  \0   2 003  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000700  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000720  \0 036   x  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000740  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000760  \0  \0  \0  \0  \0  \0  \0  \0  \0 036   x  \0 332 276 177   #
0001000

 
Linux
Syntax:

dd if=/dev/<os_native_name> count=1 bs=512 | od -v -t c

Note: For a hexadecimal dump, replace "c" with "x."


Example, with typical output:

# dd if=/dev/sde count=1 bs=512 | od -v -t c

1+0 records in
1+0 records out
512 bytes (512 B) copied, 1.91e-05 s, 26.8 MB/s
0000000   -   - 004       c   y   l       1   0   2   2       a   l   t
0000020       2       h   d       6   4       s   e   c       3   2  \0
0000040  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000120  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000160  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200  \0  \0  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \b  \0  \0
0000220  \0  \0  \0  \0  \0  \0  \0 005  \0 001  \0  \0  \0  \0  \0  \0
0000240  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 017  \0 001  \0  \0
0000260  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   `  \r 336 356
0000300  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000340  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000400  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000420  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000440  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000460  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000500  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000520  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000540  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000560  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000600  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000620  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000640  \0  \0  \0  \0 034     004  \0  \0  \0  \0  \0  \0  \0  \0 001
0000660 003 376  \0 002  \0   @  \0      \0  \0  \0  \0  \0  \0  \0  \0
0000700  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000720  \0 037 360  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000740  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000760  \0  \0  \0  \0  \0  \0  \0  \0  \0 037 360  \0 332 276 023 315
0001000

 
AIX
Syntax:

dd if=/dev/<os_native_name> count=1 bs=512 | od -v -t c

Note: For a hexadecimal dump, replace "c" with "x."


Example, with typical output:

# dd if=/dev/rhdisk1 count=1 bs=512 | od -v -t c

1+0 records in.
1+0 records out.
0000000    É      Ô   Á  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000060   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000120   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000160   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200   \0 001   v   j   B   ú   }   Ø  \0  \0  \0  \0  \0  \0  \0  \0
0000220   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000240   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000260   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000300   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000340   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000400   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000420   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000440   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000460   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000500   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000520   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000540   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000560   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000600   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000620   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000640   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000660   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   ÿ
0000700    ÿ   ÿ   A   ÿ   ÿ   ÿ 002 021  \0  \0 031  \0  \0  \0 200   ÿ
0000720    ÿ   ÿ   A   ÿ   ÿ   ÿ 033 021  \0  \0 215   à  \0  \0  \0  \0
0000740   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000760   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U   ª
0001000

 
HP
Syntax:

dd if=/dev/rdsk/<os_native_name> count=1 bs=512 | od -v -t c

Note: For a hexadecimal dump, replace "c" with "x."


Example, with typical output:

# dd if=/dev/rdsk/c0t15d2 count=1 bs=512 | od -v -t c

1+0 records in
1+0 records out
0000000    H   I   T   A   C   H   I   -   D   F   6   0   0   F   -   0
0000020    0   0   0       c   y   l       2   5   5   8       a   l   t
0000040        2       h   d       1   2   8       s   e   c       3   2
0000060   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000120   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000160   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200   \0  \0  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \b  \0  \0
0000220   \0  \0  \0  \0  \0  \0  \0 005  \0 001  \0  \0  \0  \0  \0  \0
0000240   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 017  \0 001  \0  \0
0000260   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   `  \r 336 356
0000300   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000320   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000340   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000360   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000400   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000420   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000440   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000460   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000500   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000520   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000540   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000560   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000600   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000620   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000640   \0  \0  \0  \0 016 020  \n  \0  \0  \0  \0  \0  \0  \0  \0 001
0000660   \t 376  \0 002  \0 200  \0      \0  \0  \0  \0  \0  \0  \0  \0
0000700   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000720   \0 237 340  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000740   \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000760   \0  \0  \0  \0  \0  \0  \0  \0  \0 237 340  \0 332 276 032   0
0001000

 






Additional Considerations
(Back to top)

Here is a list of additional troubleshooting steps that should be considered when a disk is determined to be unreadable the OS.

  • Review the syslog for the operating system for errors reported by "scsi." I/O are commonly reported by this source, and may be useful for troubleshooting the problem.
  • Can other nodes read the disks? Try deporting the diskgroup and importing it onto another node. This will require an outage.
  • If the diskgroup was created, or upgraded, on a system that is running a different version of Veritas,  use "vxdg list <diskgroup_name>" to confirm that the version of the diskgroup is not later than what this node is able to support. Older versions of Veritas cannot use diskgroups with newer versions.
  • Is the disk under SCSI reservation by another node?
  • Verify that the host bus adapters (HBAs) for the affected server are still included within the same zone as the target controllers for the disk.
  • If hardware-based replication, or mirroring, is present, determine if the disks are currently in a "read-only" state.
  • Investigate the disk array for errors. Determine if any firmware or microcode updates are required.
  • Use the HBA management software to verify that the HBA settings and drivers are correct. If needed, compare the HBA settings for an affected server with a server that is not experiencing problems..
  • Have there been any recent changes, such as software installations, driver updates, hardware changes or changes to the SAN? 
  • Verify that the configuration matches the Veritas Hardware Compatibility List (HCL).

 


Was this content helpful?