Solved destroying my zfs mirrors

Hello all,

this is my current mount table
Code:
zroot/ROOT/default  703974500  6554924  697419576  1%  /
devfs  1  1  0  100%  /dev
fdescfs  1  1  0  100%  /dev/fd
procfs  4  4  0  100%  /proc
backups  2828008824 62688372 2765320452  2%  /backups
zroot/tmp  697420632  1056  697419576  0%  /tmp
zroot/usr/home  699213860  1794284  697419576  0%  /usr/home
zroot/usr/ports  698126340  706764  697419576  0%  /usr/ports
zroot/usr/src  697937312  517736  697419576  0%  /usr/src
zroot/var/crash  697419672  96  697419576  0%  /var/crash
zroot/var/log  697420028  452  697419576  0%  /var/log
zroot/var/mail  697419696  120  697419576  0%  /var/mail
zroot/var/tmp  697419760  184  697419576  0%  /var/tmp
map -hosts  0  0  0  100%  /net
zfs list
Code:
NAME  USED  AVAIL  REFER  MOUNTPOINT
backups  59.8G  2.58T  59.8G  /backups
zroot  9.14G  665G  96K  none
zroot/ROOT  6.25G  665G  96K  none
zroot/ROOT/default  6.25G  665G  6.25G  /
zroot/tmp  1.03M  665G  1.03M  /tmp
zroot/usr  2.88G  665G  96K  /usr
zroot/usr/home  1.71G  665G  1.71G  /usr/home
zroot/usr/ports  690M  665G  690M  /usr/ports
zroot/usr/src  506M  665G  506M  /usr/src
zroot/var  948K  665G  96K  /var
zroot/var/crash  96K  665G  96K  /var/crash
zroot/var/log  452K  665G  452K  /var/log
zroot/var/mail  120K  665G  120K  /var/mail
zroot/var/tmp  184K  665G  184K  /var/tmp

I split the mirror, that is all I did so far.
What I am trying to accomplish is revert back the 2 drives (which were in the mirror) to raw state.
How can I accomplish that?

Everything I try to says device is busy.

I want to start all over from raw devices (I am learning, data are backed up).

Thanks
 
Last edited by a moderator:
UPDATE: SAMBA was holding on to it.
It is now destroyed by zfs.

How can revert them back to raw?
GPART cannot destroy them, it says device is busy.
 
Please give details for others. I would have suggested overwriting the metadata on the drive or partition.
 
Hi, yeah sorry about that, I haven't written down the exact syntax (bad habit, I keep reinventing the wheels). But here is an overview:
— Created a mirror with 2 drives.
— Exported them via Samba as a share for a NAS to send its backup via rsync.
— Found a problem that when I shut down FreeBSD, the NAS does not remember the share. So I have to mount it by hand. So I am trying to find another way to do that. So I needed to destroy the mirror.

I had to stop the Samba server first, otherwise the mirror will not be destroyed (error busy).

1. split the mirror
2. zpool destroy -f <mirrorname>
3. gpart delete -i <index) <geom> <--- used gpart list to see the index
4. gpart destroy -F geom

This worked.
(I am recording everything from now on)
 
Back
Top