Skip to content

Instantly share code, notes, and snippets.

@mb00g
Last active November 22, 2019 07:48
Show Gist options
  • Save mb00g/a18d27c09ddbbed012cf to your computer and use it in GitHub Desktop.
Save mb00g/a18d27c09ddbbed012cf to your computer and use it in GitHub Desktop.
zpool clear

Mesin SAN yang menggunakan Nexenta tiba-tiba off karena mati listrik dari PLN-nya (UPS fail), dan posisi DDR Drive (logzil) langsung off sebelum dia write data ke disk.

Cek zpool dari SSH

nmc@alengka:/$ zpool status
  pool: alengka
 state: FAULTED
status: An intent log record could not be read.
        Waiting for adminstrator intervention to fix the faulted pool.
action: Either restore the affected device(s) and run 'zpool online',
        or ignore the intent log records by running 'zpool clear'.
   see: http://www.sun.com/msg/ZFS-8000-K4
 scan: resilvered 1.50K in 0h0m with 0 errors on Wed Oct 24 19:32:34 2012
config:
        NAME         STATE     READ WRITE CKSUM
        alengka      FAULTED      0     0     0  bad intent log
          mirror-0   ONLINE       0     0     0
            c0t3d0   ONLINE       0     0     0
            c1t8d0   ONLINE       0     0     0
          mirror-1   ONLINE       0     0     0
            c0t0d0   ONLINE       0     0     0
            c1t1d0   ONLINE       0     0     0
          mirror-2   ONLINE       0     0     0
            c0t5d0   ONLINE       0     0     0
            c1t5d0   ONLINE       0     0     0
          mirror-3   ONLINE       0     0     0
            c0t11d0  ONLINE       0     0     0
            c1t7d0   ONLINE       0     0     0
          mirror-4   ONLINE       0     0     0
            c0t10d0  ONLINE       0     0     0
            c1t2d0   ONLINE       0     0     0
        logs
          c3t0d0     UNAVAIL      0     0     0  cannot open

Dari low level Nexenta

$ option expert_mode=1
$ !bash
You are about to enter the Unix ("raw") shell and execute low-level Unix command(s). Warning: using low-level Unix commands is not recommended! Execute? Yes
$ zpool clear alengka c3t0d0

$ zpool online alengka c3t0d0

Proses selanjutnya adalah resilvering, tunggu saja sampai finish dan statusnya kembali online

root@alengka:/volumes# zpool status -x
  pool: alengka
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scan: resilver in progress since Sat Dec 14 01:59:11 2013
    94.9G scanned out of 697G at 1.46G/s, 0h6m to go
    0 resilvered, 13.62% done
root@alengka:/volumes# zpool status 
  pool: alengka
 state: ONLINE
 scan: resilvered 0 in 0h8m with 0 errors on Sat Dec 14 02:07:43 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment