I need a help. I have added a borrowed disk in pool (zpool add pool_name c1d0s2) and I thought that (disks are of different size) it would be the fastest way to copy data from one disk to the other one (unfortunately I had not read the help for zpool) and then I would detach the first disk from the pool and everything would be OK. Unfortunately, it does not work this way and it says that only mirrored disk can be detached. What can I do now? I use Generic_118855-14. Thanks in advance regards Martin Poz.
On 01/07/06, mkontakt <mkontakt at gmail.com> wrote:> I need a help. I have added a borrowed disk in pool (zpool add > pool_name c1d0s2) and I thought that (disks are of different size) it > would be the fastest way to copy data from one disk to the other one > (unfortunately I had not read the help for zpool) and then I would > detach the first disk from the pool and everything would be OK. > Unfortunately, it does not work this way and it says that only > mirrored disk can be detached. What can I do now? I use > Generic_118855-14.As far as I know, you are boned. If you ''zpool add'' a disk, it extends the poll onto it (like RAID0). You should have run ''zpool attach'' to create a mirrorpair (a la RAID1). Now ZFS won''t let you remove the new device, since in theory it would result in destroyed data. Someone please correct me if I''m wrong - I did this the other day playing around with file based vdevs and made a mental note to never ever do that again (at least not until ''zpool remove'' is implemented). Sorry to be the bearer of bad news. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
Unfortunately, the only solution to my problem I can thing of is to borrow another disk which has to be the size or bigger then the disk in the pool and then use zpool replace c1d0s2 c1d1s2 pool_name. After I can use either zfs send/receive command or find / cpio. By the way, what is better zfs send/receive or find/ cpio? Please let me know if there is another solution, might be something like shrinking partition (c1d0s2-is all disk-never done this before) of the disk. Regards Martin On Sat, Jul 01, 2006 at 09:49:15PM +0200, mkontakt wrote:> I need a help. I have added a borrowed disk in pool (zpool add > pool_name c1d0s2) and I thought that (disks are of different size) it > would be the fastest way to copy data from one disk to the other one > (unfortunately I had not read the help for zpool) and then I would > detach the first disk from the pool and everything would be OK. > Unfortunately, it does not work this way and it says that only > mirrored disk can be detached. What can I do now? I use > Generic_118855-14. > > Thanks in advance regards > Martin Poz.