Forum Discussion

timus's avatar
timus
Level 4
14 years ago

"vxprivutil" not able to read configuration data from disk

OS name :  HP-UX B.11.31 U ia64 VxVM version : VRTSvxvm              5.0.31.1       Veritas Volume Manager by Symantec   Below is the scneario - # vxdg list vgebt2db02 Group:     vgebt2db0...
  • g_lee's avatar
    14 years ago

    A clue as to why/how vxprivutil was zeroed is in your output examples:

    # root> /etc/vx/diag.d/vxprivutil scan /dev/vx/rdmp/c21t11d2;echo $?

    and later:

    /homeroot/root> ll /etc/vx/diag.d/vxprivutil

    It appears your default prompt (PS1) is [current working directory]> (ie: current working directory followed by the ">" character. If the command was copied and pasted from an earlier run, and the last character of the prompt was accidentally copied as well, this would zero the file.

    ie: if you accidentally enter

    > /etc/vx/diag.d/vxprivutil scan <disk>

    instead of just

    /etc/vx/diag.d/vxprivutil scan <disk>

    This would zero the file, as it directs "nothing" to the file (ie: overwrites its contents with nothing)

    Similarly, if you ran the command in your intial post exactly as follows:

    # root> /etc/vx/diag.d/vxprivutil scan /dev/vx/rdmp/c21t11d2;echo $?

    Assuming the # is your prompt and the rest of the line (ie: in italics) is your command, this would definitely have overwritten the file with the contents of the file "root" if it existed. If no file named "root" existed (which presumably is the case) then this overwrites the contents with nothing, resulting in a zero file.

    In summary, to avoid this problem in future take care when copying/pasting commands, particularly if your prompt has ">" or other characters that may be interpreted/parsed by shell if entered accidentally/incorrectly!