MIRRORING THE ROOT VOLUME
1. First create a bootable logical volume disk.
2. Mirror the root logical volume to new disk:
#lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/c0t1d0
3. Mirror the Primary Swap area:
Lvextend –m 1 /dev/vg00/prswaplv /dev/dsk/c0t1d0
4. Verify the LVM was updated:
#lvlnboot –v
BREAKING A MIRROR FOR BACKUP PURPOSES
Mirrors are created and broken from an lvol level. Remember this. If you want to break the mirror for /dev/vg00/lvol1 which may be mounted at / do the following:
#lvsplit /dev/vg00/lvol1
This will by default create a
new, unmounted lvol called lvol1b. You could also do the following:
#lvsplit –s backup /dev/vg00/lvol1
This does the same, but names it lvol1backup
Mount the new lvol to what ever you want, and back it up.
REMIRRORING AFTER BACKUP
After you are finished, you must remirror and sync with existing and new data created on The active mirror. Use this command (using the lvol1b from example above):
#lvmerge /dev/vg00/lvolb /dev/vg00/lvol1
REMOVING A MIRROR (SO YOU CAN PULL A DRIVE)
1. You must first remove the association between each lvol associated with the drive. Use the following command to view the current mirrored lvol’s:
#lvlnboot –v
2. Break the mirror and remove the pv/lvol association for each lvol.
This example removes PV /dev/dsk/c1t0d0 from /dev/vg00/lvol2, and lvol3. Assuming that there was only 1 other disk in the mirror set:
#lvreduce –m 0 /dev/vg00/lvol2 /dev/dsk/c1t0d0
#lvreduce –m 0 /dev/vg00/lvol3 /dev/dsk/c1t0d0
1. First create a bootable logical volume disk.
2. Mirror the root logical volume to new disk:
#lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/c0t1d0
3. Mirror the Primary Swap area:
Lvextend –m 1 /dev/vg00/prswaplv /dev/dsk/c0t1d0
4. Verify the LVM was updated:
#lvlnboot –v
BREAKING A MIRROR FOR BACKUP PURPOSES
Mirrors are created and broken from an lvol level. Remember this. If you want to break the mirror for /dev/vg00/lvol1 which may be mounted at / do the following:
#lvsplit /dev/vg00/lvol1
This will by default create a
new, unmounted lvol called lvol1b. You could also do the following:
#lvsplit –s backup /dev/vg00/lvol1
This does the same, but names it lvol1backup
Mount the new lvol to what ever you want, and back it up.
REMIRRORING AFTER BACKUP
After you are finished, you must remirror and sync with existing and new data created on The active mirror. Use this command (using the lvol1b from example above):
#lvmerge /dev/vg00/lvolb /dev/vg00/lvol1
REMOVING A MIRROR (SO YOU CAN PULL A DRIVE)
1. You must first remove the association between each lvol associated with the drive. Use the following command to view the current mirrored lvol’s:
#lvlnboot –v
2. Break the mirror and remove the pv/lvol association for each lvol.
This example removes PV /dev/dsk/c1t0d0 from /dev/vg00/lvol2, and lvol3. Assuming that there was only 1 other disk in the mirror set:
#lvreduce –m 0 /dev/vg00/lvol2 /dev/dsk/c1t0d0
#lvreduce –m 0 /dev/vg00/lvol3 /dev/dsk/c1t0d0
0 Comment to "MIRRORING ROOT VOLUME in HP-UX"
Post a Comment