免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4691 | 回复: 8
打印 上一主题 下一主题

[新手入门] 请问如何删除rootvg中的hdisk1 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-29 21:42 |只看该作者 |倒序浏览
本帖最后由 juming1983 于 2010-03-29 23:36 编辑

我有一台B50,有两个硬盘,
root@ibmb50:/>lspv
hdisk0          000d871d0005dd01                    rootvg          active
hdisk1          000d871d0014be46                    rootvg          active

我想删除rootvg中的hdisk1,但failed,请问各位大大该如何解决。
root@ibmb50:/>smit reducevg

Remove a Physical Volume from a Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
                                                        [Entry Fields]
* VOLUME GROUP name                                   rootvg
* PHYSICAL VOLUME names                              [hdisk1]                +
  FORCE deallocation of all partitions on             no                     +
    this physical volume?

Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
0516-016 ldeletepv: Cannot delete physical volume with allocated
        partitions. Use either migratepv to move the partitions or
        reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk1.
----------------------------------------------------------------------
root@ibmb50:/>reducevg -d rootvg hdisk1
0516-914 rmlv: Warning, all data belonging to logical volume
        hd9var on physical volume hdisk1 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
0516-1008 rmlv: Logical volume hd9var must be closed.  If the logical
        volume contains a filesystem, the umount command will close
        the LV device.
0516-884 reducevg: Unable to remove physical volume hdisk1.
root@ibmb50:/>lspv -l hdisk1
hdisk1:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
hd3                   93    93    00..00..09..84..00    /tmp
hd9var                1     1     00..00..01..00..00    /var
hd1                   8     8     00..05..00..03..00    /home

--------------------------------------------------------------
解决方案:

将hdisk1的数据复制到hdisk0

Move Contents of a Physical Volume

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
* SOURCE physical volume name                         hdisk0
* DESTINATION physical volumes                       [hdisk1]                +
  Move only data belonging to this                   []                      +
    LOGICAL VOLUME?

Remove a Physical Volume from a Volume Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                                                        [Entry Fields]
* VOLUME GROUP name                                   rootvg
* PHYSICAL VOLUME names                              [hdis10]                +
  FORCE deallocation of all partitions on             no                     +
    this physical volume?

root@ibmb50:/>lspv
hdisk0          000d871d0005dd01                    rootvg          active
hdisk1          000d871d0014be46                    None

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2010-03-29 23:05 |只看该作者
hdisk1上有lv的lp存在,所以不能reducevg

论坛徽章:
0
3 [报告]
发表于 2010-03-30 09:15 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
4 [报告]
发表于 2010-03-31 14:04 |只看该作者
不要执着的寻找如何删除hdisk1的方法,首先确定这种解决方案是否可行?
1. hdisk0和hdisk1之间是什么关系,Mirror ?如果是mirror,需要先拆除mirror之后再reduce再删除。
2. hdisk0和hdisk1之间如果不是mirror关系,确认hdisk1上是否有LV,尤其是系统LV。根据情况再到底在确定是否需要做LV迁移。需要确认确保系统不被crash能否这么做。

论坛徽章:
0
5 [报告]
发表于 2010-03-31 14:10 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
6 [报告]
发表于 2010-04-04 11:10 |只看该作者
lsvg -l rootvg 是否有mirror(hdisk0和hdisk1),有的话先卸载mirror,如果没有的话,看hdisk1里是否有lv还在,有的话umount掉,再做reducevg rootvg hdisk1,做以上这些工作时,要做好备份。

论坛徽章:
0
7 [报告]
发表于 2010-04-04 11:38 |只看该作者
root@ibmb50:/>lspv -l hdisk1
hdisk1:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
hd3                   93    93    00..00..09..84..00    /tmp
hd9var                1     1     00..00..01..00..00    /var
hd1                   8     8     00..05..00..03..00    /home

#migratepv -l hd3 hdisk1 hdisk0
#migratepv -l hd9var hdisk1 hdisk0
#migratepv -l hd1 hdisk1 hdisk0

论坛徽章:
0
8 [报告]
发表于 2010-04-04 11:39 |只看该作者
then
#reducevg rootvg hdisk1

论坛徽章:
0
9 [报告]
发表于 2010-04-15 21:24 |只看该作者
楼上正解,环境复杂,要理解原理才能动手,做好备份,选择维护时间做维护,小心不容易出大乱
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP