Veranstaltungen/2009-12-04 ZFS-Workshop/Szenario: ungleicher Pool

Aus UUGRN

Problemstellung: drei Festplatten unterschiedlicher Größe:

  • 100MB
  • 400MB
  • 500MB

Ziel ist es, alle Platten zu einem "sinnvollen" Pool zusammen zu fassen.

shl@lightbulb:~$ mkfile 100m 100MB
shl@lightbulb:~$ mkfile 400m 400MB
shl@lightbulb:~$ mkfile 500m 500MB

Die zwei kleineren Festplatten fassen wir zu einem hilfs-Pool zusammen.

shl@lightbulb:~$ pfexec zpool create helppool ~/100MB ~/400MB
shl@lightbulb:~$ pfexec zfs create -sV 400G helppool/helpvol

Und erstellen ein vdev auf diesem Pool.

shl@lightbulb:~$ zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
helppool                  96.5K   457M    19K  /helppool
helppool/helpvol            16K   457M    16K  -

Mit diesem vdev und der verbleibenden Festplatte erstellen wir den Ziel-Pool.

shl@lightbulb:~$ pfexec zpool create strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol 
invalid vdev specification
use '-f' to override the following errors:
mismatched replication level: both file and disk vdevs are present
shl@lightbulb:~$ pfexec zpool create -f strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol 

Und wieder benötigten wir ein -f.

Beide Pools existieren nun im System, und ein Mirror zwischen dem helppool und der Festplatte besteht.

shl@lightbulb:~$ zpool status
  pool: helppool
 state: ONLINE
 scrub: none requested
config:

	NAME                      STATE     READ WRITE CKSUM
	helppool                  ONLINE       0     0     0
	  /export/home/shl/100MB  ONLINE       0     0     0
	  /export/home/shl/400MB  ONLINE       0     0     0

errors: No known data errors

  pool: strangepool
 state: ONLINE
 scrub: none requested
config:

	NAME                              STATE     READ WRITE CKSUM
	strangepool                       ONLINE       0     0     0
	  /export/home/shl/500MB          ONLINE       0     0     0
	  /dev/zvol/dsk/helppool/helpvol  ONLINE       0     0     0

errors: No known data errors

Quellen:

  • man-Pages