HPUX 11.31 LVM VG 增加Max PV 方法之一

场景:有一个文件系统空间不足,需要扩容空间,准备工作中发现,文件系统对应LV所在VG 的"Free PE" 值是0,VG已经没有空间了,因此要先扩容VG,再扩容LV,但是扩容VG发现“MAX PV”已经到达限制了再增加PV,必需要先增加“MAX PV”具体信息如下:

#vgdisplay /dev/datavg

--- Volume groups ---

VG Name                     /dev/datavg

VG Write Access             read/write

VG Status                   available

Max LV                      255

Cur LV                      1

Open LV                     1

Max PV                      20

Cur PV                      20

Act PV                      20

Max PE per PV               42000

VGDA                        40

PE Size (Mbytes)            256

Total PE                    40580

Alloc PE                    40580

Free PE                     0

Total PVG                   0

Total Spare PVs             0

Total Spare PVs in use      0

VG Version                  1.0

VG Max Size                 210000g

VG Max Extents              840000

发现这个VG是用1.0的版本,因此有两个办法解决这个问题,一种是通过vgmodify 来修改“MAX PV”,另一种是升级VG 1.0到期2.0,这里主要介绍VG 1.0如何升级到2.0.

升级前准备:

  1. 从VG1.0 升级到2.0 要去将datavg去激活,所在只要涉及到这个VG的业务,都需要停下来;
  2. 备份datavg相关配置信息;最好是备份VG所涉及文件系统所有数据,以防万一

vgexport -p -v -s -m datavg.map /dev/datavg

vgcfgbackup /dev/datavg

升级实施:

先去挂载datavg相关的所有文件系统,然后执行;

#vgchange -a n /dev/datavg

Volume group "/dev/datavg" has been successfully changed.

#vgversion -V 2.0 /dev/datavg

Performing "vgchange -a y -l -p -s /dev/datavg" to collect data

Activated volume group.

Volume group "/dev/datavg" has been successfully activated.

Warning: Volume Group version 2.0 does not support bad block

relocation. The bad block relocation policy of all logical volumes

will be set to NONE.

Old Volume Group configuration for "/dev/datavg" has been saved in "/etc/lvmconf/vgversion_datavg/datavg_1.0.conf"

Deactivating Volume Group "/dev/datavg"

Volume group "/dev/datavg" has been successfully deactivated.

New Volume Group configuration for "/dev/datavg" has been saved in "/etc/lvmconf/vgversion_datavg/datavg_2.0.conf"

Removing the Volume Group /dev/datavg from /etc/lvmtab

Applying the configuration to all Physical Volumes from "/etc/lvmconf/vgversion_datavg/datavg_2.0.conf"

Volume Group configuration has been restored to /dev/rdisk/disk44

Volume Group configuration has been restored to /dev/rdisk/disk43

Volume Group configuration has been restored to /dev/rdisk/disk42

Volume Group configuration has been restored to /dev/rdisk/disk41

Volume Group configuration has been restored to /dev/rdisk/disk40

Volume Group configuration has been restored to /dev/rdisk/disk39

Volume Group configuration has been restored to /dev/rdisk/disk38

Volume Group configuration has been restored to /dev/rdisk/disk37

Volume Group configuration has been restored to /dev/rdisk/disk36

Volume Group configuration has been restored to /dev/rdisk/disk35

Volume Group configuration has been restored to /dev/rdisk/disk34

Volume Group configuration has been restored to /dev/rdisk/disk33

Volume Group configuration has been restored to /dev/rdisk/disk32

Volume Group configuration has been restored to /dev/rdisk/disk31

Volume Group configuration has been restored to /dev/rdisk/disk30

Volume Group configuration has been restored to /dev/rdisk/disk29

Volume Group configuration has been restored to /dev/rdisk/disk28

Volume Group configuration has been restored to /dev/rdisk/disk27

Volume Group configuration has been restored to /dev/rdisk/disk26

Volume Group configuration has been restored to /dev/rdisk/disk25

Creating the Volume Group of version 2.0 with minor number 0x1000.

Adding the Volume Group /dev/datavg to /etc/lvmtab_p

Original Volume Group Version was 1.0

New Volume Group Version is 2.0

Volume Group version has been successfully changed to 2.0

Volume Group configuration for /dev/datavg has been saved in /etc/lvmconf/datavg.conf

##vgchange -a y /dev/datavg

Activated volume group.

Volume group "/dev/datavg" has been successfully changed.

#vgdisplay /dev/datavg

--- Volume groups ---

VG Name                     /dev/datavg

VG Write Access             read/write

VG Status                   available

Max LV                      511

Cur LV                      1

Open LV                     1

Max PV                      511

Cur PV                      20

Act PV                      20

Max PE per PV               65536

VGDA                        40

PE Size (Mbytes)            256

Total PE                    40580

Alloc PE                    40580

Free PE                     0

Total PVG                   0

Total Spare PVs             0

Total Spare PVs in use      0

VG Version                  2.0

VG Max Size                 210000g

VG Max Extents              840000

此时就成功的增加了Max PV的值到511了。

时间: 2024-10-28 21:47:46

HPUX 11.31 LVM VG 增加Max PV 方法之一的相关文章

HP-UX 11.31双根盘故障案例分析

环境描述: Superdome SX2000服务器一台(HPUX 11.23系统),外接MSA60根盘柜,两块根盘,磁盘设备文件名分别为:c2t3d0,c3t3d0(PV Link);c2t4d0,c3t4d0(pv link). 故障描述: 其中一块根盘c2t3d0在event log中报mdeia error,正常更换根盘后,发现lvlnboot信息无法更新(lvlnboot信息不正确,重启或宕机后机器可能会无法启动). 分析过程描述: 在更换根盘前,vgdisplay -v vg00 的输

HPUX 11.31 MC/SG恢复丢失的锁盘

有时候由于一些特殊的原因,用户的cluster中的锁盘信息丢失,或者需要更换锁盘,只要执行一个命令就可以了. #cmdisklock reset /dev/vglock:/dev/disk/diskX vglock请以实际使用的锁盘所在的VG名称替换. X请用实际使用的盘号替代.

LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while)

LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while) 2015-09-04 11:28:01 分类: Linux LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while) 给某个硬盘增加分区之后 [[email protected]-213-66 ~]# df -h Filesystem Size Used Avail Use% Mounted

11.28 限定某个目录禁止解析php;11.29 限制user_agent;11.30,11.31 php相关配置(上下)

扩展: apache开启压缩  http://www.aminglinux.com/bbs/thread-5528-1-1.html apache2.2到2.4配置文件变更  http://www.aminglinux.com/bbs/thread-7292-1-1.html apache options参数  http://www.aminglinux.com/bbs/thread-1051-1-1.html apache禁止trace或track防止xss  http://www.aming

从VG中去除PV unknown device

LVM分区中查看PV时,出现如下错误: # pvscan Couldn't find device with uuid ......... PV   /dev/sda2                  VG  VolGroup00    lvm2 [17.99GB/0  free] PV   unknown device        VG  VolGroup00    lvm2[2.21GB/2.21GB] 解决方法:从VG中去除PV unknown device 采用 vgreduce -

11.28 限定某个目录禁止解析php 11.29 限制user_agent 11.30/11.31

11.28 限定某个目录禁止解析php 核心配置文件内容<Directory /data/wwwroot/www.123.com/upload>php_admin_flag engine off</Directory>curl测试时直接返回了php源代码,并未解析 curl -x127.0.0.1:80 'http://123.com/upload/123.php' 11.29 限制user_agent user_agent可以理解为浏览器标识核心配置文件内容<IfModul

增加、删除类文件或者在一个类中增加、删除方法时,是不能够热部署到服务上的。这时候需要停止服务器重新部署后再启动,就不会出现上面的提示了。

Hot Code Replace Failed 2010-11-05 10:11listquiry | 浏览 14226 次 Some code changes cannot be hot swapped into a running virtual machine, such as changing method names or introducing errors into running code.The current target virtual machine {jboss4Ser

OSX 10.11 El Caption USB安装盘制作方法

OSX 10.11 El Caption USB安装盘制作方法 官方在线下载地址:https://developer.apple.com/osx/download/ 1. 用磁盘工具将USB盘抹掉或者创建一个分区,分区大小至少8GB 名称为『Caption』 格式为『Mac OS 扩展(日正式)』 2. 假设下载好安装文件,在/Applications目录里,执行下面这条命令即可: $ sudo /Applications/Install\ OS\ X\ 10.11\ Developer\ Be

Linux下增加swap的方法

起因是今天一台服务器ssh突然没有反应,通过阿里云的终端才发现swap一直提示为0KB 通过命令 [[email protected]_product ~]# free -m total used free shared buffers cached Mem: 3959 3178 780 0 226 2150 -/+ buffers/cache: 800 3158 Swap: 0 0 0 才发现swap根本就没有设置 于是看了下别人增加swap的方法.原文:http://blog.chinaun