Benutzer-Werkzeuge

Webseiten-Werkzeuge


computer:zfs:zpool

Dies ist eine alte Version des Dokuments!


zpool dient zur Erstellung und Wartung von ZFS-Pools.

Pool erstellen

Der grundlegene Syntax lautet:

zpool create <Poolname> <Pooltyp> <Laufwerke> [spare <Laufwerk[e]>] [-o <Optionen>]
TypBezeichnung
RAID-0/Striping (Standard)
mirrorRAID-1/Mirroring
raidzRAID-Z1 (1 Paritätsbit, ähnlich RAID-5)
raidz2RAID-Z2 (2 Paritätsbits, ähnlich RAID-6)
raidz3RAID-Z3 (3 Paritätsbits)

Mithilfe des Schlagworts spare lassen sich eine oder mehrere Hotspares definieren:

# zpool create pool0 /dev/da{0,1,2,3,4} spare /dev/da5
# zpool status
  pool: pool0
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        pool0       ONLINE       0     0     0
          da0       ONLINE       0     0     0
          da1       ONLINE       0     0     0
          da2       ONLINE       0     0     0
          da3       ONLINE       0     0     0
          da4       ONLINE       0     0     0
        spares
          da5       AVAIL

errors: No known data errors

Pool löschen

Ein Pool kann mit dem folgenden Aufruf gelöscht werden:

zpool destroy <Poolname>
# zpool destroy pool0
# zpool list
no pools available

Status einsehen

zpool kann den Status eines Pools anzeigen, so kann man beispielsweise ausgefallene Festplatten erkennen:

root@vm-debsqueeze:~# zpool status pool0
  pool: pool0
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-2Q
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        pool0       DEGRADED     0     0     0
          raidz1    DEGRADED     0     0     0
            da0     ONLINE       0     0     0
            da1     ONLINE       0     0     0
            da2     ONLINE       0     0     0
            da3     ONLINE       0     0     0
            da4     ONLINE       0     0     0
            da5     UNAVAIL      0     0     0  cannot open

errors: No known data errors

In diesem Fall ist eine Festplatte ausgefallen.

computer/zfs/zpool.1298995497.txt.gz · Zuletzt geändert: 2011/03/01 17:04 von christian