Robert Milkowski
2007-Jan-30 13:00 UTC
[zfs-discuss] restore pool from detached disk from mirror
Hello zfs-discuss, I had a pool with only two disks in a mirror. I detached one disks and have erased later first disk. Now i would really like to quickly get data from the second disk available again. Other than detaching the second disk nothing else was done to it. Has anyone written such a tool in-house? I guess only vdev label was erased so it should be possible to do it. ? -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
Jeremy Teo
2007-Jan-30 14:41 UTC
[zfs-discuss] restore pool from detached disk from mirror
Hello, On 1/30/07, Robert Milkowski <rmilkowski at task.gda.pl> wrote:> Hello zfs-discuss, > > I had a pool with only two disks in a mirror. I detached one disks > and have erased later first disk. Now i would really like to quickly > get data from the second disk available again. Other than detaching > the second disk nothing else was done to it. > > Has anyone written such a tool in-house? I guess only vdev label was > erased so it should be possible to do it.My grokking of the code confirms that the vdev labels of a detached vdev are wiped. The vdev label contains the uber block. Without the uber block, we can''t access the rest of the zpool/zfs data on the detached vdev. -- Regards, Jeremy
Rainer Heilke
2007-Jan-30 22:29 UTC
[zfs-discuss] Re: restore pool from detached disk from mirror
Jeremy is correct. There is actually an RFE open to allow a "zpool split" that would have allowed you to detach the second disk while keeping the vdev data (and thus allowing you to pull in the data in the detached disk using some sort of "import" type command). Rainer This message posted from opensolaris.org
Jeremy Teo
2007-Jan-31 09:21 UTC
[zfs-discuss] restore pool from detached disk from mirror
On 1/30/07, Jeremy Teo <white.wristband at gmail.com> wrote:> Hello, > > On 1/30/07, Robert Milkowski <rmilkowski at task.gda.pl> wrote: > > Hello zfs-discuss, > > > > I had a pool with only two disks in a mirror. I detached one disks > > and have erased later first disk. Now i would really like to quickly > > get data from the second disk available again. Other than detaching > > the second disk nothing else was done to it. > > > > Has anyone written such a tool in-house? I guess only vdev label was > > erased so it should be possible to do it. > > My grokking of the code confirms that the vdev labels of a detached > vdev are wiped. The vdev label contains the uber block. Without the > uber block, we can''t access the rest of the zpool/zfs data on the > detached vdev.On a related note: I''ve been itching to make what you want possible also (ie detaching a vdev from a mirror and getting a zpool from via zpool import. I''ll see what I can do over the next few weeks. I presume you would be willing to be a tester? ;)> Regards, > Jeremy >-- Regards, Jeremy
Robert Milkowski
2007-Jan-31 20:13 UTC
[zfs-discuss] restore pool from detached disk from mirror
Hello Jeremy, Wednesday, January 31, 2007, 10:21:59 AM, you wrote: JT> On 1/30/07, Jeremy Teo <white.wristband at gmail.com> wrote: JT> On a related note: I''ve been itching to make what you want possible JT> also (ie detaching a vdev from a mirror and getting a zpool from via JT> zpool import. I''ll see what I can do over the next few weeks. I JT> presume you would be willing to be a tester? ;) You kidding? Of course :) -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com