ZFS clone mit promote

Mardor

Well-Known Member
Hallo,

wie in einem anderen Thread beschrieben, hatte ich mir vorgenommen ein "Masterjail" zu erstellen und mir meine anderen Jail dann immer aus dem Jail zu clonen.

Hierzu habe ich folgendes getan:

Code:
zfs snapshot zroot/usr/jails/masterjail@before_clone
zfs clone zroot/usr/jails/masterjail@before_clone zroot/usr/jails/conejail1
zfs promote /usr/jails/conejail1/

Nun habe ich gemerkt, dass ich mich mit dem Namen für mein clonejail verschrieben hatte und wollte den Jail einfach löschen und erneut erstellt.

Deshalb habe ich mit zfs destroy zroot/usr/jails/conejail1 versucht den clone zu löschen, dies wurde jedoch abgeleht da das clonen auch alte snapshots mit gecloned hatte.

Aber auch beim Lösche mit Option -r erhalte ich eine Fehlermeldung die ich nicht verstehe:

Code:
zfs destroy -r zroot/usr/jails/conejail1
cannot destroy 'zroot/usr/jails/conejail1': filesystem has dependent clones
use '-R' to destroy the following datasets:
zroot/usr/jails/masterjail

Eigentlich dachte ich, das ich mit dem zfs clone / zfs promote Befehl einen 1 zu 1 Clone des Masters geschaffen hätte, der komplett unabhängig ist.

Wie kann ich denn das falsche Dataset löschen ohne den Master zu löschen ?
Wie würde ich denn einen 1zu1 clone der völlig unabhängig ist erstellen ?

Gruß Mardor
 
So wie ich das verstehe hast du mit promote die Beziehung umgedreht und daher ist nun masterjail das Kind von conejail1
Code:
zfs promote clone-filesystem

Promotes a clone file system to no longer be dependent on its "ori-
gin" snapshot. This makes it possible to destroy the file system that
the clone was created from. The clone parent-child dependency rela-
tionship is reversed, so that the origin file system becomes a clone
of the specified file system.

The snapshot that was cloned, and any snapshots previous to this
snapshot, are now owned by the promoted clone. The space they use
moves from the origin file system to the promoted clone, so enough
space must be available to accommodate these snapshots. No new space
is consumed by this operation, but the space accounting is adjusted.
The promoted clone must not have any conflicting snapshot names of
its own. The rename subcommand can be used to rename any conflicting
snapshots.

Mach es doch einfach nochmal und versuch es dann... Wenn du völlig unabhängig werden willst dann musst du es kopieren fürchte ich. ZFS lebt von Magie ;)
 
Hallo Rakor,

ich hätte nicht blind auf die Internetanleitung vertrauen dürfen und mal gescheit die man lesen sollen.
Vielen Dank Rakor
 
Back
Top