 |
Welcome, James R. Ferguson! (CA114842) |
|
|
| |
 |
| Score |
: 48 |
| Document Type |
: EN |
| Date |
: 2001 Jun 22 |
| Description |
: Migrating Root Volume Group to new disk(s). |
| Document Id |
: LVMKBRC00007285 |
| Search String |
: /stand and increase and JFS |
You may provide
feedback on this document
View the printer
friendly version of this document
Migrating Root Volume Group to new disk(s).
| DocId: |
LVMKBRC00007285 |
|
Updated: |
6/22/01 5:33:00 AM |
PROBLEMHow can a second copy of my existing root volume group be created, so that
larger logical volumes are created, while maintaining all of the current
configuations? What are the steps?
RESOLUTION Migrating to New Root Disk with /stand on It's Own Logical Volume
*************************************************************************
This document is a quick reference to migrating to a new root disk/VG with
/stand broken out on it's own Logical Volume. It is intended for HP-UX
series 9000 system administrators running HP-UX version 10.20 and above.
1) Prepare Disk for LVM: pvcreate -B /dev/rdsk/c0t6d0
2) Create Volume Group:
a. Make directory for Volume Group: mkdir /dev/vgroot
b. Make Volume Group group file: mknod /dev/vgroot/group c 64 0x010000
NOTE: The minor number, 0x010000 in this case, must be unique.
Use ll /dev/*/group to check minor numbers currently in use.
c. Create Volume Group: vgcreate /dev/vgroot /dev/dsk/c0t6d0
3) Activate Volume Group: vgchange -a y /dev/vgroot
4) Add LIF Area to Disk: mkboot /dev/rdsk/c0t6d0
5) Add AUTO File to LIF:
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c0t6d0
6) Create Logical Volumes:
lvcreate -L 48 -C y -r n -n stand /dev/vgroot
lvcreate -L 100 -C y -r n -n swap /dev/vgroot
lvcreate -L 84 -C y -r n -n root /dev/vgroot
lvcreate -L 200 -n usr /dev/vgroot
lvcreate -L 300 -n var /dev/vgroot
lvcreate -L 60 -n opt /dev/vgroot
lvcreate -L 100 -n tmp /dev/vgroot
.... (one lvcreate command for each existing logical volume)
NOTE: The order of the Logical Volumes is important. /stand's Logical
Volume must be extended first, followed by primary swap and the
Logical Volume for /. The order of the remaining Logical Volumes
does not matter. Use pvdisplay -v, under "Distribution of
physical volume section, to determine the Logical Volume order on the
the original root disk.
The size of any of the volumes can be increased or decreased when doing
the above lvcreates. The -L argument to lvcreate(1m) is
is used to specify the size in Mb.
7) Create filesystems and Copy Data to Appropriate Logical Volumes:
a.) Use newfs on each logical volume.
NOTE: filesystem for /stand must be an HFS filesystem. All others can be
either HFS or JFS(vxfs).
newfs -F hfs /dev/vgroot/rstand
newfs -F vxfs /dev/vgroot/rroot
newfs -F vxfs /dev/vgroot/rusr
newfs -F vxfs /dev/vgroot/rtmp
newfs -F vxfs /dev/vgroot/rhome
newfs -F vxfs /dev/vgroot/rtmp
newfs -F vxfs /dev/vgroot/rvar
.... (one newfs command for each logical volume)
b.) Copy Data for each logical volume.
mkdir /newroot
mount /dev/vgroot/root /newroot
cd /;find / -xdev -print | cpio -pdmvux /newroot
mount /dev/vgroot/stand /newroot/stand
cd /stand;find . -xdev -print | cpio -pdmvux /newroot/stand
NOTE: If existing root disk does not have /stand on it's own Logical Volume
do only one cpio command after mounting both the / and /stand Logical
Volumes.
mount /dev/vgroot/usr /newroot/usr
cd /usr;find . -xdev -print | cpio -pdmvux /newroot/usr
mount /dev/vgroot/var /newroot/var
cd /var;find . -xdev -print | cpio -pdmvux /newroot/var
mount /dev/vgroot/opt /newroot/opt
cd /opt;find . -xdev -print | cpio -pdmvux /newroot/opt
mount /dev/vgroot/tmp /newroot/tmp
cd /tmp;find . -xdev -print | cpio -pdmvux /newroot/tmp
mount /dev/vgroot/home /newroot/home
cd /home;find . -xdev -print | cpio -pdmvux /newroot/home
Include each logical volume in the root VG........
8) Edit /newroot/etc/fstab to mount /dev/newroot Logical volumes to /, /home,
/var etc..
Example: Change the /newroot/etc/fstab from:
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
To:
/dev/vgroot/root / vxfs delaylog 0 1
/dev/vgroot/stand /stand hfs defaults 0 1
/dev/vgroot/tmp /tmp vxfs delaylog 0 2
/dev/vgroot/home /home vxfs delaylog 0 2
/dev/vgroot/opt /opt vxfs delaylog 0 2
/dev/vgroot/usr /usr vxfs delaylog 0 2
/dev/vgroot/var /var vxfs delaylog 0 2
9) Update Boot Data Reserve Area.
lvlnboot -b /dev/vgroot/stand /dev/vgroot
lvlnboot -r /dev/vgroot/root /dev/vgroot
lvlnboot -s /dev/vgroot/swap /dev/vgroot
lvlnboot -d /dev/vgroot/dump /dev/vgroot
NOTE: lvlnboot -d is not required. If no Dump Device is specified then
it will default to the Primary Swap Device specified by lvlnboot -s.
10) Correct the /newroot/stand/bootconf to contain the new boot device file.
Example: Change /newroot/stand/bootconf from:
l /dev/dsk/c0t6d0
To:
l /dev/dsk/c2t5d0
11) Resyncronize the Boot Data Reserved Area
lvlnboot -R /dev/vgroot
12) Boot from new Disk
a. reboot
b. Interrupt Boot Sequence
c. Boot From Hardware Path of New Boot Drive
Use lssf /dev/dsk/c0t6d0 to get Hardware Path before reboot if
needed.
NOTE: Interacting with ISL should not be required. The exact steps for
the above will vary depending on your computer model. Consult your
Owners Manual for details. This process assumes that you have obtained
the hardware path for the mirrored boot drive using ioscan or lssf
commands.
If any problems are encountered when booting from the new boot disk, then
boot from the original root disk and troubleshoot from there. This procedure
makes no changes to the original root volume group.
For additional information see the appropriate manpage.
example: man 1m pvcreate.
More information about LVM and other LVM procedures are available in the
HP-UX System Administration Tasks manual. man manuals will give you
ordering information and part numbers.
Most HP documentation is available online at "http://www.docs.hp.com".
ALT KEYWORDSmigrate,root,Volume Group,Increase,lvcreate,newfs,cpio,VG
| You may provide feedback
here |
|