zfs: Use wholedisk or not?

Craig Boston cb at severious.net
Mon Aug 27 13:43:28 PDT 2007


On Mon, Aug 27, 2007 at 05:34:16AM -0700, Simun Mikecin wrote:
> Is it safe to create zpool using whole disks instead of partitioning
> (making a GPT partition)?

It depends on what you mean by "safe".  I have a couple of my machines
set up that way without problems...

> But I'm scared of what would happen if I plug such a disk on some
> other machine, that runs some other OS (Windows for example) since
> that disk will not have a valid MBR.

...however I haven't exposed the disks to a Windows monster^Wmachine to
see if it eats them.

> Will it try to restore a valid MBR and destroy a zpool in the process?

I can't say with 100% certainty, but I think so long as you answer "no"
to the prompt about writing a signature to the disk you'll be okay.

> I know that using whole disks gives the benefit that zfs will to try
> to enable disk write cache on it.

FWIW, FreeBSD, unlike Solaris, always leaves the write cache enabled
unless you explicitly turn it off, so there is no difference whether
you're using a whole disk or an fdisk/gpt partition.

Since device access is handled through GEOM, it may be impossible or at
least difficult for ZFS to tell if what you put into the zpool is a
physical disk or something else.

Craig


More information about the freebsd-fs mailing list