论AIX的rootvg管理!
今天来个基础话题,讨论一下aix的rootvg的基本管理策略等等!rootvg是我们平常做系统最常用的卷组了吧。。。。
rootvg使用了lvm的种种管理特性和内容,甚至还有其他vg所不具备的属性,要很好的管理rootvg也不是很容易的事情,今天来让我们讨论一下怎么管好rootvg。
大概拟题有以下几个,供大家讨论时参考:
1.rootvg如何做镜像?
2.rootvg做镜像时为什么要chvg -Qn rootvg?
3.rootvg中hd6有必要做镜像么?
4.rootvg中坏了磁盘如何换其中一个?
等等,欢迎大家讨论自己碰到的问题。如果有疑问也可以提出,如果能解答就解答。谢谢你的参与!
注:还是那句话,不欢迎复制和粘贴,请发表你的心得和体会!
[[i] 本帖最后由 happy 于 2009-4-28 15:22 编辑 [/i]] 1.rootvg镜像:
1). 添加新硬盘到rootvg
#extendvg rootvg hdisk1
2). 镜像rootvg
#mirrorvg -c 2 rootvg hdisk1
3). 重新生成 boot image
#bosboot -ad /dev/hdisk0
4). 更新bootlist
#bootlist -m normal hdisk0 hdisk1 cd0
5). 重起系统
#shutdown -Fr
2、保证卷组自动下线。
3、有必要。。。 学习了支持一下,大家加油加油。我们是最棒的 1.损坏的磁盘为rootvg磁盘
1.1 没有做raid和mirror
如发生上述情况,唯一的办法就是磁带恢复
1.2 有做mirror(假设hdisk0和hdisk1做了mirror,现在要更换hdisk0),以下是我所写的更换步骤:
unmirrorvg rootvg hdisk0;
reducevg rootvg hdisk0;
bosboot –ad hdisk1;
bootlist –m normal hdisk1 cd0;
rmdev –l disk0 –d;
cfgmgr;
更换新的磁盘;
cfgmgr;
extendvg rootvg hdisk0;
mirrorvg –c 2 rootvg ;
bosboot –ad hdisk0;
bosboot –ad hdisk1;
bootlist –m normal hdisk0,hdisk1 cd0
1.3 有做raid的情况(假设hdisk0和hdisk1做了raid1,现在要更换hdisk0)
假如根盘做了raid1,那么是不是只要拔下损坏的hdisk0,然后更换新的磁盘就可以?还是需要删除原来的raid信息,然后删除原有的hdisk0的信息再更换新的磁盘,重新做RAID?请前辈们指教。
2.损坏的磁盘为非rootvg磁盘
2.1 没有做raid和mirror
若发生上除情况,是否只能更换磁盘后,重建卷组信息或从磁带恢复?
2.2 有做mirror(假设hdisk2和hdisk3做了mirror属于backvg,现在要更换hdisk2),一下是我所写的步骤,请前辈指教:
unmirrorvg backvg hdisk2;
reducevg backvg hdisk2;
rmdev –l disk2 –d;
cfgmgr;
更换新的磁盘;
cfgmgr;
extendvg backvg hdisk2;
mirrorvg –c 2 backtvg ;
2.3 有做raid(假设hdisk2和hdisk3做了raid1,现在要更换hdisk2)
若遇到此情况是不是也和上述1.3所述的情况一样?
Disk Replacement (Local rootvg hot-swapped SCSI disk)
When a failed local disk is detected, the SA should open a hardware call with IBM support (with the pSeries S/N prtconf ), and run diagnostics to determine the disk is real failed.
a) Check the error log for relevant errors.
errpt |more
errpt –aN hdiskname | more
b) Check and record disk attribute (S/N and location )
lscfg –vl hdiskname
c) Check VG membership for disk
lspv –L hdiskname
d) Check VG
lsvg –L rootvg
lsvg –p rootvg
e) Check LV on the disk
lspv –l hdiskname
lsvg –l rootvg
f) Remove any unmirrored LV on the disk
rmlv lvname
g) Unmirror rootvg from disk
Unmirrorvg rootvg hdiskname
h) Remove disk from VG
reducevg rootvg hdiskname
i) Use # diag to physically identify the disk in the server (LED blink )
diag->task selection ->hot plug task -> SCSI and SISC RAID hot plug manage -> identify a device attached to a SCSI hot swap enclosure device
j) Remove device definitions for disk
rmdev –d –l hdiskname
lspv | more (check)
k) Physical replace the disk, same or larger size than the failed disk, check S/N
l) add new disk in rootvg
cfgmgr –v Create the newdisk device definition
lspv Check
extendvg rootvg newdisk Add the disk to rootvg
lspv Check
mirrorvg rootvg newdisk Mirror VG
syncvg –v rootvg Sync VG
bosboot –a –d /dev/ newdisk
Chvg –a’y’ –Q’n’ –x’n’ rootvg
bootlist –m normal -o
m) recreate the removed LV
n) check final configuration
boot_check -y verify your work done 1 作镜像基本上必须实施的一部分
做法大家都应该很熟悉了。但是一般要注意 后台做镜像 怎么看镜像是否做完了呢?呵呵
2 关闭QUORUM
这个就要说到 VGDA(卷组描述区)了
VGDA在硬盘的数量有如下规则:
一个卷组只有一块硬盘: 该硬盘有两个VGDA.
一个卷组有两块硬盘: 第一块硬盘有两个VGDA, 第二块硬盘有一个VGDA.
一个卷组有三块或三块以上硬盘: 每块硬盘有一个VGDA.
quorum(一个卷组中的可用VGDA的比率)必须高于51%, 该卷组才可用。所以一旦作镜像的一块盘挂了。万一这块盘正好有2个vgda,那另一块好的盘也就算是game over了
所以不能让这个quorum生效,quorum=1 rootvg换盘zp_ccc说得很清楚了 就不多说了 学习和了解一下
同时准备参与一下 基本上都是按照标准文档来
不过没有说怎么修复文件系统啊?
如果两块盘都有问题呢 非rootvg呢,貌似这样不行吧
页:
[1]