2

I inherited a FreeNAS setup with ZFS mounts. I ran through this crash course on ZFS (no previous experience), but it doesn't answer my question.

I have this list when I run zfs list:

[root@nas] ~# zfs list
NAME                    USED  AVAIL  REFER  MOUNTPOINT
data1                  1.41T   372G   193M  /mnt/data1
data1/data             8.38G  41.6G  8.38G  /mnt/data1/data
data1/lan               530G   270G   530G  /mnt/data1/lan
data1/virtualmachines   900G   620G   651G  -

As you can see, data1/virtualmachines isn't mounted. In fact, it is exported as iSCSI to the VMWare host that uses it as a datastore. How is this setup created, and moreover, how can I mount this so I can make backups (I am in the process of upgrading our NAS).

2 Answers 2

1

You can't mount it.

data1/virtualmachines is a ZFS zvol. That means it's a block device formatted with another filesystem. In this case, it's likely exported via iSCSI and formatted with VMware VMFS.

2
  • Shouldn't I be able to mount that volume as vmfs, readonly? Something like mount -t vmfs /dev/zvol/data1/virtualmachines /mnt/vmfs -o,ro ? Jul 6, 2014 at 20:21
  • I wouldn't try to mount it at the same time it is used by the VMWare host. You will not get a consistent view of the filesystem, because the filesystem internals will change according to VMWare host operations. This causes your mount to rely on assumptions on the filesystem that are not true. However, you can make a ZFS snapshot of the volume, and then mount the snapshot as read-only. Jul 7, 2014 at 10:33
1

You can't mount it because it is a zvol block device, but you can do zfs snapshot and zfs send and zfs recv

Look up those three commands for both backups and migrating data to another zfs device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .