实用技术之--镜像系统的硬盘扩容方案(ufsdump系统,拆镜像,分区方法)
背景信息介绍主机有2个36G硬盘,系统作了镜像。准备把现在的2快36G硬盘更换为2块73G硬盘。本文档就是该系统扩容实施的介绍!
3 方案实施细节 //为避免透露客户信息 对部分内容作了删减,希望对完整性不会有影响
3.1 系统健康检查
A.检查扩充部件是否与主机匹配。
B.系统健康检查
Sourcing //.profile-EIS.....
root@xz_netman # prtdiag -v
root@xz_netman # df -k
文件系统 千字节 用了 可用 容量 挂接在
/dev/md/dsk/d10 30241354 26590345 3348596 89% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
swap 3996568 8 3996560 1% /var/run
swap 3999968 3408 3996560 1% /tmp
root@xz_netman # psrinfo -v
Status of processor 0 as of: 03/20/07 20:11:53
Processor has been on-line since 09/15/05 17:38:58.
The sparcv9 processor operates at 900 MHz,
and has a sparcv9 floating point processor.
Status of processor 1 as of: 03/20/07 20:11:53
Processor has been on-line since 09/15/05 17:39:00.
The sparcv9 processor operates at 900 MHz,
and has a sparcv9 floating point processor.
root@xz_netman # format //察看当前硬盘能否正常识别及分区大小
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333eb,0
1. c1t1d0
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
selecting c1t0d0
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition- select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> p
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print- display the current table
label- write partition map and label to the disk
! - execute , then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 21266 29.30GB (21267/0/0) 61440363
1 swap wu 21267 - 24170 4.00GB (2904/0/0) 8389656
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 24171 - 24178 11.29MB (8/0/0) 23112
7 unassigned wm 0 0 (0/0/0) 0
partition> ^D
root@xz_netman # metastat //查看镜像状态,发现子镜像d11状态不正常
d10: Mirror
Submirror 0: d11
State: Needs maintenance
Submirror 1: d12
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 61440363 blocks
d11: Submirror of d10
State: Needs maintenance
Invoke: metareplace d10 c1t0d0s0
Size: 61440363 blocks
Stripe 0:
Device Start BlockDbase State Hot Spare
c1t0d0s0 0 No Maintenance
d12: Submirror of d10
State: Okay
Size: 61440363 blocks
Stripe 0:
Device Start BlockDbase State Hot Spare
c1t1d0s0 0 No Okay
d20: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d22
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8389656 blocks
d21: Submirror of d20
State: Okay
Size: 8389656 blocks
Stripe 0:
Device Start BlockDbase State Hot Spare
c1t0d0s1 0 No Okay
d22: Submirror of d20
State: Okay
Size: 8389656 blocks
Stripe 0:
Device Start BlockDbase State Hot Spare
c1t1d0s1 0 No Okay
root@xz_netman # cd /var/adm
root@xz_netman # ls –l //发现message中无报错信息
总数 1332986
-rw-r--r-- 1 root root 0 2004 6月5 Xvfb.log
drwxrwxr-x 5 adm adm 512 2004 6月3 acct
-rw------- 1 uucp bin 0 2004 6月3 aculog
drwxr-xr-x 2 adm adm 512 2004 6月3 exacct
-r--r--r-- 1 root other 280563月 20 20:15 lastlog
drwxr-xr-x 2 adm adm 512 2004 6月3 log
-rw-r--r-- 1 root other 03月 18 03:10 messages
-rw-r--r-- 1 root other 03月 11 03:10 messages.0
-rw-r--r-- 1 root other 03月4 03:10 messages.1
-rw-r--r-- 1 root other 02月 25 03:10 messages.2
-rw-r--r-- 1 root other 02月 18 03:10 messages.3
drwxr-xr-x 2 adm adm 512 2004 6月3 passwd
drwxrwxr-x 2 adm sys 512 2004 6月3 sa
drwxr-xr-x 2 root sys 512 2004 6月3 sm.bin
-rw-rw-rw- 1 root bin 0 2004 6月3 spellhist
drwxr-xr-x 2 root sys 512 2004 6月3 streams
-rw------- 1 root root 94893月6 15:05 sulog
-rw-r--r-- 1 root bin 29763月 20 20:11 utmpx
-rw-r--r-- 1 root root 4628 2005 9月 15 vold.log
root@xz_netman # metastat –t //查看子镜像发生故障的时间,发现故障发生时,正是客户开始备份时,所以怀疑是大规模的文件读写(tar文件)导致硬盘损坏。
State: Okay 2004年06月03日 d10: Mirror
Submirror 0: d11
State: Needs maintenance 2007年03月20日 星期二 18时57分55秒
Submirror 1: d12
State: Okay 2004年06月03日 星期四 19时20分26秒
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 61440363 blocks
d11: Submirror of d10
State: Needs maintenance 2007年03月20日 星期二 18时57分55秒
Invoke: metareplace d10 c1t0d0s0
Size: 61440363 blocks
Stripe 0:
Device StartDbaseState Hot SpareTime
c1t0d0s0 0No Maintenance 2007年03月20日 星期二 18时57分55秒
d12: Submirror of d10 星期四 19时20分26秒
Size: 61440363 blocks
Stripe 0:
Device StartDbaseState Hot SpareTime
c1t1d0s0 0No Okay 2004年06月03日 星期四 17时18分15秒
d20: Mirror
Submirror 0: d21
State: Okay 2004年06月03日 星期四 17时18分16秒
Submirror 1: d22
State: Okay 2004年06月03日 星期四 18时14分00秒
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8389656 blocks
d21: Submirror of d20
State: Okay 2004年06月03日 星期四 17时18分16秒
Size: 8389656 blocks
Stripe 0:
Device StartDbaseState Hot SpareTime
c1t0d0s1 0No Okay 2004年06月03日 星期四 17时18分15秒
d22: Submirror of d20
State: Okay 2004年06月03日 星期四 18时14分00秒
Size: 8389656 blocks
Stripe 0:
Device StartDbaseState Hot SpareTime
c1t1d0s1 0No Okay 2004年06月03日 星期四 17时18分15秒
root@xz_netman # metadb
flags first blk block count
a mpluo 16 1034 /dev/dsk/c1t0d0s6
a pluo 1050 1034 /dev/dsk/c1t0d0s6
a pluo 2084 1034 /dev/dsk/c1t0d0s6
a pluo 16 1034 /dev/dsk/c1t1d0s6
a pluo 1050 1034 /dev/dsk/c1t1d0s6
a pluo 2084 1034 /dev/dsk/c1t1d0s6
说明:通过上面的检查发现,除了d11子镜像状态不正常外系统其他项目都正常,由于d11子镜像的问题,导致原来计划需要临时改变,因为客户备份时曾在0号盘上tar文件,这可能是导致0号硬盘故障的原因,所以现在为了安全起见,不能从0号盘dump文件系统,转而要从1号盘dump文件系统。相应的操作步骤也要发生变化:要先把系统从1号盘启动,删除0号盘上的子镜像,更换0号盘,备份文件系统到号盘,从零号盘启动,更换1号盘,重新同步镜像。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40476/showart_321375.html
页:
[1]