互联网服务hdiskvg

向vg 里加 hdisk 时报错,解决如下

If you want to add one disk into one vg:----some error occuer:Below error occur:                                        ...显示全部
If you want to add one disk into one vg:----some error occuer:

Below error occur:
                                        COMMAND STATUS

Command: failed        stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

0516-1398 /usr/sbin/mkvg: The physical volume hdisk3, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-862 /usr/sbin/mkvg: Unable to create volume group.

------------------

Let us look at the create details:

root@a05scpgapp01/>smit mkvg

                                 Add an Original Volume Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                                        [Entry Fields]
  VOLUME GROUP name                                  [testvg]
  Physical partition SIZE in megabytes                16                                   +
* PHYSICAL VOLUME names                              [hdisk3]                              +
  FORCE the creation of volume group?                 no                                   +
  Activate volume group AUTOMATICALLY                 yes                                  +
    at system restart?
  Volume group MAJOR NUMBER                          []                                    +#
  Create VG Concurrent Capable?                       no                                   +
         

-------------------

Reason:

Even we see below information:

root@a05scpgapp01/>lspv
hdisk0          00cde24bb3a0905a                    rootvg          active
hdisk1          00cde24bb3db10ec                    rootvg          active
hdisk2          00cde24ba37763ef                    datavg          active
hdisk3          00cde24b4aba3171                    None

we just exportvg testvg which conlude hdisk3,

we do not reducevg testvg hdisk3,

root@a05scpgapp01/>lsvg
rootvg
datavg

-----------

root@a05scpgapp01/>importvg -y testvg hdisk3
synclvodm: No logical volumes in volume group testvg.
testvg
root@a05scpgapp01/>lspv
hdisk0          00cde24bb3a0905a                    rootvg          active
hdisk1          00cde24bb3db10ec                    rootvg          active
hdisk2          00cde24ba37763ef                    datavg          active
hdisk3          00cde24b4aba3171                    testvg          active

-----------

If we do like this:

root@a05scpgapp01/>reducevg testvg hdisk3
ldeletepv: Volume Group deleted since it contains no physical volumes.
root@a05scpgapp01/>smit mkvg

                                 Add an Original Volume Group

Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                                        [Entry Fields]
  VOLUME GROUP name                                  [t_vg]
  Physical partition SIZE in megabytes                16                                   +
* PHYSICAL VOLUME names                              [hdisk3]                              +
  FORCE the creation of volume group?                 no                                   +
  Activate volume group AUTOMATICALLY                 yes                                  +
    at system restart?
  Volume group MAJOR NUMBER                          []                                    +#
  Create VG Concurrent Capable?                       no                                   +

----------

                                        COMMAND STATUS

Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

t_vg

----------

IF we do not the reason, let us simulate the case:

root@a05scpgapp01/>lspv
hdisk0          00cde24bb3a0905a                    rootvg          active
hdisk1          00cde24bb3db10ec                    rootvg          active
hdisk2          00cde24ba37763ef                    datavg          active
hdisk3          00cde24b4aba3171                    t_vg            active
root@a05scpgapp01/>exportvg t_vg
0516-764 exportvg: The volume group must be varied off
        before exporting.
root@a05scpgapp01/>lsvg
t_vg
rootvg
datavg
root@a05scpgapp01/>varyoffvg t_vg
root@a05scpgapp01/>lspv
hdisk0          00cde24bb3a0905a                    rootvg          active
hdisk1          00cde24bb3db10ec                    rootvg          active
hdisk2          00cde24ba37763ef                    datavg          active
hdisk3          00cde24b4aba3171                    t_vg           
root@a05scpgapp01/>exportvg t_vg
root@a05scpgapp01/>lspv
hdisk0          00cde24bb3a0905a                    rootvg          active
hdisk1          00cde24bb3db10ec                    rootvg          active
hdisk2          00cde24ba37763ef                    datavg          active
hdisk3          00cde24b4aba3171                    None

--------------

The solution is create the vg by force:

                                 Add an Original Volume Group

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

                                                        [Entry Fields]
  VOLUME GROUP name                                  [tt_vg]
  Physical partition SIZE in megabytes                16                                   +
* PHYSICAL VOLUME names                              [hdisk3]                              +
  FORCE the creation of volume group?                  yes                                 +
  Activate volume group AUTOMATICALLY                 yes                                  +
    at system restart?
  Volume group MAJOR NUMBER                          []                                    +#
  Create VG Concurrent Capable?                       no                                   +


------------------

                                        COMMAND STATUS

Command: OK            stdout: yes           stderr: no

Before command completion, additional instructions may appear below.

tt_vg收起
参与5

查看其它 3 个回答yuqingde的回答

yuqingdeyuqingde软件开发工程师qhdyj
好好学习 天天向上
互联网服务 · 2013-11-18
浏览1977

回答者

yuqingde
软件开发工程师qhdyj

yuqingde 最近回答过的问题

回答状态

  • 发布时间:2013-11-18
  • 关注会员:1 人
  • 回答浏览:1977
  • X社区推广