ZFS Recovery

From Lolly's Wiki
Jump to navigationJump to search

Siehe SunAlert 233602 : Solaris 10 Assertion Failure in ZFS May Cause a System Panic:

The best recovery for this is to do the following:

    1. Set the following in /etc/system:
set zfs:zfs_recover=1
set aok=1
    2. Import the pool using 'zpool import'
    3. Run a full scrub on the pool using 'zpool scrub'
    4. Use 'zdb -d' and make sure that there is no ondisk corruption reported
    5. Once the pool comes to a clean state, comment / remove the added entries in /etc/system.

Zurückgehen auf einen früheren Uberblock

# zpool import defect_pool
cannot import 'defect_pool': I/O error
        Destroy and re-create the pool from
        a backup source.

# cd /var/cluster/run/HAStoragePlus/zfs/
# strings defect_pool.cachefile | nawk '/c[0-9]+t/'
0/dev/dsk/c8t600A0B80006E103C000008164E51CDD2d0s0
0/dev/dsk/c8t600A0B80006E10E40000D47D4E51CF9Ed0s0

# zdb -lu /dev/dsk/c8t600A0B80006E103C000008164E51CDD2d0s0 | nawk '/txg =/{txg=$NF}/timestamp =/{printf "txg %d\t%s\n",txg,$0}' | sort -n -k 2n,2n | uniq | tail -10
txg 40353851            timestamp = 1352184849 UTC = Tue Nov  6 07:54:09 2012
txg 40353852            timestamp = 1352184849 UTC = Tue Nov  6 07:54:09 2012
txg 40353853            timestamp = 1352184849 UTC = Tue Nov  6 07:54:09 2012
txg 40353870            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353871            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353872            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353873            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353874            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353875            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012
txg 40353879            timestamp = 1352185334 UTC = Tue Nov  6 08:02:14 2012

# zpool import -T <txg> defect_pool
Also z.B. auf Tue Nov  6 07:54:09 2012 -> txg 40353853
# zpool import -T 40353853 defect_pool
Pool defect_pool returned to its state as of Tue Nov 06 07:32:33 2012.
Discarded approximately 22 minutes of transactions.

Kategorie:ZFS