Hi, Is it possible to access the data from a detached device from an mirrored pool. Given a two device mirrored pool, if you zpool detach one device. Can the data on the removed device be accessed in some means. From what I can see you can attach the device back to the original pool, but this will simply re-silver everything from the already attached device back onto this device. If I attached this device to a different pool it will simply get overwritten. Any ideas ? cheers Matt
Casper.Dik at oracle.com
2012-Mar-29 15:54 UTC
[zfs-discuss] Accessing Data from a detached device.
>Is it possible to access the data from a detached device from an >mirrored pool.If it is detached, I don''t think there is a way to get access to the mirror. Had you used split, you should be able to reimport it. (You can try aiming "zpool import" at the disk but I''m not hopeful) Casper
Cindy Swearingen
2012-Mar-29 16:13 UTC
[zfs-discuss] Accessing Data from a detached device.
Hi Matt, There is no easy way to access data from a detached device. You could try to force import it on another system or under a different name on the same system with the remaining device. The easiest way is to split the mirrored pool. See the steps below. Thanks, Cindy # zpool status pool pool: pool state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 2012 config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t20000014C3F04F4Fd0 ONLINE 0 0 0 c0t20000014C3F04F38d0 ONLINE 0 0 0 errors: No known data errors # zpool split pool pool2 # zpool import pool2 # zpool status pool pool2 pool: pool state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 2012 config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 c0t20000014C3F04F4Fd0 ONLINE 0 0 0 errors: No known data errors pool: pool2 state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 2012 config: NAME STATE READ WRITE CKSUM pool2 ONLINE 0 0 0 c0t20000014C3F04F38d0 ONLINE 0 0 0 errors: No known data errors # On 03/29/12 09:50, Matt Keenan wrote:> Hi, > > Is it possible to access the data from a detached device from an > mirrored pool. > > Given a two device mirrored pool, if you zpool detach one device. Can > the data on the removed device be accessed in some means. From what I > can see you can attach the device back to the original pool, but this > will simply re-silver everything from the already attached device back > onto this device. > > If I attached this device to a different pool it will simply get > overwritten. > > Any ideas ? > > cheers > > Matt > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Cindy/Casper, Thanks for the pointer, luckily I''d not done the detach before sending the email, split seems the way to go. thanks again Matt On 03/29/12 05:13 PM, Cindy Swearingen wrote:> Hi Matt, > > There is no easy way to access data from a detached device. > > You could try to force import it on another system or under > a different name on the same system with the remaining device. > > The easiest way is to split the mirrored pool. See the > steps below. > > Thanks, > > Cindy > > > # zpool status pool > pool: pool > state: ONLINE > scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 > 2012 > config: > > NAME STATE READ WRITE CKSUM > pool ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > c0t20000014C3F04F4Fd0 ONLINE 0 0 0 > c0t20000014C3F04F38d0 ONLINE 0 0 0 > > errors: No known data errors > # zpool split pool pool2 > # zpool import pool2 > # zpool status pool pool2 > pool: pool > state: ONLINE > scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 > 2012 > config: > > NAME STATE READ WRITE CKSUM > pool ONLINE 0 0 0 > c0t20000014C3F04F4Fd0 ONLINE 0 0 0 > > errors: No known data errors > > pool: pool2 > state: ONLINE > scan: scrub repaired 0 in 0h0m with 0 errors on Wed Mar 28 15:58:44 > 2012 > config: > > NAME STATE READ WRITE CKSUM > pool2 ONLINE 0 0 0 > c0t20000014C3F04F38d0 ONLINE 0 0 0 > > errors: No known data errors > # > > > > On 03/29/12 09:50, Matt Keenan wrote: >> Hi, >> >> Is it possible to access the data from a detached device from an >> mirrored pool. >> >> Given a two device mirrored pool, if you zpool detach one device. Can >> the data on the removed device be accessed in some means. From what I >> can see you can attach the device back to the original pool, but this >> will simply re-silver everything from the already attached device back >> onto this device. >> >> If I attached this device to a different pool it will simply get >> overwritten. >> >> Any ideas ? >> >> cheers >> >> Matt >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Daniel Carosone
2012-Mar-29 23:55 UTC
[zfs-discuss] Accessing Data from a detached device.
On Thu, Mar 29, 2012 at 05:54:47PM +0200, Casper.Dik at oracle.com wrote:> >Is it possible to access the data from a detached device from an > >mirrored pool. > > If it is detached, I don''t think there is a way to get access > to the mirror. Had you used split, you should be able to reimport it. > > (You can try aiming "zpool import" at the disk but I''m not hopeful)The uberblocks have been invalidated "as a precaution", so no. If it''s too late to use split instead of detach, see this thread: http://thread.gmane.org/gmane.os.solaris.opensolaris.zfs/15796/focus=15929 I renew my request for someone to adopt and nurture this tool. -- Dan. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 194 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20120330/0bfbaccd/attachment-0001.bin>
Hi, As an addendum to this, I''m curious about how to grow the split pool in size. Scenario, mirrored pool comprising of two disks, one 200GB and the other 300GB, naturally the size of the mirrored pool is 200GB e.g. the smaller of the two devices. I ran some tests within vbox env and I''m curious why after a zpool split one of the pools does not increase in size to 300gb, yet for some reason both pools remain at 200gb even if I export/import them. Sizes are reported via zpool list. I checked the label, both disks have a single EFI partition consuming 100% of each disk. and format/partition shows slice 0 on both disks also consuming the entire disk respectively. So how does one force the pool with the larger disk to increase in size ? cheers Matt On 03/30/12 12:55 AM, Daniel Carosone wrote:> On Thu, Mar 29, 2012 at 05:54:47PM +0200, Casper.Dik at oracle.com wrote: >>> Is it possible to access the data from a detached device from an >>> mirrored pool. >> If it is detached, I don''t think there is a way to get access >> to the mirror. Had you used split, you should be able to reimport it. >> >> (You can try aiming "zpool import" at the disk but I''m not hopeful) > The uberblocks have been invalidated "as a precaution", so no. > > If it''s too late to use split instead of detach, see this thread: > > http://thread.gmane.org/gmane.os.solaris.opensolaris.zfs/15796/focus=15929 > > I renew my request for someone to adopt and nurture this tool. > > -- > Dan.
Casper.Dik at oracle.com
2012-Mar-30 13:15 UTC
[zfs-discuss] Accessing Data from a detached device.
>Hi, >As an addendum to this, I''m curious about how to grow the split pool in >size. > >Scenario, mirrored pool comprising of two disks, one 200GB and the other >300GB, naturally the size of the mirrored pool is 200GB e.g. the smaller >of the two devices. > >I ran some tests within vbox env and I''m curious why after a zpool split >one of the pools does not increase in size to 300gb, yet for some reason >both pools remain at 200gb even if I export/import them. Sizes are >reported via zpool list. > >I checked the label, both disks have a single EFI partition consuming >100% of each disk. and format/partition shows slice 0 on both disks also >consuming the entire disk respectively. > >So how does one force the pool with the larger disk to increase in size ? >What is the autoexpand setting (I think it is off by default)? zpool get autoexpand splitted-pool Casper
Casper, Yep that''s the lad, I set it to on and split pool expands.. thanks Matt On 03/30/12 02:15 PM, Casper.Dik at oracle.com wrote:>> Hi, >> As an addendum to this, I''m curious about how to grow the split pool in >> size. >> >> Scenario, mirrored pool comprising of two disks, one 200GB and the other >> 300GB, naturally the size of the mirrored pool is 200GB e.g. the smaller >> of the two devices. >> >> I ran some tests within vbox env and I''m curious why after a zpool split >> one of the pools does not increase in size to 300gb, yet for some reason >> both pools remain at 200gb even if I export/import them. Sizes are >> reported via zpool list. >> >> I checked the label, both disks have a single EFI partition consuming >> 100% of each disk. and format/partition shows slice 0 on both disks also >> consuming the entire disk respectively. >> >> So how does one force the pool with the larger disk to increase in size ? >> > What is the autoexpand setting (I think it is off by default)? > > > zpool get autoexpand splitted-pool > > > Casper >