Also... ZFS ist ein Copy on Write Dateisystem und transaktionsbasiert. Es überschreibt sowohl Daten, als auch Metadaten nach frühestens 100 Transaktionen. Eine Transaktion wird ausgeführt, wenn die aktuelle Transaktionsgruppe gefüllt ist oder 5 Sekunden vergangen sind. Wobei leere Transaktionsgruppen nicht zwingend Daten überschreiben. Wenn du die Platte schnell genug aus dem Pool gezogen hast, sind deine Daten also wohl und munter.
ZFS hat nun eine ganze Reihe mehr Funktionen, als in den Manpages steht. Darunter auch die Möglichkeit auf eine ältere Transaktiongruppe zurückzurollen und damit mit etwas Glück dein fatales Löschen rückgängig zu machen. Diese Funktionen sind undokumentiert, da sie Daten zerstören und man das unbedarften Anwendern nicht an die Hand geben will. Daher:
Kopiere die Platte vorher einmal mit dd(8) durch.
So, im ersten Schritt musst du herausfinden welche Transaktionen auf deinem Pool (ich nenne ihn hier einfach
tank
und gehe davon aus, dass er
/dev/ada0p1
liegt) vorhanden sind. Dafür machst du einfach ein:
Das Ergebnis ist eine lange Liste. Der Pool hat mehrere Kopien der Metadaten, sogenannte Label. Jedes Laben hat wiederum eine Reihe Transaktionen zuegordnet. Ist der Pool konsistent, sind es bei allen Label die gleichen Transaktionen. Als Beispiel einmal mein Pool
vm
, auf dem meine virtuellen Maschinen liegen:
Code:
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'vm'
state: 0
txg: 6849
pool_guid: 4833349645476312860
hostid: 3551443610
hostname: 'pine.home.yamagi.org'
top_guid: 5842668963473420051
guid: 5842668963473420051
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 5842668963473420051
path: '/dev/ada0p1.eli'
whole_disk: 1
metaslab_array: 67
metaslab_shift: 32
ashift: 12
asize: 480099172352
is_log: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
Uberblock[0]
magic = 0000000000bab10c
version = 5000
txg = 1699104
guid_sum = 10676018608949732911
timestamp = 1562251429 UTC = Thu Jul 4 16:43:49 2019
checkpoint_txg = 0
Uberblock[1]
magic = 0000000000bab10c
version = 5000
txg = 1694113
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[2]
magic = 0000000000bab10c
version = 5000
txg = 1699106
guid_sum = 10676018608949732911
timestamp = 1562251439 UTC = Thu Jul 4 16:43:59 2019
checkpoint_txg = 0
Uberblock[3]
magic = 0000000000bab10c
version = 5000
txg = 1699107
guid_sum = 10676018608949732911
timestamp = 1562251444 UTC = Thu Jul 4 16:44:04 2019
checkpoint_txg = 0
Uberblock[4]
magic = 0000000000bab10c
version = 5000
txg = 1695492
guid_sum = 10676018608949732911
timestamp = 1562090405 UTC = Tue Jul 2 20:00:05 2019
checkpoint_txg = 0
Uberblock[5]
magic = 0000000000bab10c
version = 5000
txg = 1697669
guid_sum = 10676018608949732911
timestamp = 1562176800 UTC = Wed Jul 3 20:00:00 2019
checkpoint_txg = 0
Uberblock[6]
magic = 0000000000bab10c
version = 5000
txg = 1697670
guid_sum = 10676018608949732911
timestamp = 1562176805 UTC = Wed Jul 3 20:00:05 2019
checkpoint_txg = 0
Uberblock[7]
magic = 0000000000bab10c
version = 5000
txg = 1694119
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[8]
magic = 0000000000bab10c
version = 5000
txg = 1696296
guid_sum = 10676018608949732911
timestamp = 1562169901 UTC = Wed Jul 3 18:05:01 2019
checkpoint_txg = 0
Uberblock[9]
magic = 0000000000bab10c
version = 5000
txg = 1696297
guid_sum = 10676018608949732911
timestamp = 1562169906 UTC = Wed Jul 3 18:05:06 2019
checkpoint_txg = 0
Uberblock[10]
magic = 0000000000bab10c
version = 5000
txg = 1690154
guid_sum = 10676018608949732911
timestamp = 1561986301 UTC = Mon Jul 1 15:05:01 2019
checkpoint_txg = 0
Uberblock[11]
magic = 0000000000bab10c
version = 5000
txg = 1690155
guid_sum = 10676018608949732911
timestamp = 1561986306 UTC = Mon Jul 1 15:05:06 2019
checkpoint_txg = 0
Uberblock[12]
magic = 0000000000bab10c
version = 5000
txg = 1696236
guid_sum = 10676018608949732911
timestamp = 1562169600 UTC = Wed Jul 3 18:00:00 2019
checkpoint_txg = 0
Uberblock[13]
magic = 0000000000bab10c
version = 5000
txg = 1696237
guid_sum = 10676018608949732911
timestamp = 1562169605 UTC = Wed Jul 3 18:00:05 2019
checkpoint_txg = 0
Uberblock[14]
magic = 0000000000bab10c
version = 5000
txg = 1690094
guid_sum = 10676018608949732911
timestamp = 1561986000 UTC = Mon Jul 1 15:00:00 2019
checkpoint_txg = 0
Uberblock[15]
magic = 0000000000bab10c
version = 5000
txg = 1690095
guid_sum = 10676018608949732911
timestamp = 1561986005 UTC = Mon Jul 1 15:00:05 2019
checkpoint_txg = 0
Uberblock[16]
magic = 0000000000bab10c
version = 5000
txg = 1686000
guid_sum = 10676018608949732911
timestamp = 1561965458 UTC = Mon Jul 1 09:17:38 2019
checkpoint_txg = 0
Uberblock[17]
magic = 0000000000bab10c
version = 5000
txg = 1685969
guid_sum = 10676018608949732911
timestamp = 1561965303 UTC = Mon Jul 1 09:15:03 2019
checkpoint_txg = 0
Uberblock[18]
magic = 0000000000bab10c
version = 5000
txg = 1698386
guid_sum = 10676018608949732911
timestamp = 1562180400 UTC = Wed Jul 3 21:00:00 2019
checkpoint_txg = 0
Uberblock[19]
magic = 0000000000bab10c
version = 5000
txg = 1698387
guid_sum = 10676018608949732911
timestamp = 1562180405 UTC = Wed Jul 3 21:00:05 2019
checkpoint_txg = 0
Uberblock[20]
magic = 0000000000bab10c
version = 5000
txg = 1688660
guid_sum = 10676018608949732911
timestamp = 1561978800 UTC = Mon Jul 1 13:00:00 2019
checkpoint_txg = 0
Uberblock[21]
magic = 0000000000bab10c
version = 5000
txg = 1688661
guid_sum = 10676018608949732911
timestamp = 1561978805 UTC = Mon Jul 1 13:00:05 2019
checkpoint_txg = 0
Uberblock[22]
magic = 0000000000bab10c
version = 5000
txg = 1694774
guid_sum = 10676018608949732911
timestamp = 1562086800 UTC = Tue Jul 2 19:00:00 2019
checkpoint_txg = 0
Uberblock[23]
magic = 0000000000bab10c
version = 5000
txg = 1694775
guid_sum = 10676018608949732911
timestamp = 1562086805 UTC = Tue Jul 2 19:00:05 2019
checkpoint_txg = 0
Uberblock[24]
magic = 0000000000bab10c
version = 5000
txg = 1696952
guid_sum = 10676018608949732911
timestamp = 1562173200 UTC = Wed Jul 3 19:00:00 2019
checkpoint_txg = 0
Uberblock[25]
magic = 0000000000bab10c
version = 5000
txg = 1696953
guid_sum = 10676018608949732911
timestamp = 1562173205 UTC = Wed Jul 3 19:00:05 2019
checkpoint_txg = 0
Uberblock[26]
magic = 0000000000bab10c
version = 5000
txg = 1695578
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[27]
magic = 0000000000bab10c
version = 5000
txg = 1695579
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[28]
magic = 0000000000bab10c
version = 5000
txg = 1695580
guid_sum = 10676018608949732911
timestamp = 1562166308 UTC = Wed Jul 3 17:05:08 2019
checkpoint_txg = 0
Uberblock[29]
magic = 0000000000bab10c
version = 5000
txg = 1699101
guid_sum = 10676018608949732911
timestamp = 1562184000 UTC = Wed Jul 3 22:00:00 2019
checkpoint_txg = 0
Uberblock[30]
magic = 0000000000bab10c
version = 5000
txg = 1699102
guid_sum = 10676018608949732911
timestamp = 1562184005 UTC = Wed Jul 3 22:00:05 2019
checkpoint_txg = 0
Uberblock[31]
magic = 0000000000bab10c
version = 5000
txg = 1699103
guid_sum = 10676018608949732911
timestamp = 1562251424 UTC = Thu Jul 4 16:43:44 2019
checkpoint_txg = 0
------------------------------------
LABEL 1
------------------------------------
version: 5000
name: 'vm'
state: 0
txg: 6849
pool_guid: 4833349645476312860
hostid: 3551443610
hostname: 'pine.home.yamagi.org'
top_guid: 5842668963473420051
guid: 5842668963473420051
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 5842668963473420051
path: '/dev/ada0p1.eli'
whole_disk: 1
metaslab_array: 67
metaslab_shift: 32
ashift: 12
asize: 480099172352
is_log: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
Uberblock[0]
magic = 0000000000bab10c
version = 5000
txg = 1699104
guid_sum = 10676018608949732911
timestamp = 1562251429 UTC = Thu Jul 4 16:43:49 2019
checkpoint_txg = 0
Uberblock[1]
magic = 0000000000bab10c
version = 5000
txg = 1694113
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[2]
magic = 0000000000bab10c
version = 5000
txg = 1699106
guid_sum = 10676018608949732911
timestamp = 1562251439 UTC = Thu Jul 4 16:43:59 2019
checkpoint_txg = 0
Uberblock[3]
magic = 0000000000bab10c
version = 5000
txg = 1699107
guid_sum = 10676018608949732911
timestamp = 1562251444 UTC = Thu Jul 4 16:44:04 2019
checkpoint_txg = 0
Uberblock[4]
magic = 0000000000bab10c
version = 5000
txg = 1695492
guid_sum = 10676018608949732911
timestamp = 1562090405 UTC = Tue Jul 2 20:00:05 2019
checkpoint_txg = 0
Uberblock[5]
magic = 0000000000bab10c
version = 5000
txg = 1697669
guid_sum = 10676018608949732911
timestamp = 1562176800 UTC = Wed Jul 3 20:00:00 2019
checkpoint_txg = 0
Uberblock[6]
magic = 0000000000bab10c
version = 5000
txg = 1697670
guid_sum = 10676018608949732911
timestamp = 1562176805 UTC = Wed Jul 3 20:00:05 2019
checkpoint_txg = 0
Uberblock[7]
magic = 0000000000bab10c
version = 5000
txg = 1694119
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[8]
magic = 0000000000bab10c
version = 5000
txg = 1696296
guid_sum = 10676018608949732911
timestamp = 1562169901 UTC = Wed Jul 3 18:05:01 2019
checkpoint_txg = 0
Uberblock[9]
magic = 0000000000bab10c
version = 5000
txg = 1696297
guid_sum = 10676018608949732911
timestamp = 1562169906 UTC = Wed Jul 3 18:05:06 2019
checkpoint_txg = 0
Uberblock[10]
magic = 0000000000bab10c
version = 5000
txg = 1690154
guid_sum = 10676018608949732911
timestamp = 1561986301 UTC = Mon Jul 1 15:05:01 2019
checkpoint_txg = 0
Uberblock[11]
magic = 0000000000bab10c
version = 5000
txg = 1690155
guid_sum = 10676018608949732911
timestamp = 1561986306 UTC = Mon Jul 1 15:05:06 2019
checkpoint_txg = 0
Uberblock[12]
magic = 0000000000bab10c
version = 5000
txg = 1696236
guid_sum = 10676018608949732911
timestamp = 1562169600 UTC = Wed Jul 3 18:00:00 2019
checkpoint_txg = 0
Uberblock[13]
magic = 0000000000bab10c
version = 5000
txg = 1696237
guid_sum = 10676018608949732911
timestamp = 1562169605 UTC = Wed Jul 3 18:00:05 2019
checkpoint_txg = 0
Uberblock[14]
magic = 0000000000bab10c
version = 5000
txg = 1690094
guid_sum = 10676018608949732911
timestamp = 1561986000 UTC = Mon Jul 1 15:00:00 2019
checkpoint_txg = 0
Uberblock[15]
magic = 0000000000bab10c
version = 5000
txg = 1690095
guid_sum = 10676018608949732911
timestamp = 1561986005 UTC = Mon Jul 1 15:00:05 2019
checkpoint_txg = 0
Uberblock[16]
magic = 0000000000bab10c
version = 5000
txg = 1686000
guid_sum = 10676018608949732911
timestamp = 1561965458 UTC = Mon Jul 1 09:17:38 2019
checkpoint_txg = 0
Uberblock[17]
magic = 0000000000bab10c
version = 5000
txg = 1685969
guid_sum = 10676018608949732911
timestamp = 1561965303 UTC = Mon Jul 1 09:15:03 2019
checkpoint_txg = 0
Uberblock[18]
magic = 0000000000bab10c
version = 5000
txg = 1698386
guid_sum = 10676018608949732911
timestamp = 1562180400 UTC = Wed Jul 3 21:00:00 2019
checkpoint_txg = 0
Uberblock[19]
magic = 0000000000bab10c
version = 5000
txg = 1698387
guid_sum = 10676018608949732911
timestamp = 1562180405 UTC = Wed Jul 3 21:00:05 2019
checkpoint_txg = 0
Uberblock[20]
magic = 0000000000bab10c
version = 5000
txg = 1688660
guid_sum = 10676018608949732911
timestamp = 1561978800 UTC = Mon Jul 1 13:00:00 2019
checkpoint_txg = 0
Uberblock[21]
magic = 0000000000bab10c
version = 5000
txg = 1688661
guid_sum = 10676018608949732911
timestamp = 1561978805 UTC = Mon Jul 1 13:00:05 2019
checkpoint_txg = 0
Uberblock[22]
magic = 0000000000bab10c
version = 5000
txg = 1694774
guid_sum = 10676018608949732911
timestamp = 1562086800 UTC = Tue Jul 2 19:00:00 2019
checkpoint_txg = 0
Uberblock[23]
magic = 0000000000bab10c
version = 5000
txg = 1694775
guid_sum = 10676018608949732911
timestamp = 1562086805 UTC = Tue Jul 2 19:00:05 2019
checkpoint_txg = 0
Uberblock[24]
magic = 0000000000bab10c
version = 5000
txg = 1696952
guid_sum = 10676018608949732911
timestamp = 1562173200 UTC = Wed Jul 3 19:00:00 2019
checkpoint_txg = 0
Uberblock[25]
magic = 0000000000bab10c
version = 5000
txg = 1696953
guid_sum = 10676018608949732911
timestamp = 1562173205 UTC = Wed Jul 3 19:00:05 2019
checkpoint_txg = 0
Uberblock[26]
magic = 0000000000bab10c
version = 5000
txg = 1695578
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[27]
magic = 0000000000bab10c
version = 5000
txg = 1695579
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[28]
magic = 0000000000bab10c
version = 5000
txg = 1695580
guid_sum = 10676018608949732911
timestamp = 1562166308 UTC = Wed Jul 3 17:05:08 2019
checkpoint_txg = 0
Uberblock[29]
magic = 0000000000bab10c
version = 5000
txg = 1699101
guid_sum = 10676018608949732911
timestamp = 1562184000 UTC = Wed Jul 3 22:00:00 2019
checkpoint_txg = 0
Uberblock[30]
magic = 0000000000bab10c
version = 5000
txg = 1699102
guid_sum = 10676018608949732911
timestamp = 1562184005 UTC = Wed Jul 3 22:00:05 2019
checkpoint_txg = 0
Uberblock[31]
magic = 0000000000bab10c
version = 5000
txg = 1699103
guid_sum = 10676018608949732911
timestamp = 1562251424 UTC = Thu Jul 4 16:43:44 2019
checkpoint_txg = 0
------------------------------------
LABEL 2
------------------------------------
version: 5000
name: 'vm'
state: 0
txg: 6849
pool_guid: 4833349645476312860
hostid: 3551443610
hostname: 'pine.home.yamagi.org'
top_guid: 5842668963473420051
guid: 5842668963473420051
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 5842668963473420051
path: '/dev/ada0p1.eli'
whole_disk: 1
metaslab_array: 67
metaslab_shift: 32
ashift: 12
asize: 480099172352
is_log: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
Uberblock[0]
magic = 0000000000bab10c
version = 5000
txg = 1699104
guid_sum = 10676018608949732911
timestamp = 1562251429 UTC = Thu Jul 4 16:43:49 2019
checkpoint_txg = 0
Uberblock[1]
magic = 0000000000bab10c
version = 5000
txg = 1694113
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[2]
magic = 0000000000bab10c
version = 5000
txg = 1699106
guid_sum = 10676018608949732911
timestamp = 1562251439 UTC = Thu Jul 4 16:43:59 2019
checkpoint_txg = 0
Uberblock[3]
magic = 0000000000bab10c
version = 5000
txg = 1699107
guid_sum = 10676018608949732911
timestamp = 1562251444 UTC = Thu Jul 4 16:44:04 2019
checkpoint_txg = 0
Uberblock[4]
magic = 0000000000bab10c
version = 5000
txg = 1695492
guid_sum = 10676018608949732911
timestamp = 1562090405 UTC = Tue Jul 2 20:00:05 2019
checkpoint_txg = 0
Uberblock[5]
magic = 0000000000bab10c
version = 5000
txg = 1697669
guid_sum = 10676018608949732911
timestamp = 1562176800 UTC = Wed Jul 3 20:00:00 2019
checkpoint_txg = 0
Uberblock[6]
magic = 0000000000bab10c
version = 5000
txg = 1697670
guid_sum = 10676018608949732911
timestamp = 1562176805 UTC = Wed Jul 3 20:00:05 2019
checkpoint_txg = 0
Uberblock[7]
magic = 0000000000bab10c
version = 5000
txg = 1694119
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[8]
magic = 0000000000bab10c
version = 5000
txg = 1696296
guid_sum = 10676018608949732911
timestamp = 1562169901 UTC = Wed Jul 3 18:05:01 2019
checkpoint_txg = 0
Uberblock[9]
magic = 0000000000bab10c
version = 5000
txg = 1696297
guid_sum = 10676018608949732911
timestamp = 1562169906 UTC = Wed Jul 3 18:05:06 2019
checkpoint_txg = 0
Uberblock[10]
magic = 0000000000bab10c
version = 5000
txg = 1690154
guid_sum = 10676018608949732911
timestamp = 1561986301 UTC = Mon Jul 1 15:05:01 2019
checkpoint_txg = 0
Uberblock[11]
magic = 0000000000bab10c
version = 5000
txg = 1690155
guid_sum = 10676018608949732911
timestamp = 1561986306 UTC = Mon Jul 1 15:05:06 2019
checkpoint_txg = 0
Uberblock[12]
magic = 0000000000bab10c
version = 5000
txg = 1696236
guid_sum = 10676018608949732911
timestamp = 1562169600 UTC = Wed Jul 3 18:00:00 2019
checkpoint_txg = 0
Uberblock[13]
magic = 0000000000bab10c
version = 5000
txg = 1696237
guid_sum = 10676018608949732911
timestamp = 1562169605 UTC = Wed Jul 3 18:00:05 2019
checkpoint_txg = 0
Uberblock[14]
magic = 0000000000bab10c
version = 5000
txg = 1690094
guid_sum = 10676018608949732911
timestamp = 1561986000 UTC = Mon Jul 1 15:00:00 2019
checkpoint_txg = 0
Uberblock[15]
magic = 0000000000bab10c
version = 5000
txg = 1690095
guid_sum = 10676018608949732911
timestamp = 1561986005 UTC = Mon Jul 1 15:00:05 2019
checkpoint_txg = 0
Uberblock[16]
magic = 0000000000bab10c
version = 5000
txg = 1686000
guid_sum = 10676018608949732911
timestamp = 1561965458 UTC = Mon Jul 1 09:17:38 2019
checkpoint_txg = 0
Uberblock[17]
magic = 0000000000bab10c
version = 5000
txg = 1685969
guid_sum = 10676018608949732911
timestamp = 1561965303 UTC = Mon Jul 1 09:15:03 2019
checkpoint_txg = 0
Uberblock[18]
magic = 0000000000bab10c
version = 5000
txg = 1698386
guid_sum = 10676018608949732911
timestamp = 1562180400 UTC = Wed Jul 3 21:00:00 2019
checkpoint_txg = 0
Uberblock[19]
magic = 0000000000bab10c
version = 5000
txg = 1698387
guid_sum = 10676018608949732911
timestamp = 1562180405 UTC = Wed Jul 3 21:00:05 2019
checkpoint_txg = 0
Uberblock[20]
magic = 0000000000bab10c
version = 5000
txg = 1688660
guid_sum = 10676018608949732911
timestamp = 1561978800 UTC = Mon Jul 1 13:00:00 2019
checkpoint_txg = 0
Uberblock[21]
magic = 0000000000bab10c
version = 5000
txg = 1688661
guid_sum = 10676018608949732911
timestamp = 1561978805 UTC = Mon Jul 1 13:00:05 2019
checkpoint_txg = 0
Uberblock[22]
magic = 0000000000bab10c
version = 5000
txg = 1694774
guid_sum = 10676018608949732911
timestamp = 1562086800 UTC = Tue Jul 2 19:00:00 2019
checkpoint_txg = 0
Uberblock[23]
magic = 0000000000bab10c
version = 5000
txg = 1694775
guid_sum = 10676018608949732911
timestamp = 1562086805 UTC = Tue Jul 2 19:00:05 2019
checkpoint_txg = 0
Uberblock[24]
magic = 0000000000bab10c
version = 5000
txg = 1696952
guid_sum = 10676018608949732911
timestamp = 1562173200 UTC = Wed Jul 3 19:00:00 2019
checkpoint_txg = 0
Uberblock[25]
magic = 0000000000bab10c
version = 5000
txg = 1696953
guid_sum = 10676018608949732911
timestamp = 1562173205 UTC = Wed Jul 3 19:00:05 2019
checkpoint_txg = 0
Uberblock[26]
magic = 0000000000bab10c
version = 5000
txg = 1695578
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[27]
magic = 0000000000bab10c
version = 5000
txg = 1695579
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[28]
magic = 0000000000bab10c
version = 5000
txg = 1695580
guid_sum = 10676018608949732911
timestamp = 1562166308 UTC = Wed Jul 3 17:05:08 2019
checkpoint_txg = 0
Uberblock[29]
magic = 0000000000bab10c
version = 5000
txg = 1699101
guid_sum = 10676018608949732911
timestamp = 1562184000 UTC = Wed Jul 3 22:00:00 2019
checkpoint_txg = 0
Uberblock[30]
magic = 0000000000bab10c
version = 5000
txg = 1699102
guid_sum = 10676018608949732911
timestamp = 1562184005 UTC = Wed Jul 3 22:00:05 2019
checkpoint_txg = 0
Uberblock[31]
magic = 0000000000bab10c
version = 5000
txg = 1699103
guid_sum = 10676018608949732911
timestamp = 1562251424 UTC = Thu Jul 4 16:43:44 2019
checkpoint_txg = 0
------------------------------------
LABEL 3
------------------------------------
version: 5000
name: 'vm'
state: 0
txg: 6849
pool_guid: 4833349645476312860
hostid: 3551443610
hostname: 'pine.home.yamagi.org'
top_guid: 5842668963473420051
guid: 5842668963473420051
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 5842668963473420051
path: '/dev/ada0p1.eli'
whole_disk: 1
metaslab_array: 67
metaslab_shift: 32
ashift: 12
asize: 480099172352
is_log: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
Uberblock[0]
magic = 0000000000bab10c
version = 5000
txg = 1699104
guid_sum = 10676018608949732911
timestamp = 1562251429 UTC = Thu Jul 4 16:43:49 2019
checkpoint_txg = 0
Uberblock[1]
magic = 0000000000bab10c
version = 5000
txg = 1694113
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[2]
magic = 0000000000bab10c
version = 5000
txg = 1699106
guid_sum = 10676018608949732911
timestamp = 1562251439 UTC = Thu Jul 4 16:43:59 2019
checkpoint_txg = 0
Uberblock[3]
magic = 0000000000bab10c
version = 5000
txg = 1699107
guid_sum = 10676018608949732911
timestamp = 1562251444 UTC = Thu Jul 4 16:44:04 2019
checkpoint_txg = 0
Uberblock[4]
magic = 0000000000bab10c
version = 5000
txg = 1695492
guid_sum = 10676018608949732911
timestamp = 1562090405 UTC = Tue Jul 2 20:00:05 2019
checkpoint_txg = 0
Uberblock[5]
magic = 0000000000bab10c
version = 5000
txg = 1697669
guid_sum = 10676018608949732911
timestamp = 1562176800 UTC = Wed Jul 3 20:00:00 2019
checkpoint_txg = 0
Uberblock[6]
magic = 0000000000bab10c
version = 5000
txg = 1697670
guid_sum = 10676018608949732911
timestamp = 1562176805 UTC = Wed Jul 3 20:00:05 2019
checkpoint_txg = 0
Uberblock[7]
magic = 0000000000bab10c
version = 5000
txg = 1694119
guid_sum = 10676018608949732911
timestamp = 1562083510 UTC = Tue Jul 2 18:05:10 2019
checkpoint_txg = 0
Uberblock[8]
magic = 0000000000bab10c
version = 5000
txg = 1696296
guid_sum = 10676018608949732911
timestamp = 1562169901 UTC = Wed Jul 3 18:05:01 2019
checkpoint_txg = 0
Uberblock[9]
magic = 0000000000bab10c
version = 5000
txg = 1696297
guid_sum = 10676018608949732911
timestamp = 1562169906 UTC = Wed Jul 3 18:05:06 2019
checkpoint_txg = 0
Uberblock[10]
magic = 0000000000bab10c
version = 5000
txg = 1690154
guid_sum = 10676018608949732911
timestamp = 1561986301 UTC = Mon Jul 1 15:05:01 2019
checkpoint_txg = 0
Uberblock[11]
magic = 0000000000bab10c
version = 5000
txg = 1690155
guid_sum = 10676018608949732911
timestamp = 1561986306 UTC = Mon Jul 1 15:05:06 2019
checkpoint_txg = 0
Uberblock[12]
magic = 0000000000bab10c
version = 5000
txg = 1696236
guid_sum = 10676018608949732911
timestamp = 1562169600 UTC = Wed Jul 3 18:00:00 2019
checkpoint_txg = 0
Uberblock[13]
magic = 0000000000bab10c
version = 5000
txg = 1696237
guid_sum = 10676018608949732911
timestamp = 1562169605 UTC = Wed Jul 3 18:00:05 2019
checkpoint_txg = 0
Uberblock[14]
magic = 0000000000bab10c
version = 5000
txg = 1690094
guid_sum = 10676018608949732911
timestamp = 1561986000 UTC = Mon Jul 1 15:00:00 2019
checkpoint_txg = 0
Uberblock[15]
magic = 0000000000bab10c
version = 5000
txg = 1690095
guid_sum = 10676018608949732911
timestamp = 1561986005 UTC = Mon Jul 1 15:00:05 2019
checkpoint_txg = 0
Uberblock[16]
magic = 0000000000bab10c
version = 5000
txg = 1686000
guid_sum = 10676018608949732911
timestamp = 1561965458 UTC = Mon Jul 1 09:17:38 2019
checkpoint_txg = 0
Uberblock[17]
magic = 0000000000bab10c
version = 5000
txg = 1685969
guid_sum = 10676018608949732911
timestamp = 1561965303 UTC = Mon Jul 1 09:15:03 2019
checkpoint_txg = 0
Uberblock[18]
magic = 0000000000bab10c
version = 5000
txg = 1698386
guid_sum = 10676018608949732911
timestamp = 1562180400 UTC = Wed Jul 3 21:00:00 2019
checkpoint_txg = 0
Uberblock[19]
magic = 0000000000bab10c
version = 5000
txg = 1698387
guid_sum = 10676018608949732911
timestamp = 1562180405 UTC = Wed Jul 3 21:00:05 2019
checkpoint_txg = 0
Uberblock[20]
magic = 0000000000bab10c
version = 5000
txg = 1688660
guid_sum = 10676018608949732911
timestamp = 1561978800 UTC = Mon Jul 1 13:00:00 2019
checkpoint_txg = 0
Uberblock[21]
magic = 0000000000bab10c
version = 5000
txg = 1688661
guid_sum = 10676018608949732911
timestamp = 1561978805 UTC = Mon Jul 1 13:00:05 2019
checkpoint_txg = 0
Uberblock[22]
magic = 0000000000bab10c
version = 5000
txg = 1694774
guid_sum = 10676018608949732911
timestamp = 1562086800 UTC = Tue Jul 2 19:00:00 2019
checkpoint_txg = 0
Uberblock[23]
magic = 0000000000bab10c
version = 5000
txg = 1694775
guid_sum = 10676018608949732911
timestamp = 1562086805 UTC = Tue Jul 2 19:00:05 2019
checkpoint_txg = 0
Uberblock[24]
magic = 0000000000bab10c
version = 5000
txg = 1696952
guid_sum = 10676018608949732911
timestamp = 1562173200 UTC = Wed Jul 3 19:00:00 2019
checkpoint_txg = 0
Uberblock[25]
magic = 0000000000bab10c
version = 5000
txg = 1696953
guid_sum = 10676018608949732911
timestamp = 1562173205 UTC = Wed Jul 3 19:00:05 2019
checkpoint_txg = 0
Uberblock[26]
magic = 0000000000bab10c
version = 5000
txg = 1695578
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[27]
magic = 0000000000bab10c
version = 5000
txg = 1695579
guid_sum = 10676018608949732911
timestamp = 1562166303 UTC = Wed Jul 3 17:05:03 2019
checkpoint_txg = 0
Uberblock[28]
magic = 0000000000bab10c
version = 5000
txg = 1695580
guid_sum = 10676018608949732911
timestamp = 1562166308 UTC = Wed Jul 3 17:05:08 2019
checkpoint_txg = 0
Uberblock[29]
magic = 0000000000bab10c
version = 5000
txg = 1699101
guid_sum = 10676018608949732911
timestamp = 1562184000 UTC = Wed Jul 3 22:00:00 2019
checkpoint_txg = 0
Uberblock[30]
magic = 0000000000bab10c
version = 5000
txg = 1699102
guid_sum = 10676018608949732911
timestamp = 1562184005 UTC = Wed Jul 3 22:00:05 2019
checkpoint_txg = 0
Uberblock[31]
magic = 0000000000bab10c
version = 5000
txg = 1699103
guid_sum = 10676018608949732911
timestamp = 1562251424 UTC = Thu Jul 4 16:43:44 2019
checkpoint_txg = 0
Also 4 Label (Metadatenkopien) mit 31 Transaktionen. Da sieht man nun auch schön an den Timestamps, dass die Kiste in den letzten Tagen eher weniger benutzt wurde. Nun musst eine Transaktion suchen, auf die du zurück möchtest. Hangele dich an den Timestamps lang und beachtet, dass der Pool durch das gewaltsame ziehen der Platte eventuell inkonsistent sein wird. Also nicht jedes Label alle Transaktionen enthalten muss.
Hast du dich für eine Transaktion entschieden, braucht du ihre ID. Das ist das Feld
txg
in der Ausgabe. Also wenn ich auf die Transaktion vom
timestamp = 1562184005 UTC = Wed Jul 3 22:00:05 2019
zurück möchte, wähle ich
txg = 1699102
Mit diesen Informationen kann der Pool nun importiert werden. Das Importieren ist
zerstörend, es verwirft alle Transaktionen, die neuer als die gewünschte Transaktion sind. Unwiderbringlich, für immer, nada. Daher das Backup oben. Ich würde ihn read-only importieren, aber an sich ist es nicht notwendig.
Code:
% pool import -R /mnt -o readonly=on -f -T $txg tank
-R /mnt
um Pfadkollissionen zu verhindern,
-f
da der Pool noch als importiert gekennzeichnet sein wird und
-T $txg
ist die undokumentierte Brechstange. Das kann ein paar Minuten dauern, keine Panik. Anschließend bist du idealerweise auf einem Stand vor dem Desaster, kannst deine Daten rauskopieren und bist mir ewig dankbar.