Creating dataset can destroy existing data

Status
Not open for further replies.

glipman

Dabbler
Joined
Oct 31, 2012
Messages
21
Steps to reproduce:

Assume your volume is on /mnt/VOL1

  1. On this volume create a new directory /mnt/VOL1/TEST1 (can be done in the Shell or in my case through a Samba share)
  2. Create/copy files in that folder
  3. Create a new dataset with name TEST1 (I remembered/decided I wanted it to be a dataset)
  4. Result: all existing data in /mnt/VOL1/TEST1 is erased
Of course it is not the smartest thing I am trying to do here but if it so easy to destroy data using the interface FreeNAS should refuse or at least warn if the mount-point for the dataset already exists.

Side note: because the data came from another volume that was snapshotted restoring it from the snapshot was a breeze. Hurray ZFS.

(tested in 8.2.0 and 8.3.0RC2)
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
Have you tried deleting your test dataset to see if the old data is still there? That's generally how mount points work in *nix. They don't delete data in folders, they just hide it.

Note that I haven't bothered to test this, so it's quite possible datasets don't "mount" the same way regular drives do.
 
Status
Not open for further replies.
Top