Veranstaltungen/2009-12-04 ZFS-Workshop/Szenario: ungleicher Pool: Unterschied zwischen den Versionen

Aus UUGRN
(draft)
 
 
(5 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
shl@lightbulb:~$ mkfile 100m 100MB
+
'''Problemstellung:'''
 +
drei Festplatten unterschiedlicher Größe:
 +
* 100MB
 +
* 400MB
 +
* 500MB
 +
Ziel ist es, alle Platten zu einem "sinnvollen" Pool zusammen zu fassen.
 +
 
 +
<pre>shl@lightbulb:~$ mkfile 100m 100MB
 
shl@lightbulb:~$ mkfile 400m 400MB
 
shl@lightbulb:~$ mkfile 400m 400MB
shl@lightbulb:~$ mkfile 500m 500MB
+
shl@lightbulb:~$ mkfile 500m 500MB</pre>
shl@lightbulb:~$ pfexec zpool create helppool ~/100MB ~/400MB
+
 
shl@lightbulb:~$ pfexec zfs create -sV 400G helppool/helpvol
+
Die zwei kleineren Festplatten fassen wir zu einem ''hilfs-Pool'' zusammen.
shl@lightbulb:~$ pfexec zpool create strangepool
+
<pre>shl@lightbulb:~$ pfexec zpool create helppool ~/100MB ~/400MB
shl@lightbulb:~$ zfs list
+
shl@lightbulb:~$ pfexec zfs create -sV 400G helppool/helpvol</pre>
 +
Und erstellen ein <code>vdev</code> auf diesem Pool.
 +
 
 +
<pre>shl@lightbulb:~$ zfs list
 
NAME                      USED  AVAIL  REFER  MOUNTPOINT
 
NAME                      USED  AVAIL  REFER  MOUNTPOINT
 
helppool                  96.5K  457M    19K  /helppool
 
helppool                  96.5K  457M    19K  /helppool
helppool/helpvol            16K  457M    16K  -
+
helppool/helpvol            16K  457M    16K  -</pre>
rpool                    7.89G  16.6G  81.5K  /rpool
+
 
rpool/ROOT                4.65G  16.6G    19K  legacy
+
Mit diesem <code>vdev</code> und der verbleibenden Festplatte erstellen wir den Ziel-Pool.
rpool/ROOT/installed        71K  16.6G  2.86G  /
+
<pre>shl@lightbulb:~$ pfexec zpool create strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol  
rpool/ROOT/opensolaris    8.25M  16.6G  2.87G  /
 
rpool/ROOT/opensolaris-1  4.64G  16.6G  4.34G  /
 
rpool/dump                1023M  16.6G  1023M  -
 
rpool/export              1.24G  16.6G    21K  /export
 
rpool/export/home        1.24G  16.6G  183M  /export/home
 
rpool/export/home/shl    1.06G  16.6G  1.01G  /export/home/shl
 
rpool/swap                1023M  17.5G  101M  -
 
shl@lightbulb:~$ pfexec zpool create strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol  
 
 
invalid vdev specification
 
invalid vdev specification
 
use '-f' to override the following errors:
 
use '-f' to override the following errors:
 
mismatched replication level: both file and disk vdevs are present
 
mismatched replication level: both file and disk vdevs are present
shl@lightbulb:~$ pfexec zpool create -f strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol  
+
shl@lightbulb:~$ pfexec zpool create -f strangepool ~/500MB /dev/zvol/dsk/helppool/helpvol </pre>
shl@lightbulb:~$ zpool status
+
Und wieder benötigten wir ein <code>-f</code>.
 +
 
 +
Beide Pools existieren nun im System, und ein Mirror zwischen dem <code>helppool</code> und der Festplatte besteht.
 +
<pre>shl@lightbulb:~$ zpool status
 
   pool: helppool
 
   pool: helppool
 
  state: ONLINE
 
  state: ONLINE
Zeile 34: Zeile 39:
 
  /export/home/shl/100MB  ONLINE      0    0    0
 
  /export/home/shl/100MB  ONLINE      0    0    0
 
  /export/home/shl/400MB  ONLINE      0    0    0
 
  /export/home/shl/400MB  ONLINE      0    0    0
 
errors: No known data errors
 
 
  pool: rpool
 
state: ONLINE
 
status: One or more devices has experienced an unrecoverable error.  An
 
attempt was made to correct the error.  Applications are unaffected.
 
action: Determine if the device needs to be replaced, and clear the errors
 
using 'zpool clear' or replace the device with 'zpool replace'.
 
  see: http://www.sun.com/msg/ZFS-8000-9P
 
scrub: resilver completed after 0h0m with 0 errors on Thu Dec  3 15:40:55 2009
 
config:
 
 
NAME        STATE    READ WRITE CKSUM
 
rpool      ONLINE      0    0    0
 
  c7d0s0    ONLINE      0    8    0  18K resilvered
 
  
 
errors: No known data errors
 
errors: No known data errors
Zeile 63: Zeile 52:
 
  /dev/zvol/dsk/helppool/helpvol  ONLINE      0    0    0
 
  /dev/zvol/dsk/helppool/helpvol  ONLINE      0    0    0
  
errors: No known data errors
+
errors: No known data errors</pre>
 +
 
 +
----
 +
''Quellen:''
 +
* man-Pages
 +
 
 +
 
 +
[[Kategorie:ZFS]]
 +
[[Kategorie:ZFS-Workshop]]
 +
 
 +
 
 +
 
 +
 
 +
<div align="center" style="border-top: 1px solid #0000a0; border-bottom: 1px solid #0000a0; margin:0; padding: 0.6em;">
 +
 
 +
[[ZFS-Workshop/Szenario: gemischter Pool|Szenario: gemischter Pool]] | [[ZFS-Workshop/Agenda|Agenda]] | [[ZFS-Workshop/Szenario: Ausfall einer Festplatte|Szenario: Ausfall einer Festplatte]]
 +
 
 +
</div>
 +
 
 +
{{:ZFS-Workshop/Navigation}}

Aktuelle Version vom 14. April 2022, 06:44 Uhr

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