ZFS How to get rid of ZFS?

In an attempt to backup a disk I had messed up, I bought a new device with the idea of creating a backup.

I though it would be a good idea to use ZFS on the new disk, but have run into problems trying to create a backup.

ZFS is something I have very little experience of, and my attempts at making a backup didn't work. Maybe my ZFS setup wasn't right, but I've decide to use UFS instead. Unfortunately I can't destroy the ZFS pool created.

What should I do to start again from scratch?

Can I do something like

gpart destroy -F da0

to regain access?
 
To destroy the contents of the disk, it's usually sufficient to overwrite the partition table dd if=/dev/zero of=/dev/da0 bs=1024k count=10.

Beware, everything on da0 will become inaccessible and unusable. You will have to re-initialise the partition table.

There may be some situations where there are metadata stored at the end of the disk, and you need to zap that as well, but that's not likely the case here.
 
Boot from the install disk, and from the shell do
Code:
zpool destroy <pool>
gpart delete -i <num> da0
...
gpart destroy da0
Then you may install FreeBSD on da0 using UFS.
 
To destroy the contents of the disk, it's usually sufficient to overwrite the partition table dd if=/dev/zero of=/dev/da0 bs=1024k count=10.

In this case, dd should complain that it cannot write to da0. You have to clear the ZFS pool and GPT partition first (which is then not needed.)
 
Sorry, then you do not need to do gpart destroy da0. Just delete freebsd-zfs partition, do gpart add -t freebsd-ufs da0 to add freebsd-ufs partition and run newfs to prepare to use it.
 
I would like to ask why zpool destroy is not sufficient and what exactly is ZFS label, when it can persist even after the zpool destroy command?
 
I think you are right. I remember I did no zpool destroy when the old zfs system disk was taken out of service and instead I made it
a ufs backup disk. I thought that no disk information can survive gpart destroy -F /dev/adaX. We all learn something
new all the time. Next time I will know.
 
Back
Top