Você está na página 1de 3

EXAMPLE:

-----------

Following is an example of "/" filesystem under SVM/disksuite(SDS) control.

*
Here is the "/usr/sbin/df -k /" output :

Filesystem kbytes used avail capacity Mounted on


/dev/md/dsk/d13 10327372 1608334 8615765 16% /

*
Here is the simple /usr/sbin/metastat output for mirror d13 :

d13: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20972736 blocks (10 GB)

d10: Submirror of d13


State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s3 0 No Okay Yes

d11: Submirror of d13


State: Okay
Size: 20972736 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s3 0 No Okay Yes

Device Relocation Information:


Device Reloc Device ID
c0t1d0 Yes id1,sd@SFUJITSU_MAP3735N_SUN72G_00Q01SK1____
c0t0d0 Yes id1,sd@SFUJITSU_MAP3735N_SUN72G_00Q01T2B____

*
metadetach sub-mirror d11 from d13 :

#/usr/sbin/metadetach d13 d11


d13: submirror d11 is detached

(Starting with solaris 9, SVM has metaoffline(1M) command).

*
boot from one of the safe method to run fsck -
* boot net/cdrom -s
* boot <alternate-boot-device>
* boot -b

In this example "boot -b" is being used :

ok> boot -b
-
-
-
INIT: Cannot create /var/adm/utmpx

INIT: SINGLE USER MODE

Type control-d to proceed with normal startup,


(or give root password for system maintenance):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode

*
Run fsck :
fsck -F ufs <fsck-option> <raw-root-device> :

#/usr/sbin/fsck -F ufs -y /dev/rdsk/c0t0d0s3


** /dev/rdsk/c0t0d0s3
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
UNREF DIR I=92843 OWNER=root MODE=40755
SIZE=512 MTIME=Sep 25 17:31 2003
RECONNECT? yes

DIR I=92843 CONNECTED. PARENT WAS I=43558

** Phase 4 - Check Reference Counts


LINK COUNT DIR I=43558 OWNER=root MODE=40755
SIZE=512 MTIME=Dec 25 12:28 2003 COUNT 4 SHOULD BE 3
ADJUST? yes

LINK COUNT DIR I=92843 OWNER=root MODE=40755


SIZE=512 MTIME=Sep 25 17:31 2003 COUNT 1 SHOULD BE 2
ADJUST? yes

** Phase 5 - Check Cyl groups


80870 files, 1608335 used, 8719037 free (1773 frags, 1089658 blocks, 0.0%
fragmentation)

***** FILE SYSTEM WAS MODIFIED *****

---------------

Re-run fsck until the filesystem comes out clean -

#/usr/sbin/fsck -F ufs -y /dev/rdsk/c0t0d0s3


** /dev/rdsk/c0t0d0s3
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
80870 files, 1608335 used, 8719037 free (1773 frags, 1089658 blocks, 0.0%
fragmentation)

<fsck-option> :

With logging enabled -


-y/n -o f
Without logging -
-y/n

*
reboot to multi-user mode.
#/usr/sbin/reboot
or
#/usr/sbin/halt (to obp prompt)

*
Once in multi-user mode, metattach the sub-mirror d11 to the mirror d13 :
#/usr/sbin/metattach d13 d11
d13: submirror d11 is attached
(Starting with solaris 9, SVM also has metaonline(1M) command).

After the sub-mirror is atached, it would be resyncronized.


Once completed, the mirror would be back to fully redundant mode.

Você também pode gostar