-fun-
Contributor
- Joined
- Oct 27, 2015
- Messages
- 171
I want to create a new pool on a disk which has an unused pool on it. (I migrated all my data from there to a new pool a while ago. The existing pool was just detached without destroying anything.)
What is the easiest way to do this?
I first tried to simply create a new pool on this disk but failed:
I then tried to wipe the disk:
I would have imported the old pool and then detached it with the destroy option. But I didn't dare to do this because it has the same name as an existing pool in my system.
After this I checked the guide to no avail.
Finally I'm here ...
EDIT: My Solution. FreeNAS was using the drive as swap device. I used
What is the easiest way to do this?
I first tried to simply create a new pool on this disk but failed:
[MiddlewareError: Unable to GPT format the disk "ada2": gpart: geom 'ada2': File exists]
I then tried to wipe the disk:
[MiddlewareError: Failed to wipe ada2p1: dd: /dev/ada2p1: Operation not permitted]
I would have imported the old pool and then detached it with the destroy option. But I didn't dare to do this because it has the same name as an existing pool in my system.
After this I checked the guide to no avail.
Finally I'm here ...
EDIT: My Solution. FreeNAS was using the drive as swap device. I used
gmirror list
to identify which swap device was using the disk (in my case 'Name: mirror/swap0'). I determined the device name using swapinfo
and found '/dev/mirror/swap0.eli' and deleted this using swapoff /dev/mirror/swap0.eli
. (Note: I had to free memory to get this done because FreeNAS must relocate used swap space somewhere else. This should be easy after a reboot of FreeNAS.) After this I could wipe the disk (quick option didn't work, wiping with zeroes did work). After the wipe I could create a volume on the disk. The swap device got recreated automatically.
Last edited: