How to break mirror with two identical copies - HP unix

Split LVs

Now all logical volumes in /dev/vg00 volume group are mirrored. It is time to split this mirror so we have two identical copies of our system. To make sure you don't loose any data this should be done only when all your applications are stopped.

# lvsplit -s bkp /dev/vg00/lv*
Logical volume "/dev/vg00/lvol1bkp" has been successfully created with
character device "/dev/vg00/rlvol1bkp".
Logical volume "/dev/vg00/lvol1" has been successfully split.
--(text cut)--
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

With this we have split every logical volume to the original and copy with 'bkp' sufix. For example, lvol1 and lvol1bkp, lvol2 and lvol2bkp, and so on. In case of a problem after patching we will use 'bkp' logical volumes.

After splitting, new logical volumes (ones with the 'bkp' suffix) needs to be checked with the fsck for consistency.

# for i in /dev/vg00/lv*bkp; do fsck -F $(fstyp $i) $i; done
log replay in progress
replay complete - marking super-block as CLEAN
unknown_fstyp (no matches)
fsck: invalid argument to "-F FStype" option
fsck: /dev/vg00/lvol2bkp is not a valid file system type
usage: fsck [-F FStype] [-V] [-m] [special...]
or fsck [-F FStype] [-V] [-m] [-o specific_options] [special...]
log replay in progress
replay complete - marking super-block as CLEAN
--(text cut)--

Do not worry about that error we got there. It is because we tried to fsck SWAP filesystem.

Share this

Related Posts

Next Post »


Write comments
November 25, 2014 at 6:05 PM delete

You should test the fstype to avoid the error message


What do you think about this Article? Add your Opinion..! EmoticonEmoticon