I'm setting a home NAS taking it as a chance to get familiar with FreeNAS

My specs:
Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz.
OS: runs on a SSD ADATA SP600 250GB.

My Pools:

  1. NAS01. /mnt/NAS01 2x 2TB Mirror w/ 1 spare (the real backup/NAS space). The 2 dev of the mirror are WDC WD2003FZEX ; the spare is a ST2000DL003
  2. S500. /mnt/S500 1x 500GB (scratch space). The disk is a ST3500320AS There is also a 6th 1TDB disk waiting to be used...

I originally backed up some 80GB of data from another computer into an zfs dataset on an external HD. Only after that I learned such a disk can't be imported. This dataset had a snapshot created in that original computer.

I then managed to transfer the dataset into pool2 as S500/pre2012 mounted on /mnt/pre2012 (honestly, can't remember exactly right now how I did it by, but must have been through cli via zpool and ifs).

At some point I used a zfs send | recv to transfer (can I say copy?) S500/pre2012@snp1 to pool1 under NAS01/pre2012 -which unexpectedly to me was mounted under /mn/mnt/pre2012.

After testing and getting somewhat familiar with SMB shares and checking I could have it working with all my MACs & Linux boxes I decided it was time to organize pool 1 (NAS01) into different datasets according to what I'm planning to store and how to use it. I created these datasets using the GUI.

The result is the following structure of root datasets (as per zfs list):

NAS01/PRIVATE 55.0G 1.62T 20.5G /mnt/NAS01/PRIVATE
NAS01/PRIVATE/Documents 573M 1.62T 573M /mnt/NAS01/PRIVATE/Documents
NAS01/PRIVATE/Fotos 33.9G 1.62T 33.9G /mnt/NAS01/PRIVATE/Fotos
NAS01/PUBLIC 16.9G 1.62T 96K /mnt/NAS01/PUBLIC
NAS01/PUBLIC/Library 57.6M 1.62T 57.6M /mnt/NAS01/PUBLIC/Library
NAS01/PUBLIC/Movies 15.5G 1.62T 15.5G /mnt/NAS01/PUBLIC/Movies
NAS01/PUBLIC/Music 1.05G 1.62T 1.05G /mnt/NAS01/PUBLIC/Music
NAS01/PUBLIC/Software 299M 1.62T 299M /mnt/NAS01/PUBLIC/Software
NAS01/pre2012 71.3G 1.62T 71.3G /mnt/mnt/pre2012
S500 268G 178G 136K /mnt/S500
S500/SharedScratch 196G 178G 196G /mnt/S500/SharedScratch
S500/pre2012 71.4G 178G 71.3G /mnt/pre2012

SharedScratch has been working well under SMB in my network -while I used only guest account access and nobody:nobody ownerships. But that's another story.

Currently, the structure of S500/pre2012 ( or rather that of of its mount point) is:


It also had other folders like Music that I managed to mv (not w/o quite some pain) to NAS01/PUBLIC/Music, say.

All these folders under S500/pre2012 are owned by user admin. It's the only additional user I created.

My problem seems to be related to privileges issues, although I sudoed into root when issuing commands like the following:

root@freenas[/mnt/S500/pre2012]#mv 120 /mnt/NAS01/PRIVATE/Documents
mv: chmod: /mnt/NAS01/PRIVATE/Documents/120/30/home/msantos/Reports/Apoptosis: Operation not permitted
mv: chmod: /mnt/NAS01/PRIVATE/Documents/120/30/home/msantos/Reports/.Designability.March.2005.tex.swp: Operation not permitted
mv: /mnt/NAS01/PRIVATE/Documents/120/30/home/msantos/Reports/NMR: File exists
mv: /bin/cp 120 /mnt/NAS01/PRIVATE/Documents/120: terminated with 1 (non-zero) status

The folders' permissions are:

root@freenas[/mnt/S500/pre2012/120]# ll ; ll /mnt/NAS01/PRIVATE/Documents/120
total 26
drwxr-x---+ 4 admin admin uarch 4 Sep 22 21:03 ./
drwxr-x---+ 4 admin admin uarch 4 Sep 22 21:03 ../
drwxr-x---+ 3 admin admin uarch 3 Sep 22 21:14 30/
drwxr-x---+ 5 admin admin uarch 5 Sep 14 15:56 80/
total 2
drwxrwx---+ 3 root admin uarch 3 Sep 22 21:57 ./
drwxrwx---+ 3 admin admin uarch 4 Sep 22 21:57 ../
drwxrwx---+ 3 root admin uarch 3 Sep 22 21:57 30/

As you can see the move failed to copy everything, although it did copy something! That's even more worrisome bc it's a move!

Here some permissions of destination folders:

root@freenas[~]# ls -lF /mnt/NAS01
total 9
drwxr-xr-x+ 5 admin admin 6 Sep 22 19:16 PRIVATE/
drwxrwx---+ 6 root wheel 6 Sep 22 15:30 PUBLIC/

root@freenas[~]# ls -lFd /mnt/NAS01/*/*
drwxrwx---+ 3 admin admin 4 Sep 22 21:57 /mnt/NAS01/PRIVATE/Documents/
drwxrwx---+ 15 admin admin 19 Sep 22 20:37 /mnt/NAS01/PRIVATE/Fotos/
drwxrwx---+ 2 nobody admin 4 Sep 22 21:03 /mnt/NAS01/PUBLIC/Library/
drwxrwx---+ 5 nobody admin 38 Sep 22 20:13 /mnt/NAS01/PUBLIC/Movies/
drwxrwx---+ 17 nobody admin 36 Sep 22 20:41 /mnt/NAS01/PUBLIC/Music/
drwxrwx---+ 9 nobody admin 9 Sep 22 21:09 /mnt/NAS01/PUBLIC/Software/

All those children datasets of PRIVATE and PUBLIC are being shared via SMB. The first one should only be accessible to admin user. Hence those permissions/ownerships.

My questions: How can I reliably use mv here to populate these datasets? I don't understand how to use zfs send/ recv to copy data into a specific datasets/folder. That's why initially when I tried I ended up with a copy of pre2012 under /mnt/mnt/ which the GUI doesn't let me use as a share. Hence my using mv.

Furthermore, since I'm trying to sort different folders of the original dataset into different dst datasets, I can't see how zfs send/recv can do that. Is that possible?

I'm a bit frustrated at this point. Either I did things totally wrong or I'm missing a fundamental idea of how FreeNAS is supposed to be used...or both :-/ In any case, I didn't expect that populating the server with data would be so complicated.

Again, this is just after my first 1.5 weeks in toying with FreeNAS. Sorry for the lengthly post.

I'm stuck right now. Any hint will be appreciated.

Thanks in advance.

1 Answer 1


Solved... sort of.

From what I learned from threads like this, this and this it could have been a combination of problems:

  1. When creating the dataset I selected as type SMB instead of Generic. That's ok for a samba share, but comes at a price: FreeNAS immediately assigns it a case sensitive mode to it, and one cannot change it.
  2. chmod vs smb acl: things done at the cli level (chmod) aren't the same as/totally compatible with what the GUI does.
  3. If using rsync you may want to use it as rsync -A --no-perms .... This isn't an option I knew about (not available in OSX for instance). What -A does is playing nicely with the ACL entries.
  4. Make sure you sudo to root as sudo su -l

My final solution has been to redo some of the folders where I do want case sensitivity, e.g., PRIVATE/Documents and share it as a NFS share version 4 and force all users to mount it as (the username you assigned to this share -admin in my case); same for group.

This allows to assign the dataset type as generic and then case sensitive. It also seems faster than a smb share.

It might not be optimal. But as I'm mostly using it with Mac and Linux (rarely Windows) that seems fine.

I mounted the share through cli on my Mac: mount -t nfs nas:/mnt/NAS01/PRIVATE/Documents ~/Desktop/NFS. I didn't try using the Finder (Go to Server...) as the first time (see PS not below).

The Finder translates that desktop folder NFS -> Documents. However on the cli, you still see it as NFS.

PS: This was my second try setting up an NFS share and use a Mac client all seems ok so far. I didn't see the weird problem of the first time, where the finder falls on endless loop when copying a file to the share and starts creating endless copies of it

enter image description here

You must log in to answer this question.

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