免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: mcgraw
打印 上一主题 下一主题

如何扩/opt??? [复制链接]

论坛徽章:
0
21 [报告]
发表于 2003-09-28 11:32 |只看该作者

如何扩/opt???

只要进入单用户,除了/ 和swap不能扩,其它lvol都可以扩

论坛徽章:
0
22 [报告]
发表于 2003-09-28 19:44 |只看该作者

如何扩/opt???

那/ 怎么扩呢?

论坛徽章:
0
23 [报告]
发表于 2003-09-29 08:39 |只看该作者

如何扩/opt???

1.make_recovery磁带重装时修改
2.在HP USA有个大名鼎鼎的Eric写了个cookbook,有介绍。可惜HP internal use only。

论坛徽章:
0
24 [报告]
发表于 2003-09-29 09:10 |只看该作者

如何扩/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

论坛徽章:
0
25 [报告]
发表于 2003-09-29 09:13 |只看该作者

如何扩/opt???

This subprocedure installs/updates information on disk that is mandatory for boot support.
Therefore it is referenced from several other parts of this chapter.
1. Write LIF header and LIF files (ISL, AUTO, HPUX, LABEL):
# mkboot -l /dev/rdsk/cXtXdX
# lifls –l /dev/rdsk/cXtXdX (to ckeck it)
2. Write content of AUTO File: (if autoboot is desired)
# mkboot -a hpux /dev/rdsk/cXtXdX (autoboot with qurom enforced)
# mkboot -a ’hpux –lq’ /dev/rdsk/cXtXdX (autoboot without qurom enforced)
# lifcp /dev/rdsk/cXtXdX:AUTO - (to ckeck it)
NOTE: By default, LVM enforces a quorum of >;50% of a VG’s PVs being available at activation
time. If e.g. the root VG contains 2 PVs, then the system rejects to boot unless you disable the
quorum check using the –lq option.
3. Install ODE files (may be skipped):
# cd /usr/sbin/diag/lif
# getconf HW_CPU_SUPP_BITS (the result is either 32, 32/64 or 64)
# mkboot -b updatediaglif -p ISL -p AUTO -p HPUX -p LABEL
/dev/rdsk/cXtXdX (if 32 or 32/64)
# mkboot -b updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL
/dev/rdsk/cXtXdX (if 64)
(the -p option preserve the specified file so that it is not overwritten in LIF)
Refer to section Offline Diagnostics (ODE) if you have problems with this.
4. Write content of LABEL file, i.e set root, boot, swap and dump device:
NOTE:This step can be omitted if you replace a failed mirror disk. Then this information has already
been restored by vgcfgrestore. To be sure to have the latest information on the disk just do the
following steps.
# lvlnboot -r /dev/<rootVG>;/lvol3
# lvlnboot -b /dev/<rootVG>;/lvol1
# lvlnboot -s /dev/<rootVG>;/lvol2
# lvlnboot -d /dev/<rootVG>;/lvol2
# lvlnboot –v (to ckeck it)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP