• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

如何扩/opt???

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 21次 | 进入软件测试论坛讨论

领测软件测试网
我发现/opt满了,我可以帮它增加容量嘛?怎么做?

 水平低 回复于:2003-09-24 09:24:36
首先VI /ETC/FSTAB 将OPT先摘掉,然后使用LVEXPORT即可!

 wdbj 回复于:2003-09-24 09:28:30
[quote:70262bd5ca="水平低"]首先VI /ETC/FSTAB 将OPT先摘掉,然后使用LVEXPORT即可![/quote:70262bd5ca]     

跟fstab没关系,直接umount /opt就可以;另外,命令是lvextend,不是export

 mcgraw 回复于:2003-09-24 09:36:42
不能umount /opt,提示说device busy,怎么办?

 wdbj 回复于:2003-09-24 09:45:38
把应用都停掉,然后fuser -ku /dev/vg00/lvol?,再试   
其中?是opt对应的逻辑卷号

 hpux 回复于:2003-09-24 09:47:22
启动到单用户再umount /opt,然后按正常方法扩文件系统即可!
注意主要用lvextend/extendfs,注意别用newfs啊。

 mcgraw 回复于:2003-09-24 09:53:47
我umount后,用sam扩好了,还要执行mount /opt嘛 ?

 wdbj 回复于:2003-09-24 09:55:09


 mcgraw 回复于:2003-09-24 09:58:50
可是我执行mount /opt后,有提示:
xfs mount: /dev/vg00/lvol6 is already mounted, /opt is busy,
        or allowable number of mount points exceeded

???怎么拉?

 mcgraw 回复于:2003-09-24 10:01:00
我没有在single user mode下进行的,而且我发现opt的东西都没了。。。。。

 mcgraw 回复于:2003-09-24 10:03:02
好拉,我sync后在mount opt就可以了,谢谢各位。
不过我还想问,不在单用户下做这些动作,安全嘛?

 hpux 回复于:2003-09-24 10:16:46
进入单用户扩/opt只是为了能确保没有应用程序在使用/opt,能umount!如果能在多用户umount /opt,那也没有问题。

 mcgraw 回复于:2003-09-24 10:25:47
为什么同样的步骤想扩/usr,不行的?
我不能umount,即使执行了fuser也不行

 wdbj 回复于:2003-09-24 10:31:12
/usr 不能这样做,必须进单用户做

 mcgraw 回复于:2003-09-24 10:35:34
那/tmp也不行罗?

 mcgraw 回复于:2003-09-24 11:30:02
为什么usr不能像opt那样在普通模式下扩?

 flysnowpp 回复于:2003-09-24 20:58:36
系统启动的很多后台进程都是/usr下面的,你不可能把那些进程都停掉的。
[quote:020827c45d="mcgraw"]为什么usr不能像opt那样在普通模式下扩?[/quote:020827c45d]

 day_dream 回复于:2003-09-27 16:31:54
各位老大,看了楼主的问题,联想到/tmp,这个在单用户好像也不是那么简单的扩吧,谁可以详细步骤解释啊

 wiseking 回复于:2003-09-27 16:39:49
/tmp可以的,我就在多用户下做过

 hpux 回复于:2003-09-27 16:41:11
是的,/tmp有可能可以!

 inHP 回复于:2003-09-28 11:32:17
只要进入单用户,除了/ 和swap不能扩,其它lvol都可以扩

 day_dream 回复于:2003-09-28 19:44:58
那/ 怎么扩呢?

 inHP 回复于:2003-09-29 08:39:22
1.make_recovery磁带重装时修改
2.在HP USA有个大名鼎鼎的Eric写了个cookbook,有介绍。可惜HP internal use only。

 hpux 回复于:2003-09-29 09:10:54
不用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

 hpux 回复于:2003-09-29 09:13:09
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)

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网