WARNING!!! Please ensure that no filesystems are mounted on these device(s).
All data on these devices should have been backed up.
The list of devices which will be removed is:
1: Device name: /dev/rdsk/c1t0d0s2
Node WWN: 20000004cfc333eb
Device Typeisk device
Device Paths:
/dev/rdsk/c1t0d0s
Please verify the above list of devices and
then enter 'c' or <CR> to Continue or 'q' to Quit. [Default: c]:
stopping: /dev/rdsk/c1t0d0s2....Done
offlining: /dev/rdsk/c1t0d0s2....Done
Hit <Return> after removing the device(s). //此时拔掉0号盘,并按回车
Device: /dev/rdsk/c1t0d0s2
Logical Nodes being removed under /dev/dsk/ and /dev/rdsk:
c1t0d0s0
c1t0d0s1
c1t0d0s2
c1t0d0s3
c1t0d0s4
c1t0d0s5
c1t0d0s6
c1t0d0s7
********************************************************************************
注:这里之所以加个-F 参数,是因为从eeprom的输出结果中看出,此时系统上记录的启动盘仍然是0号盘(Nvram中存储的,而非实际),所以一旦从逻辑上剔出0号盘时,系统会有提示要求强制 剔除 提示如下:
WARNING!!! Please ensure that no filesystems are mounted on these device(s).
All data on these devices should have been backed up.
The list of devices being used (either busy or reserved) by the host:
1: Device /dev/rdsk/c1t0d0s2
Please enter 's' or <CR> to Skip the "busy/reserved" device(s) or
'q' to Quit and run the subcommand with
-F (force) option. [Default: s]: s
*********************************************************************************
此时在0号槽位上插入73G的硬盘,并在系统里执行devfsadm识别该盘
root@xz_netman # devfsadm
root@xz_netman # format //按照1号盘的分区情况对0号盘进行分区,因为2块盘的大小比一样,所以只能手动分区 ,本次分区客户要求,6号分区50M左右,swap 8G, 剩下的空间全部留给/ ,所以分区时从6号分区开始。
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
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
!<cmd> - execute <cmd>, 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
!<cmd> - execute <cmd>, then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
partition> 6
Part Tag Flag Cylinders Size Blocks
6 usr wm 52 - 14086 68.10GB (14035/0/0) 142820160
Enter partition id tag[usr]: unassigned //因为6号分区作Metadb所以不用其分区名字
Enter partition permission flags[wm]: //回车,执行默认的WM 权限
Enter new starting cyl[52]: 14076
*******************************************************************************
注:
从上面的输出可以看出,总的柱面数是14086个,总大小为68.35G,则可以算出每个柱面大概有5M左右,则如果想给6号分区分大约50M的空间,则分配给6号分区10个左右的柱面就可以了,而6号分区的结束柱面为14086,则开始柱面选14076就可以满足需要。
*******************************************************************************
Enter partition size[111936b, 11c, 54.66mb, 0.05gb]:
//当输入起始柱面后,系统会自动算出该分区的大小,此时按回车确认默认的大小即可。
partition> l //lable,保存对该分区的设置
Ready to label disk, continue? y
partition> 6 //查看分区是否成功
Part Tag Flag Cylinders Size Blocks
6 unassigned wm 14076 - 14086 54.66MB (11/0/0) 111936
*****************************************************************************
注:
1. 其实,采用这种分区如果想达到比较精确的分区空间,我们可以采取下面的方法,比如我们想要给6号分区分50M的空间,那在估算出每个柱面的大小后(大约5M左右),先尝试把6号分区的起始柱面设为14076(大概是10个柱面的空间),则我们会在下一步中看到此时的6号分区的空间(54.66mb),发现比我们想要的空间要大了4m,则我们在下一步不保存当前设置即可(不输入label),之后重新对6号分区进行设置,把其实柱面在增大一个如:1477,再观察此时6号分区的大小,如果合适则保存,如果不合适则继续更改起始柱面,经过几次的尝试就可以得到比较精确的空间了。当空间大小合适后,输入label 保存设置即可。
2. 另外,采用这种倒着分区(从6号分区开始分区)方式进行分区时,一定要计算好起始柱面,在这里经常犯的错误是“顺序颠倒”的错误,比如6号分区起始柱面为14076,由于计算疏忽1号分区的结束柱面确为14078,这样就会出现柱面交叉,不过如果是单盘,即使出现柱面交叉,系统也不会抱错,但如果要作镜像,那么在建立子镜像和设立metadb时都回报错,具体情况会在附录中详细介绍
***********************************************************************
partition> 1
Part Tag Flag Cylinders Size Blocks
1 swap wu 26 - 51 129.19MB (26/0/0) 264576
Enter partition id tag[swap]: //回车,采取默认即可
Enter partition permission flags[wu]: //回车,采取默认即可
Enter new starting cyl[26]: 12427 //因为6号分区的起始柱面为14076,而7号,5号,3号和4号分区的空间又为0,所以1号分区的结束柱面为14075(而非14077,此处一定注意不要犯“颠倒顺序”的错误)而1号分区要8G的空间,大概就是1648个柱面,则1号分区的起始柱面该是12427。
Enter partition size[16780224b, 1649c, 8193.47mb, 8.00gb]:
//空间大小差不多,则按回车确认默认的空间大小即可
partition> l //保存
Ready to label disk, continue? y
根分区类似,这里不再详述。
root@xz_netman # format //确认分区
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
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
!<cmd> - execute <cmd>, 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
!<cmd> - execute <cmd>, then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 12426 60.30GB (12427/0/0) 126457152
1 swap wu 12427 - 14075 8.00GB (1649/0/0) 16780224
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wm 14076 - 14086 54.66MB (11/0/0) 111936
7 unassigned wu 0 0 (0/0/0) 0作者: xidian2002 时间: 2007-03-27 18:09
3.4 备份文件系统
root@xz_netman # newfs /dev/rdsk/c1t0d0s0
newfs: construct a new file system /dev/rdsk/c1t0d0s0: (y/n)? y
/dev/rdsk/c1t0d0s0: 126457152 sectors in 12427 cylinders of 24 tracks, 424 sectors 61746.7MB in 1243 cyl groups (10 c/g, 49.69MB/g, 6016 i/g)
超块 (fsck -F ufs -o b=#) 备份在:
32, 102224, 204416, 306608, 408800, 510992, 613184, 715376, 817568, 919760,
1021952, 1124144, 1226336, 1328528, 1430720, 1532912, 1635104, 1737296,
1839488, 1941680, 2043872, 2146064, 2248256, 2350448, 2452640, 2554832,
2657024, 2759216, 2861408, 2963600, 3065792, 3167984, 3256352, 3358544,
……………………………………………………………………………………….
…………………………………………………………………………………………
root@xz_netman # mount /dev/dsk/c1t0d0s0 /mnt
root@xz_netman # ufsdump 0uf - /dev/dsk/c1t1d0s0 |(cd /mnt ; ufsrestore rf - )
DUMP: 写入 32 千字节记录
DUMP: 本级 0 日期转储:2007年03月21日 星期三 00时17分30秒
DUMP: 上一级 0 日期转储:纪元
DUMP: 转储 /dev/rdsk/c1t1d0s0 到 标准输出。
DUMP: 映射(传送 I) [规则文件]
DUMP: 映射 (传送 II) [目录]
DUMP: 估计 46914800 块 (22907.62MB)。
DUMP: 转储(传送 III) [目录]
DUMP: 转储(传送 IV) [规则文件]
Warning: ./lost+found: File exists
Mar 21 00:29:06 xz_netman login: ROOT LOGIN /dev/pts/2 FROM 10.97.60.200
DUMP: 0.22% 完成,在 112:10 完成
Mar 21 00:33:23 xz_netman last message repeated 2 times
DUMP: 3.98% 完成,在 9:54 完成
DUMP: 17.06% 完成,在 2:48 完成
Mar 21 00:57:13 xz_netman login: ROOT LOGIN /dev/pts/2 FROM 10.97.60.25
DUMP: 46.56% 完成,在 0:51 完成
DUMP: 59.46% 完成,在 0:37 完成
DUMP: 67.04% 完成,在 0:31 完成
DUMP: 73.55% 完成,在 0:26 完成
DUMP: 75.49% 完成,在 0:27 完成
DUMP: 87.37% 完成,在 0:13 完成
DUMP: 95.01% 完成,在 0:05 完成
DUMP: 在 1 卷上的 46915966 块 (22908.19MB)速率是 3602 KB/sec
DUMP: 转储已完成
DUMP: 2007年03月21日 星期三 00时17分30秒 上的 0 级转储
root@xz_netman # ps -ef |grep ufsdump
root 4865 306 0 02:07:40 console 0:00 grep ufsdump
3.5 安装启动块及刷新启动盘WWN
根文件系统备份完成后,要进入单用户在启动盘的0号分区安装启动块,并刷新WWN
root@xz_netman # cd /etc
root@xz_netman # more vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no
-
swap - /tmp tmpfs - yes -
root@xz_netman # more vfstab-INSTALL
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/ c1t0d0s1 - - swap - no -
#/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/d10 /dev/rdsk/ c1t0d0s0 / ufs 1 no logging
swap - /tmp tmpfs - yes -
root@xz_netman # cp vfstab-I* vfstab //将现在的vfstab文件还原为镜像前的状态
root@xz_netman # more vfstab //确认还原成功
root@xz_netman # TERM=vt100;export TERM
root@xz_netman # vi system //将 rootdev:/pseudo/md@0:0,10,blk 项注释掉
******************************************************************************
注:因为从1号盘把系统备份到0号盘时,1号盘上的镜像还没有拆除,所以备份完成后,此时的0号盘上还是“镜像状态”,为了下面从0号盘单盘启动正常,必须把镜像彻底拆除。
******************************************************************************
root@xz_netman # cd /mnt
root@xz_netman # rm restoresymtable
root@xz_netman # cd
root@xz_netman # umount /mnt
root@xz_netman # init 0
root@xz_netman #
INIT: New run level: 0
The system is coming down. Please wait.
System services are now being stopped.
stopping NetWorker daemons:
nsr_shutdown -a –q
打印服务已停止。
Mar 21 02:12:41 xz_netman syslogd: going down on signal 15
+4h43m30s Alarm 3 ON
The system is down.
syncing file systems... done
Program terminated
{0} ok boot cdrom -s
Boot device: /pci@8,700000/scsi@6/disk@6,0:f File and args: -s
SunOS Release 5.8 Version Generic_108528-22 64-bit
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.
Skipping interface fcip0
SUNW,hme0 : No response from Ethernet network : Link down -- cable problem?
Skipping interface hme0
Skipping interface eri0
\
INIT: SINGLE USER MODE
# cd /usr/platform/sun4u/lib/fs/ufs
# installboot bootblk /dev/rdsk/c1t0d0s0 //安装启动块
# mount /dev/dsk/c1t0d0s0 /a
# drvconfig -r /a -p /a/etc/path_to_inst
# cd /devices
# find . -print | cpio -pduVm /a/devices
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..............................
0 blocks
# disks -r /a
# devlinks -r /a
# luxadm set_boot_dev /dev/dsk/c1t0d0s0
Do you want to change boot-device to the new setting? (y/n) y
root@xz_netman # reboot - - -r //此处之所以要加-r 参数 是要系统重新识别一下这个0号盘,不然如果直接boot会有报错,具体信息见附件
syncing file systems... done
rebooting...
R
LOM event: +5h34m29s host reset
screen not found.
keyboard not found.
Keyboard not present. Using lom-console for input and output.
Sun Netra T4 (2 X UltraSPARC-III+) , No Keyboard
Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.5, 2048 MB memory installed, Serial #52968011.
Ethernet address 0:3:ba:28:3a:4b, Host ID: 83283a4b.
Rebooting with command: boot -r
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000014c33883a9,0:a File and args: -r
SunOS Release 5.8 Version Generic_108528-19 64-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Sourcing //.profile-EIS.....
root@xz_netman #
root@xz_netman # metastat //因为6号分区没有备份,所以metadb也就不存在
metastat: xz_netman: there are no existing databases
root@xz_netman #cd
root@xz_netman #mkdir
root@xz_netman #prtdiag –v
root@xz_netman #rm
root@xz_netman #su
root@xz_netman #df –k
注:以上是对备份的系统是否正常的检查,此时要求客户启动业务,查看应用是否正常,若应用正常,则可以确定本次系统dump成功,可以更换另一个盘,并重新镜像。
3.6 更换1号盘并重新同步镜像
root@xz_netman # luxadm remove_device /dev/rdsk/c1t1d0s2
WARNING!!! Please ensure that no filesystems are mounted on these device(s).
All data on these devices should have been backed up.
The list of devices which will be removed is:
1: Device name: /dev/rdsk/c1t1d0s2
Node WWN: 20000004cfc333ff
Device Typeisk device
Device Paths:
/dev/rdsk/c1t1d0s2
Please verify the above list of devices and
then enter 'c' or <CR> to Continue or 'q' to Quit. [Default: c]: c
stopping: /dev/rdsk/c1t1d0s2....Done
offlining: /dev/rdsk/c1t1d0s2....Done
Hit <Return> after removing the device(s).
Device: /dev/rdsk/c1t1d0s2
Logical Nodes being removed under /dev/dsk/ and /dev/rdsk:
c1t1d0s0
c1t1d0s1
c1t1d0s2
c1t1d0s3
c1t1d0s4
c1t1d0s5
c1t1d0s6
c1t1d0s7
root@xz_netman # devfsadm
root@xz_netman # format //确认识别正常
root@xz_netman # prtvtoc /dev/rdsk/c1t0d0s2|fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: New volume table of contents now in place.
root@xz_netman # format //确认
root@xz_netman # metadb -afc 3 c1t0d0s6
root@xz_netman # metadb -afc 3 c1t1d0s6
root@xz_netman # metainit -f d11 1 1 c1t0d0s0
d11: Concat/Stripe is setup
root@xz_netman # metainit d12 1 1 c1t1d0s0
d12: Concat/Stripe is setup
root@xz_netman # metainit -f d21 1 1 c1t0d0s1
d21: Concat/Stripe is setup
root@xz_netman # metainit d22 1 1 c1t1d0s1
d22: Concat/Stripe is setup
root@xz_netman # metainit d10 -m d11
d10: Mirror is setup
root@xz_netman # metainit d20 -m d21
d20: Mirror is setup
root@xz_netman # metaroot d10
root@xz_netman # lockfs -fa
root@xz_netman # cd /etc
root@xz_netman # TERM=vt100;export TERM
root@xz_netman # vi vfstab
root@xz_netman # vi system
root@xz_netman # sync
root@xz_netman # sync
root@xz_netman # shutdown -y -i6 -g0
root@xz_netman # metattach d10 d12
d10: submirror d12 is attached
root@xz_netman # metattach d20 d22
d20: submirror d22 is attached
root@xz_netman # metastat
root@xz_netman # eeprom boot-device="disk disk1"
root@xz_netman # dumpadm -d /dev/md/dsk/d20
Dump content: kernel pages
Dump device: /dev/md/dsk/d20 (swap)
Savecore directory: /var/crash/nj_netman
Savecore enabled: yes
root@xz_netman # metastat|grep %
Resync in progress: 0 % done
Resync in progress: 2 % done作者: wd302 时间: 2007-03-27 18:14
PF lz,厉害的人。作者: xidian2002 时间: 2007-03-27 22:19
不是吧?这样就沉了?遗憾啊!作者: dogg 时间: 2007-03-27 22:51
详细,可以用来例子了,如果每个问题都有这么详细的步骤,我们会提高得更快作者: xidian2002 时间: 2007-03-27 23:32
附录
说明:附录中记录的是本次操作中的一些失误,和一些容易产生错误应该多注意的地方。
1. 分区柱面交叉时建立镜像会抱错
第一次在用73硬盘更换了0号盘并分区后,因为当时的疏忽将分区的起始柱面算差,导致3个分区( / swap s6)的柱面出现交叉,但在没有作镜像前,系统没有报错,但在与另一个73G硬盘作同步分区表及建立metadb时均报错,具体情况如下:
root@xz_netman # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfc333ff,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
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
!<cmd> - execute <cmd>, 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
!<cmd> - execute <cmd>, then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 12426 60.30GB (12427/0/0) 126457152
1 swap wu 12426 - 14074 8.00GB (1649/0/0) 16780224
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
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 14066 - 14086 104.34MB (21/0/0) 213696
7 unassigned wm 0 0 (0/0/0) 0
partition> ^D
注:
1.此时的分区有2个地方出现交叉
a. / 分区的结束柱面与swap分区的开始柱面是相同的
b. Swap分区的结束柱面结束柱面14074 > 14066(s6分区的开始柱面)
2.同步分区表时的报错:
root@xz_netman # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
fmthard: Partition 1 overlaps partition 0. Overlap is allowed
only on partition on the full disk partition).
3.若在分区柱面交叉没有解决的情况下进行镜像则会有如下报错:
root@xz_netman # metadb -afc 3 c1t0d0s6
root@xz_netman # metadb -afc 3 c1t1d0s6
root@xz_netman # metainit -f d11 1 1 c1t0d0s0
d11: Concat/Stripe is setup
root@xz_netman # metainit d12 1 1 c1t1d0s0 //d11和12没有报错是因为0号分区没有重叠柱面
d12: Concat/Stripe is setup
root@xz_netman # metainit -f d21 1 1 c1t0d0s1
metainit: xz_netman: c1t0d0s1: overlaps with device in metadevice state database
//上面这个报错信息就是在有柱面重叠的情况下,建立镜像时的报错。
解决办法:可以在单用户状态下对swap分区和s6在线(系统运行的状态)进行分区调整,而不会破坏系统,因为系统文件不在这两个分区上。一旦柱面交叉的问题解决,prtvtoc复制分区表及建立镜像就都恢复正常了。
ok boot cdrom –s
INIT: SINGLE USER MODE
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c33883a9,0
1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000014c338823a,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
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
!<cmd> - execute <cmd>, 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
!<cmd> - execute <cmd>, then return
quit
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
partition> 1
Part Tag Flag Cylinders Size Blocks
1 swap wu 12426 - 14074 8.00GB (1649/0/0) 16780224
Enter partition id tag[swap]:
Enter partition permission flags[wu]:
Enter new starting cyl[12426]: 12427 //将swap分区的起始柱面改为12427,使其大于0号分区的结束柱面
Enter partition size[16780224b, 1649c, 8193.47mb, 8.00gb]: 8193.47m
partition> l
Ready to label disk, continue? y
partition> 6
Part Tag Flag Cylinders Size Blocks
6 unassigned wm 14066 - 14086 104.34MB (21/0/0) 213696
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[14066]: 14076 //将s6分区的起始柱面改为14076使其大于swap分区的结束柱面
Enter partition size[111936b, 11c, 54.66mb, 0.05gb]:
partition> l
Ready to label disk, continue? y
另外,此处还有个知识点,solaris系统分区时,距不准许出现柱面交叉的情况,但可以出现相邻分区的柱面不相邻,比如:0号分区的柱面范围为0—12345 1号分区的柱面可还有从大于12345的人和柱面开始,比如1号分区的柱面范围可以是 12350---12360 ,而中间这12346-1249的柱面空间我们可以分配给其他任何分区,或者空着浪费掉。
2. 从dump完成的系统盘启动系统时,要用reboot -- -r 来让系统时别该盘,否则系统会抱错,进入维护模式,此时输入df –k 会发现输出为空,即所有的文件系统都没有挂接。Mkdir rm,vi等命令无法执行等等,此时执行相关命令时会报该文件系统为“只读”。
具体报错如下:
# reboot
syncing file systems... done
rebooting...
R
LOM event: +4h55m7s host reset
screen not found.
keyboard not found.
Keyboard not present. Using lom-console for input and output.
Sun Netra T4 (2 X UltraSPARC-III+) , No Keyboard
Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.5, 2048 MB memory installed, Serial #52968011.
Ethernet address 0:3:ba:28:3a:4b, Host ID: 83283a4b.
Rebooting with command: boot
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000014c33883a9,0:a File and args:
SunOS Release 5.8 Version Generic_108528-19 64-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
WARNING: forceload of misc/md_trans failed
WARNING: forceload of misc/md_raid failed
WARNING: forceload of misc/md_hotspares failed
WARNING: forceload of misc/md_sp failed
WARNING: forceload of misc/md_stripe failed
WARNING: forceload of misc/md_mirror failed
configuring IPv4 interfaces: eri0.
Hostname: xz_netman
metainit: xz_netman: stale databases
Use metadb to delete databases which are broken.
Ignore any "Read-only file system" error messages.
Reboot the system when finished to reload the metadevice database.
After reboot, repair any broken database replicas which were deleted.
Type control-d to proceed with normal startup,
(or give root password for system maintenance):作者: yuhuohu 时间: 2007-03-28 08:12
很好 努力作者: susbin 时间: 2007-03-28 23:09
写的挺好的。