- 论坛徽章:
- 0
|
如何扩/opt???
不用Ignite-UX模式的步骤:
Since the root LV has to be contiguous it is not possible to increase it because it is not the last LV on the root disk. Anyway - it is possible to do it without using Ignite-UX if there is an additional free disk available - c1t1d0 in the following example:
1. Create a new VG vgroot with c1t1d0:
# pvcreate -B /dev/rdsk/c1t1d0 (don’t forget the –B option!)
# mkdir /dev/vgroot
# ll /dev/*/group (check for unused minor number)
# mknod /dev/vgroot/group c 64 0x010000
# vgcreate vgroot /dev/dsk/c1t1d0
2. Create LVs for boot, swap and root (in that order). Use at least the same size as in your original root VG:
# lvcreate -C y -r n vgroot
# lvextend -L 100 /dev/vgroot/lvol1 (e.g. 100 MB for /stand)
# lvcreate -C y -r n vgroot
# lvextend -L 512 /dev/vgroot/lvol2 (e.g. 512 MB pri. swap)
# lvcreate -C y -r n vgroot
# lvextend -L 200 /dev/vgroot/lvol3 (e.g. 200 MB for /)
3. Configure LIF and BDRA on c1t1d0. (后面会再详细说明)
4. Create LVs for /usr, /opt, /var, /tmp, /etc, /home, etc. Use at least the same size
as in your original root VG:
# lvcreate vgroot
# lvextend -L 500 /dev/vgroot/lvol4
...
5. Create the file systems:
# newfs -F hfs /dev/vgroot/rlvol1
# newfs -F vxfs /dev/vgroot/rlvol3
# newfs -F vxfs /dev/vgroot/rlvol4
...
6. Mount the file systems:
# mkdir /new_root /new_usr /new_stand … (Create mount points)
# mount /dev/vgroot/lvol1 /new_stand
# mount /dev/vgroot/lvol3 /new_root
# mount /dev/vgroot/lvol4 /new_usr
...
7. Copy the data, e.g. using find(1) with cpio(1):
# cd /
# find . -xdev -depth | cpio -pvdlmax /new_root
# cd /stand
# find . -xdev -depth | cpio -pvdlmax /new_stand
# cd /usr
# find . -xdev -depth | cpio -pvdlmax /new_usr
...
8. Modify the fstab in /new_root/etc. Replace occurences of vg00 with vgroot:
# vi /new_root/etc/fstab
/dev/vgroot/lvol1 /stand hfs defaults 0 0 (new boot LV)
/dev/vgroot/lvol3 / vxfs delaylog 0 0 (new root LV)
/dev/vgroot/lvol4 /usr vxfs delaylog 0 0 (new /usr LV)
9. Change the device files for the root disk in /stand/bootconf to c1t1d0:
# vi /stand/bootconf
l /dev/dsk/c1t1d0
10. Configure disk c1t1d0 as boot path in stable storage and boot from it:
# setboot -b <HW path of c1t1d0>;
# shutdown -r 0
11. When the system comes up again, backup vgroot’s LVM Configuration:
# vgcfgbackup vgroot
12. And finally remove the old root VG if desired:
# vgchange -a n vg00
# vgexport vg00
If you like to rename vgroot to vg00:
1. Boot to LVM maintenance mode:
ISL>; hpux –lm
2. Export vgroot and import it as vg00:
# vgexport vgroot
# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0x000000 (we import vg00 with minor 0)
# vgimport vg00 /dev/dsk/c1t1d0
3. Activate vg00 and mount the files ystems:
# vgchange -a y vg00
# mount /dev/vg00/lvol3 /
# mount /dev/vg00/lvol1 /stand
# mount /dev/vg00/lvol4 /usr
...
4. Modify the fstab. Replace vgroot with vg00 again:
# vi /etc/fstab
5. Reboot:
# shutdown -r 0 |
|