ºìÁªLinuxÃÅ»§
Linux°ïÖú

SDS×ö¾µÏñºÍ¸ùÅÌ»µµô»Ö¸´µÄÏêϸÎĵµ

·¢²¼Ê±¼ä:2007-06-13 00:10:46À´Ô´:ºìÁª×÷Õß:Orsacutc
fujitsu primepower 250 СÐÍ»úÓйØÓÃSDS×ö¾µÏñºÍ¸ùÅÌ»µµô»Ö¸´µÄÏêϸÎĵµ£º
FUJITSU PRIMEPOWER 250 ¼òÒªÓ²¼þÅäÖãº
CPU£º1¿é SPARC64-V 1100MHz
Äڴ棺2048MB
Ó²ÅÌ£ºÈÝÁ¿Îª73.43GBµÄÄÚÖÃSCSIÓ²ÅÌ2¿é
OS£ºSOLARIS 8 02/02
а²×°ÏµÍ³Ê±£¬2¿éÓ²ÅÌÔÚϵͳÖб»·Ö±ð¶¨ÒåΪ£ºc0t0d0 £»c0t1d0£¬¶ÔÆäÖÐÒ»¿éÓ²Å̽øÐÐÊÖ¹¤·ÖÇø£¬ÈçÏ£º
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 41003 58.42GB (41004/0/0) 122519952
1 swap wu 41004 - 43811 4.00GB (2808/0/0) 8390304
2 backup wm 0 - 47993 68.38GB (47994/0/0) 143406072
3 unassigned wm 43812 - 43880 100.67MB (69/0/0) 206172
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 home wm 43881 - 47993 5.86GB (4113/0/0) 12289644
ÆäÖÐc0t0d0s0 ¸ø / »®·ÖÁË£º58.42GB¡£
c0t0d0s1 ¸ø swap »®·ÖÁË£º4.00GB ÊÇÄÚ´æµÄ2±¶¡£
c0t0d0s7 ¸ø /export/home »®·ÖÁË£º5.86GB °´SUN SOLARIS °²×°ÒªÇó£¬Ä¬ÈÏs7·ÖÇøÊǸø/export/homeµÄ¡£
c0t0d0s3 »®·ÖÁË100MBÓÃÀ´×ödisksuite metadevice database Êý¾Ý¿âÇø¡£

ÓÃdisksuite¾µÏñ¸ùÅ̲½Ö裺
1£¬ÏÈÈ·¶¨Ó²¼þϵͳÂú×ã¾µÏñÌõ¼þ£º
Ô´ÅÌÓëÄ¿±êÅÌ´óС×îºÃÒ»Ö£¬ÖÁÉÙÄ¿±êÅÌÒª´óÓÚÔ´ÅÌ¡£
ÈçÐÂÅ̼ÓÈëϵͳ£¬ÇëÏȱ£Ö¤ÏµÍ³ÄÜʶ±ðÐÂÅÌ£¬¿ÉÓÃÒÔÏÂÃüÁ
#devfsadm ²éÕÒа²×°µÄÓ²ÅÌ #format ²é¿´disk
2,metadevice ״̬Êý¾Ý¿â,ÕâЩÊý¾Ý¿â±ØÐëפÁôÔÚÒ»¸öÒýµ¼´ÅÅ̵ÄרÓ÷ÖÇøÉÏ, µ±È»Èç¹ûÔÚ°²×°ÐÂϵͳʱÒÔ¶ÔDISK½øÐÐÁË·ÖÇø, ²¢ÔÚ·ÖÇøʱ»®³öÒ»¸ö·ÖÇø£¬×îºÃΪS3£¬S4Ò²¿ÉÒÔ£¬ÕâʱҪ±£Ö¤±»¾µÏñµÄ´ÅÅÌ·ÖÇø±í±ØÐëÊÇÓëÒýµ¼´ÅÅÌÏàͬ¡£°ÑÒýµ¼´ÅÅ̵ķÖÇø±í¸´ÖƵ½¾µÏñ´ÅÅÌ¡£Ê¹ÓÃÏÂÁÐÃüÁ
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
3£¬Ê¹ÓÃDisksuite½øÐÐÅäÖÃ
Ê×ÏÈÒª´´½¨×´Ì¬Êý¾Ý¿â¸´±¾¡£×îÉÙÒª´´½¨Á½¸ö»òÁ½¸öÒÔÉϵÄÊý¾Ý¿â¸´±¾¡£ÓÃ2ÖеÄÃüÁîÎÒÃÇÒÔ¾­¹²ÓÐÁË2¸öÓÃÀ´±£´æÊý¾Ý¿â¸´±¾µÄ´ÅÅÌ·ÖÇøc0t0d0s3 ºÍc0t1d0s3,ÏÖÔÚÎÒÃǽ«ÔÚ2¸ö·ÖÇøÖзֱðΪÿ¸ö·ÖÇø´´½¨3¸öÊý¾Ý¿â¸´±¾£¬×ܼÆÊÇ6¸ö¸´±¾¡£×´Ì¬Êý¾Ý¿â¸´±¾´æ´¢×ÅDiskSuiteµÄÅäÖúÍ״̬ÐÅÏ¢¡£ÎÒÃÇ¿ÉÒÔʹÓÃÏÂÁÐÃüÁîÈ¥´´½¨Õâ¸öÊý¾Ý¿â¸´±¾¡£
(1) #metadb -a -f -c 3 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3
#metadb -i *Õâ¸öÃüÁî¿ÉÒÔ²éѯÊý¾Ý¿â״̬¡£
(2) ´´½¨Îļþϵͳ·ÖÇøµÄ¾µÏñ
Ê×ÏÈÎÒÃÇÏȶÔ1¸ö´ÅÅÌ×öÒ»¸öµ¥ÏòµÄ¾µÏñ£¬ÉÔºòÎÒÃÇ×·¼ÓµÚ2¸ö´ÅÅÌÈ¥¾µÏñ¡£É豸±àºÅ(d##) ÊÇÈÎÒâµÄ¡£ÕâÀïΪÁË·½±ã¹ÜÀí£¬ÎÒÃÇÐë¶Ô¾µÏñÉ豸±àºÅ×ö¸öÔ¼¶¨£º
d10 - ±íʾµÚ1¿é´ÅÅ̵ľµÏñÉ豸Ãû¡£
d20 - ±íʾµÚ2¿é´ÅÅ̵ľµÏñÉ豸Ãû¡£
d30 - ±íʾ¾µÏñÖÐËù°üº¬µÚ1¿é´ÅÅ̵ľµÏñÉ豸ºÍµÚ2¿é´ÅÅ̵ľµÏñÉ豸µÄ×ܾµÏñÉ豸¡£
metainit ÃüÁî±»ÓÃÀ´´´½¨´ÅÅÌ0ºÅ·ÖÇø(c0t0d0s0,root·ÖÇø ¡°/¡±Îļþϵͳ)µÄ¾µÏñ:
1,#metainit -f d10 1 1 c0t0d0s0
2,#metainit -f d20 1 1 c0t1d0s0
3,#metainit d30 -m d10
ÔÚÉÏÁÐÃüÁîÖеġ°-f¡±²ÎÊý±íʾǿÆÈmetainit ÃüÁî¼ÌÐø£¬¼´Ê¹ÊÇÕâЩ·ÖÇøÖ®Ò»°üº¬ÁËÒ»¸ö±»¹ÒÔصÄÎļþϵͳ»òÕýÔÚ±»Ê¹ÓõĽ»»»·ÖÇø¡£ ÃüÁî¡°# metainit -f d10 1 1 c0t0d0s0¡±±íʾΪroot·ÖÇø´´½¨Ò»¸öÒ»¶ÔÒ»µÄ¼¶Áª¡£ ×îºóÒ»ÌõÃüÁî±íʾ´´½¨metadevice¾µÏñ²¢ÇҰѾµÏñÉ豸d10 ¸½¼Óµ½d30¡£Ò²¾ÍÊÇd30ÊÇmirror,¶ød10¾ÍÊÇd30µÄ×Ó¾µÏñsubmirror¡£
ÏÂÒ»²½ÊÇÒª¸üÐÂ/etc/vfstab ÎļþºÍ/etc/system file¡£²»ÄÜÓÃÊÖ¹¤±à¼­ /etc/vfstab»ò/etc/systemÎļþ¡£¿ÉÒÔʹÓÃmetaroot ÃüÁî,×ö֮ǰ£¬ÇëÒ»¶¨ÒªÏÈ×övfstabÎļþºÍsystemÎļþµÄ±¸·Ý:
#cp /etc/vfstab /etc/vfstab.bak #cp /etc/system /etc/system.bak #metaroot d30
È»ºóÎÒÃDz鿴/etc/vfstab£¬¿ÉÒÔÄÜ¿´µ½¡°/¡±Îļþϵͳ½«±»¹ÒÔص½/dev/md/dsk/d30É϶ø²»ÊǹÒÔص½/dev/dsk/c0t0d0s0ÉÏ¡£
5,´´½¨ÆäËüÎļþϵͳµÄ¾µÏñ
swap Îļþϵͳ(ÔÚÓ²ÅÌc0t0d0 µÄs1·ÖÇøÉÏÕâÒªºÍÄ㰲װʱµÄ·ÖÇøÄÚÈÝÒ»ÖÂ)£º
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d21 1 1 c0t1d0s1
# metainit d31 -m d11
×¢£ºÈç·ÖÇøʱ²¢Î´Ö¸Ã÷·ÖÇø /var /opt ÎļþϵͳµÄ¹Ò½Ó·ÖÇø£¬Ö»×öÖ¸Ã÷µÄ·ÖÇø¾µÏñ£¡
/export/home Îļþϵͳ(ÔÚÓ²ÅÌc0t0d0µÄs7·ÖÇøÉÏÕâÒªºÍÄ㰲װʱµÄ·ÖÇøÄÚÈÝÒ»ÖÂ)¡£
# metainit -f d17 1 1 c0t0d0s7
# metainit -f d27 1 1 c0t1d0s7
# metainit d37 -m d17
6¡¢±à¼­/etc/vfstabÎļþ£¬±à¼­Ö®ºóÕâ¸öеÄ/etc/vfstabÎļþÓ¦¸ÃÀàËÆÓÚÕâÑù£º
# vi /etc/vfstab
#device#to mount Deviceto fsck Mountpoint FStype Fsckpass Mountat boot mount options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
FD - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d31 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
/dev/md/dsk/d37 /dev/md/rdsk/d37 /export/home ufs 2 yes -
swap - /tmp tmpfs - yes -
7¡¢½ûÖ¹ÎÞº¦µÄÏûÏ¢£¨¿ÉÑ¡£©±»½ûÖ¹µôµÄÕâÌõÐÅÏ¢ÊÇ£º"WARNING: forceload of misc/md_hotspares failed".
# metainit hsp001
8¡¢ÖØÐÂÒýµ¼ÔÊÐíϵͳȥÖØйÒÔؾµÏñ
# lockfs -fa
# init 6
ÏÂÁеľ¯¸æס´¦ÊÇÎÞº¦µÄ£¬¿ÉÒÔºöÂÔ²»¼Ç:
WARNING: forceload of misc/md_trans failed
WARNING: forceload of misc/md_raid failed
WARNING: forceload of misc/md_hotspares failed
ÒÔºóÉÏÃæÕâЩÐÅÏ¢¿ÉÒÔÔÚ/etc/systemÀïÃæ×¢Ê͵ô¾Í²»»á³öÏÖÁË¡£
×·¼ÓµÚ¶þ¸ö×Ó¾µÏñÉ豸µ½¾µÏñ£¬ÕâÑù´ÅÅÌÉϵÄÊý¾Ý¾Í»á´ÓÒýµ¼´ÅÅÌÉÏÓëÒѾ­¾µÏñµÄ´ÅÅ̽øÐÐͬ²½¡£
9¡¢ # metattach d30 d20
ÔËÐÐmetastat -t ¼ì²éÕâ¸öͬ²½µÄ½ø³Ì
10¡¢ # metastat d30
ÏÖÔÚ¿ÉÒÔ×·¼ÓÆäËüµÄ¾µÏñÉ豸ÁË¡£
11¡¢ # metattach d31 d21
# metattach d37 d27
ÔËÐÐmetastat -t ¼ì²éÕâЩ½ø³Ì
12¡¢Éú³É¿É×ÔÇл»µÄÄÜÆô¶¯µÄ¾µÏñ´ÅÅÌ£¬Éú³ÉÒýµ¼¿é
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
»Øµ½okÌáʾ·ûÏÂ(ÓñʼDZ¾£¬»òPCÉϵÄÖն˷ÂÕæÈí¼þÇë°´Ctrl+Break´Ósolaris²Ù×öϵͳ״̬¿É»Øµ½okÌáʾ·ûÏ£¬ÈçÓÃsun ¹¤×÷Õ¾»ò¼üÅÌ¿ÉÓÃ
stop+A»Øµ½OKװ̬£©ÐÞ¸ÄÆô¶¯Öµ£¬°Ñ±»¾µÏñ´ÅÅÌÁÐÈ뱸ÓÃÆô¶¯ÖУº
ok printenv *²é¿´obp²ÎÊý£¬×¢Òâ boot-device ÏîµÄ²ÎÊý£¬Î´ÐÞ¸ÄǰĬÈÏΪ disk¡£
ok devalias *²é¿´É豸±ðÃû£¬ÎÒÃÇ¿ÉÒÔ¿´µ½£¬µÚ2¿éÅ̱»ÃüÃûΪ disk1 ¡£
ok setenv boot-device disk disk1 *ÉèÖÃ boot-device °Ñ disk1 ¼ÓÈë¡£
ok reset-all *ÖØÆô
ÓÃdisk suite»Ö¸´¾µÏñÅ̵IJ½Ö裺
¼ÙÈçc0t0d0ÅÌ»µµô£¬ÔòÍ£»ú¸ü»»Ó²Å̺óÐè×ö»Ö¸´¹¤×÷£¬ÈçÏÂ:
ÏÈÔÚOK״̬ÏÂÓþµÏñµÄÅÌÆô¶¯µ½µ¥Óû§Ä£Ê½Ï£º
ok boot disk1 -s
ÔÚµ¥Óû§ÏÂÖ´ÐУº
#metadb -d c0t0d0s3 *ɾ³ýÔ­À´ÔÚc0t0d0s3ÉÏ´´½¨µÄmetadevices database¡£
#prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2 *¸øÐÂÅÌ´´½¨ºÍ¾µÏñÅÌÒ»ÑùµÄ·ÖÇø±í¡£
#metadb -a -f -c 3 c0t0d0s3 *ÖØÐÂÔÚÐÂÅÌÉÏ´´½¨metadevices database¡£
#halt *Í£»ú£¬»Øµ½OK״̬Ï¡£
ok boot disk1 *ÓþµÏñÅÌÆô¶¯ÏµÍ³¡£
#metareplace -e d30 c0t0d0s0
#metareplace -e d31 c0t0d0s1
#metareplace -e d37 c0t0d0s7 *¾µÏñ»Ö¸´¡£
#metastat -t *¿ÉÒԲ鿴¾µÏñ»Ö¸´½ø¶È¡£
»Ö¸´Íê³Éºó£¬¿ÉÔÚOK״̬ÏÂÓãº
ok boot disk
´Ó»Ö¸´ÅÌÆô¶¯ÏµÍ³£¬ÈçÕý³£Æô¶¯£¬Ôò»Ö¸´³É¹¦¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ