Re-using disks that have been part of a ZFS pool?

New to OpenZFS on OS X (Or ZFS in general)? Ask your questions here!

Re-using disks that have been part of a ZFS pool?

Postby Sharko » Sat May 12, 2018 12:34 pm

Hey, what is the best way to recycle a disk that was formerly used in a zfs pool to start a new pool? Do I need to worry about the fact that ZFS has put special magic identifiers at the start end of the disk to mark it as part of a ZFS pool? Or do I just export the old pool, and then zpool create away?
Sharko
 
Posts: 44
Joined: Thu May 12, 2016 12:19 pm

Re: Re-using disks that have been part of a ZFS pool?

Postby abc123 » Sun May 13, 2018 8:47 pm

Sharko wrote:Hey, what is the best way to recycle a disk that was formerly used in a zfs pool to start a new pool? Do I need to worry about the fact that ZFS has put special magic identifiers at the start end of the disk to mark it as part of a ZFS pool? Or do I just export the old pool, and then zpool create away?


If you can import the pool then do a zpool destroy on it. Then you can reuse the disks.
abc123
 
Posts: 29
Joined: Mon Jan 30, 2017 11:46 pm

Re: Re-using disks that have been part of a ZFS pool?

Postby Sharko » Mon May 14, 2018 8:27 pm

Super, thanks, I should have thought of that!
Sharko
 
Posts: 44
Joined: Thu May 12, 2016 12:19 pm

Re: Re-using disks that have been part of a ZFS pool?

Postby FadingIntoBlue » Mon May 14, 2018 11:15 pm

I’m pretty sure you can use the -f flag with create and add to force using a previously allocated disk. I know I have been able to add a disk to create a mirror in that situation, anyway.
FadingIntoBlue
 
Posts: 28
Joined: Tue May 27, 2014 12:25 am


Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 1 guest