Solaris format command fails with Warning: error setting drive geometry.Warning: error writing VTOC.Label failed.

Summary: Unable to format newly assigned devices under PowerPath control. When the pseudo device name is given as an argument of the format command, the device is not found ... and when the device is selected by its native names, the format command fails with Warning: error setting drive geometry.Warning: error writing VTOC. Label failed. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

devices were reconfigured using the same host lun devices without cleaning up PowerPath after unmasking the previous devices. Later, the dead paths were removed with a "powermt check".

or devices were added to the configuration and a panic later occurred, leaving the boot archive inconsistent.

environment : Solaris 10 or Solaris 11
EMC SW : PowerPath for Solaris (any release)

# format emcpower0a
No disks found!
# format
...
Specify disk (enter its number): 165
selecting c1t500009792318B960d42
[disk formatted]
format> p
partition> label
Ready to label disk, continue? y

Warning: error setting drive geometry.
Warning: error writing VTOC.
Label failed.
partition>

Cause

The device is missing entries in /devices/pseudo

All the entries in /dev/dsk and /dev/rdsk are correct ... but are pointing nowhere:

    294998    2 lrwxrwxrwx   1 root     root          34 Jun 26 12:55 emcpower0 -> ../../devices/pseudo/emcp@0:wd,blk
    294997    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0a -> ../../devices/pseudo/emcp@0:a,blk
    291378    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0b -> ../../devices/pseudo/emcp@0:b,blk
    289256    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0c -> ../../devices/pseudo/emcp@0:c,blk
    295005    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0d -> ../../devices/pseudo/emcp@0:d,blk
    289257    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0e -> ../../devices/pseudo/emcp@0:e,blk
    289258    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0f -> ../../devices/pseudo/emcp@0:f,blk
    289259    2 lrwxrwxrwx   1 root     root          33 Jun 26 12:55 emcpower0g -> ../../devices/pseudo/emcp@0:g,blk


no emcp@0 entry in /devices/pseudo.

Resolution

The entry in /devices/pseudo need to be recreated. First of all, check that the issue is not caused by the presence of the HPOvPerfAgt package. Otherwise, use one of the 4 following methods. If the 1st method fails, the second method should succeed. In the worst-case scenario,  the last one should succeed.

1) try to recreate the emcp entries in /devices/pseudo using the "devfsadm -i emcp" command
# devfsadm -i emcp
# ls /devices/pseudo/emcp@0
    (check that the entries now exist - note that emcp@0 is for emcpower0; for emcpowerXX, look for emcp@XX)
# bootadm update-archive    (to consolidate the configuration change in the boot information) 

2) The previous command might be unsuccessful in creating the new entries in /devices. The command below is based on the fact that, when a successful "emcpadm renamepseudo" command is run, all the entries in /devices are rebuilt. This is a side-effect of this command which will be very useful to fix the issue here.
Pick-up an unused pseudo device (not currently mounted and part of a filesystem)  which is not having any issue (which is showing up in format and for which entries exist under /devices). Let's say this good pseudo-device is emcpower7. And let's assume that there is no emcpower1007 in the configuration so that emcpower1007 is a possible new name. Run :
# emcpadm renamepseudo -s 7 -t 1007
# emcpadm renamepseudo -s 1007 -t 7
# powermt save
# bootadm update-archive


It is important to use a "good" pseudo device .... and not the pseudo device which has no entry in /devices otherwise the command will fail (see paragraph 4 below) and will not fix the /devices entries.
With the above commands, after the first one, the issue should already be fixed. The second rename is just there to get the original pseudoname back. The last 2 commands are there to consolidate the change.

3) try to unmanage / manage the problematic device (this will probably fail)
# powermt unmanage dev=emcpower0a
ERROR: Unmanage failed


4) try to rename the problematic pseudo device  (this will probably fail)
# emcpadm renamepseudo -s 0 -t 1000
<ERROR: can not rename device. emcpower0 does not exist>
 

5) completely reconfigure the problematic device
# powermt remove dev=0
# powermt save

>> unmask the device from the Storage Group
# devfsadm -C (to remove the entries in /dev/dsk and /dev/rdsk for the native paths)
# rm /dev/dsk/emcpower0*
# rm /dev/rdsk/emcpower0*

>> mask the device back into the Storage Group
# devfsadm (to recreate the entries for the native paths)
# powermt config (to reconfigure Powerpath)
# powermt display dev=all (check that the pseudo device was reconfigured)
# powermt save
# ls /devices/pseudo/emcp@0
    (check that the entries now exist - note that emcp@0 is for emcpower0; for emcpowerXX, look for emcp@XX)
# bootadm update-archive    (to consolidate the configuration change in the boot information) 

Affected Products

PowerPath for Solaris

Products

PowerPath for Solaris
Article Properties
Article Number: 000065154
Article Type: Solution
Last Modified: 28 Oct 2024
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.