Thursday, January 7, 2010

When unmirrorlv command failed

So what to do?

1. Make a backup before you do anything

2. Create the map file to specify the PPs you want to remove:
# lquerylv -L `getlvodm -l fslv00` -r > /tmp/mapfile

3. vi /tmp/mapfile and remove all good PP's, keep PP's you want to unmirror.

4. Deallocate the PPs using lreducelv (- s "number_of_lines_in_map_file" )

# lreducelv -l `getlvodm -l fslv00` -s 12 /tmp/mapfile

After we are done we should then see lslv -m fslv00 have only one copy

Example:
lquerylv -L `getlvodm -l fsdwhsas2lv` -r > /tmp/fsdwhsas2lv.map
lreducelv -l `getlvodm -l fsdwhsas2lv` -s 24 /tmp/fsdwhsas2lv.map
mklvcopy -s'y' fsdwhsas2lv 2 hdisk74 (now I can extend mirror to 2nd good disk)
syncvg -l dwh2home24lv


1 comment:

  1. Thanks for this, it came in very handy today.

    ReplyDelete