Solaris2.6+Sun cluster2.2+Vxvm2.6下的逻辑卷扩卷

硬件环境:
N1145+D1000
软件环境:
solaris2.6+sun cluster2.2+vxvm2.6+informix

1、操作准备:
1)确认需扩容的磁盘空间目前大小
# vxprint -ht lvrbs
Disk group: datadg
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
v lvrbs fsgen ENABLED ACTIVE 10240000 SELECT - (raid0+1大小为5G)
pl lvrbs-01 lvrbs ENABLED ACTIVE 10248840 STRIPE 3/128 RW
sd datadg01-03 lvrbs-01 datadg01 4099440 3416200 0/0 c1t9d0 ENA
sd datadg02-03 lvrbs-01 datadg02 4099440 3416200 1/0 c1t10d0 ENA
sd datadg03-03 lvrbs-01 datadg03 4099440 3416200 2/0 c1t11d0 ENA
pl lvrbs-02 lvrbs ENABLED ACTIVE 10248840 STRIPE 3/128 RW
sd datadg04-03 lvrbs-02 datadg04 4099440 3416200 0/0 c2t9d0 ENA
sd datadg05-03 lvrbs-02 datadg05 4099440 3416200 1/0 c2t10d0 ENA
sd datadg06-03 lvrbs-02 datadg06 4099440 3416200 2/0 c2t11d0 ENA


2) 察看到这个datadg里每个磁盘的剩余大小
# vxdg -g datadg free
DISK DEVICE TAG OFFSET LENGTH FLAGS
datadg01 c1t9d0s2 c1t9d0 34265664 1097896 -
datadg02 c1t10d0s2 c1t10d0 34265664 1097896 -
datadg03 c1t11d0s2 c1t11d0 34265664 1097896 -
datadg04 c2t9d0s2 c2t9d0 34265664 1097896 -
datadg05 c2t10d0s2 c2t10d0 34265664 1097896 -
datadg06 c2t11d0s2 c2t11d0 34265664 1097896 -
datadg07 c1t12d0s2 c1t12d0 27329600 8033960 -
datadg08 c1t13d0s2 c1t13d0 27329600 8033960 -
datadg09 c1t14d0s2 c1t14d0 27329600 8033960 -
datadg10 c2t12d0s2 c2t12d0 6832400 28531160 -
datadg11 c2t13d0s2 c2t13d0 6832400 28531160 -
datadg12 c2t14d0s2 c2t14d0 6832400 28531160 -

3) 察看单个卷的大小可以扩到多大,只要不超过这个范围就可以:
# vxassist -g datadg maxgrow lvrbs
Volume lvrbs can be extended by 27402240 to 37642240 (18380Mb)

2、具体扩卷过程
1) Backing up database
# su – datasys
% su informix
% ontape –s –L 0
% exit; exit
2) Shutting down data subsystem and cluster
# hareg –n dataserv
3) Checking file system:
# df –k
The following string must be absent
/dev/vx/dsk/datadg/lvdata
4128430 2646606 1440540 65% /data
If it present, done:
# umount /data

2.1.使用磁带机备份所要扩的卷数据,请根据实际情况参考下面内容来做,确认双机业务运行正常,所有数据服务是On(用hastat察看),双机也能正常起停应用和切换,无误后继续以下操作;还有要考虑的就是现在双机运行情况是否正常,双机切换是否正常,ufsdump的操作一般是要停止I/O操作的,特别是ufsrestore.如果不停业务,这个卷上还是有I/O读写的,这样可能造成无效备份.但是如果双机有问题(假如停掉业务拉不起来),又没有做好备份,就会有一定风险,所以最好是检查双机运行情况是否正常,切换是否没有问题,如果停掉后也能正常拉起,就可以考虑将业务停下来再做备份操作,就可以保证备份的数据没有问题,如果实在无法停那就找业务不忙的时候来做了。

A.准备磁带设备:
a. 如果系统采用内置磁带机,以下步骤无需操作

b. 如果系统链接外置磁带机,首先连接硬件到主机SCSI卡,在确保连接无误后,给磁带机加电后执行以下命令
# drvconfig
让系统识别磁带机

c.验证磁带机设备是否加载
# cd /dev/rmt
# ls 看系统中是否有设备目录树,一般是如下格式:0 0n....等等

d.将准备好的磁带插入磁带机,检测磁带机状态
# mt -f /dev/rmt/0 status
你可能会看到如下信息:
Quantum DLT7000 tape drive:
sense key(0x0)= nosense residual= 0 retries= 0
file no= 0 block no= 0
sense key(0x0)= nosense 表示你的系统可以正常访问磁带。
sense key(0x6)= unit attention 表示这个设备可能被重置,或是刚加电的状态
/dev/rmt/0: no tape loaded or drive offline 表示磁带不能访问
no such file or directory 如果你出现了这条信息,你的系统与你的磁带设备无法进行通讯。查看一下,磁带机是否加电,以及连线是否正常。

B.备份要扩展的卷数据(下面这个是不停应用的操作过程):
a.查看文件系统挂接情况
# df -k //查看lvrbs卷的mountpoint
/dev/vx/dsk/datadg/lvrbs
5039230 2782738 2206100 56% /data/rbs

b.备份卷数据(如果有多余磁带请多备份一份,以防磁带有问题)
# ufsdump 0uf /dev/rmt/0n /dev/vx/rdsk/datadg/lvsrbs

c. 如果扩完卷以后,里面的数据有问题请用下面的方法恢复(这个时候就一定要停业务,防止I/O读写了):
# cd /data/rbs
# ufsrestore -rvf /dev/rmt/0n

C.备份要扩展的卷数据(下面这个是停掉应用的操作过程):
a.查看文件系统挂接情况
# df -k //查看lvrbs卷的mountpoint,可能会看不到,会在停业务的时候被umount掉

b.备份卷数据(如果有多余磁带请多备份一份,以防磁带有问题)
# ufsdump 0uf /dev/rmt/0n /dev/vx/rdsk/datadg/lvrbs

c. 如果扩完卷以后,里面的数据有问题请用下面的方法恢复(这个时候就一定要停业务,防止I/O读写了):
# mount /data/rbs
# df -k 查看一下是否已经mount上来
# cd /data/rbs
# ufsrestore -rvf /dev/rmt/0n

If error occurs, the following must be done:
# umount /data
Creating new file system:
# newfs /dev/vx/rdsk/datadg/lvdata
# mount /dev/vx/dsk/datadg/lvdata /data
# cd /data
Repairing data:
# ufsrestore -rvf /dev/rmt/0m
Checking modifications:
# df –k
# fsck /dev/vx/dsk/datadg/lvdata

2.2.使用下面命令扩卷大小:
# vxresize -t lvrbsresize lvrbs new_length (new_length指你要扩到多少GB,比如你要扩到10GB,就写10g或10240m即可)等扩完后会自动回到#提示下
# vxprint -ht lvrbs 检查调整后的卷组大小

2.3.检查一下业务是否正常,如果没有问题,说明扩卷成功。
Starting data
# hareg –y dataserv

[@more@]

Solaris2.6+Sun cluster2.2+Vxvm2.6下的逻辑卷扩卷方法


硬件环境:
N1145+D1000
软件环境:
solaris2.6+sun cluster2.2+vxvm2.6+informix

1、操作准备:
1)确认需扩容的磁盘空间目前大小
# vxprint -ht lvrbs
Disk group: datadg
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
v lvrbs fsgen ENABLED ACTIVE 10240000 SELECT - (raid0+1大小为5G)
pl lvrbs-01 lvrbs ENABLED ACTIVE 10248840 STRIPE 3/128 RW
sd datadg01-03 lvrbs-01 datadg01 4099440 3416200 0/0 c1t9d0 ENA
sd datadg02-03 lvrbs-01 datadg02 4099440 3416200 1/0 c1t10d0 ENA
sd datadg03-03 lvrbs-01 datadg03 4099440 3416200 2/0 c1t11d0 ENA
pl lvrbs-02 lvrbs ENABLED ACTIVE 10248840 STRIPE 3/128 RW
sd datadg04-03 lvrbs-02 datadg04 4099440 3416200 0/0 c2t9d0 ENA
sd datadg05-03 lvrbs-02 datadg05 4099440 3416200 1/0 c2t10d0 ENA
sd datadg06-03 lvrbs-02 datadg06 4099440 3416200 2/0 c2t11d0 ENA


2) 察看到这个datadg里每个磁盘的剩余大小
# vxdg -g datadg free
DISK DEVICE TAG OFFSET LENGTH FLAGS
datadg01 c1t9d0s2 c1t9d0 34265664 1097896 -
datadg02 c1t10d0s2 c1t10d0 34265664 1097896 -
datadg03 c1t11d0s2 c1t11d0 34265664 1097896 -
datadg04 c2t9d0s2 c2t9d0 34265664 1097896 -
datadg05 c2t10d0s2 c2t10d0 34265664 1097896 -
datadg06 c2t11d0s2 c2t11d0 34265664 1097896 -
datadg07 c1t12d0s2 c1t12d0 27329600 8033960 -
datadg08 c1t13d0s2 c1t13d0 27329600 8033960 -
datadg09 c1t14d0s2 c1t14d0 27329600 8033960 -
datadg10 c2t12d0s2 c2t12d0 6832400 28531160 -
datadg11 c2t13d0s2 c2t13d0 6832400 28531160 -
datadg12 c2t14d0s2 c2t14d0 6832400 28531160 -

3) 察看单个卷的大小可以扩到多大,只要不超过这个范围就可以:
# vxassist -g datadg maxgrow lvrbs
Volume lvrbs can be extended by 27402240 to 37642240 (18380Mb)

2、具体扩卷过程
1) Backing up database
# su – datasys
% su informix
% ontape –s –L 0
% exit; exit
2) Shutting down data subsystem and cluster
# hareg –n dataserv
3) Checking file system:
# df –k
The following string must be absent
/dev/vx/dsk/datadg/lvdata
4128430 2646606 1440540 65% /data
If it present, done:
# umount /data

2.1.使用磁带机备份所要扩的卷数据,请根据实际情况参考下面内容来做,确认双机业务运行正常,所有数据服务是On(用hastat察看),双机也能正常起停应用和切换,无误后继续以下操作;还有要考虑的就是现在双机运行情况是否正常,双机切换是否正常,ufsdump的操作一般是要停止I/O操作的,特别是ufsrestore.如果不停业务,这个卷上还是有I/O读写的,这样可能造成无效备份.但是如果双机有问题(假如停掉业务拉不起来),又没有做好备份,就会有一定风险,所以最好是检查双机运行情况是否正常,切换是否没有问题,如果停掉后也能正常拉起,就可以考虑将业务停下来再做备份操作,就可以保证备份的数据没有问题,如果实在无法停那就找业务不忙的时候来做了。

A.准备磁带设备:
a. 如果系统采用内置磁带机,以下步骤无需操作

b. 如果系统链接外置磁带机,首先连接硬件到主机SCSI卡,在确保连接无误后,给磁带机加电后执行以下命令
# drvconfig
让系统识别磁带机

c.验证磁带机设备是否加载
# cd /dev/rmt
# ls 看系统中是否有设备目录树,一般是如下格式:0 0n....等等

d.将准备好的磁带插入磁带机,检测磁带机状态
# mt -f /dev/rmt/0 status
你可能会看到如下信息:
Quantum DLT7000 tape drive:
sense key(0x0)= nosense residual= 0 retries= 0
file no= 0 block no= 0
sense key(0x0)= nosense 表示你的系统可以正常访问磁带。
sense key(0x6)= unit attention 表示这个设备可能被重置,或是刚加电的状态
/dev/rmt/0: no tape loaded or drive offline 表示磁带不能访问
no such file or directory 如果你出现了这条信息,你的系统与你的磁带设备无法进行通讯。查看一下,磁带机是否加电,以及连线是否正常。

B.备份要扩展的卷数据(下面这个是不停应用的操作过程):
a.查看文件系统挂接情况
# df -k //查看lvrbs卷的mountpoint
/dev/vx/dsk/datadg/lvrbs
5039230 2782738 2206100 56% /data/rbs

b.备份卷数据(如果有多余磁带请多备份一份,以防磁带有问题)
# ufsdump 0uf /dev/rmt/0n /dev/vx/rdsk/datadg/lvsrbs

c. 如果扩完卷以后,里面的数据有问题请用下面的方法恢复(这个时候就一定要停业务,防止I/O读写了):
# cd /data/rbs
# ufsrestore -rvf /dev/rmt/0n

C.备份要扩展的卷数据(下面这个是停掉应用的操作过程):
a.查看文件系统挂接情况
# df -k //查看lvrbs卷的mountpoint,可能会看不到,会在停业务的时候被umount掉

b.备份卷数据(如果有多余磁带请多备份一份,以防磁带有问题)
# ufsdump 0uf /dev/rmt/0n /dev/vx/rdsk/datadg/lvrbs

c. 如果扩完卷以后,里面的数据有问题请用下面的方法恢复(这个时候就一定要停业务,防止I/O读写了):
# mount /data/rbs
# df -k 查看一下是否已经mount上来
# cd /data/rbs
# ufsrestore -rvf /dev/rmt/0n

If error occurs, the following must be done:
# umount /data
Creating new file system:
# newfs /dev/vx/rdsk/datadg/lvdata
# mount /dev/vx/dsk/datadg/lvdata /data
# cd /data
Repairing data:
# ufsrestore -rvf /dev/rmt/0m
Checking modifications:
# df –k
# fsck /dev/vx/dsk/datadg/lvdata

2.2.使用下面命令扩卷大小:
# vxresize -t lvrbsresize lvrbs new_length (new_length指你要扩到多少GB,比如你要扩到10GB,就写10g或10240m即可)等扩完后会自动回到#提示下
# vxprint -ht lvrbs 检查调整后的卷组大小

2.3.检查一下业务是否正常,如果没有问题,说明扩卷成功。
Starting data
# hareg –y dataserv

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9479798/viewspace-1050079/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9479798/viewspace-1050079/

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 扫一扫,分享海报

Veritas™ Volume Manager Administrator's Guide The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement. Product Version:5.0 MP3 Document version: 5.0MP3.0 Legal Notice Copyright © 2008 Symantec Corporation. All rights reserved. Symantec, the Symantec Logo, Veritas, and Veritas Storage Foundation are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. This Symantec product may contain third party software for which Symantec is required to provide attribution to the third party (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Software does not alter any rights or obligations you may have under those open source or free software licenses. Please see the Third Party Legal Notice Appendix to this Documentation or TPIP ReadMe File accompanying this Symantec product for more information on the Third Party Programs. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any. THEDOCUMENTATIONISPROVIDED"AS IS"ANDALLEXPRESSORIMPLIEDCONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BELEGALLYINVALID.SYMANTECCORPORATIONSHALLNOTBELIABLEFORINCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in Commercial Computer Software or Commercial Computer Software Documentation", as applicable, and any successor regulations. Any use, modification, reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement. Symantec Corporation
参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值