Unable to create datasets in volume

Status
Not open for further replies.
Joined
Feb 5, 2015
Messages
9
My end goal: Use CrashPlan in FreeNAS to back up my array to the cloud.

My problem: My jail was nested inside the dataset that I wanted to back up, which is a problem as I learned here. I deleted all my plugins (no major loss) and went to move the jail location. This is when I ran into an issue that I had been ignoring:
O3MjARE.png

My volume data sizes seem bogus since my upgrade to 9.3 from 9.1.2. I should have a total of ~10.5 with ~5.1 used, as indicated by the dataset below. The volume data sizes don't even seem to correspond to actual drive size. In addition, I am unable to create a new dataset that isn't nested within the existing one.

Am I missing something fundamental about the structure? Do I have a strange case? Can I fix my structure without losing my data, or is there nothing wrong? Do I need an extra drive for jails? Thanks in advance for your help.

My system:
FreeNAS-9.3-STABLE-201502050159
Intel(R) Pentium(R) CPU G3258 @ 3.20GHz
Memory 8038MB
5*3TB Seagate plus 1*4TB Hitachi in RAID-Z2
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You cannot just sum up columns and get answers. You have to understand how datasets, snapshots, reservations, etc. work.
 
Joined
Feb 5, 2015
Messages
9
I have no reservations or snapshots. Really, my question is: can I create a new dataset in that volume?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Every zpool is also a dataset of the same name, which is why your Data1 pool has a Data1 dataset. Prior to 9.3, that dataset wasn't shown, but starting with 9.3, it is. Any datasets you create will be under what I call the root dataset (and if there's a more appropriate term for that I'm all ears).

As to capacities, disks are sold in TB (10 ^ 12 bytes), while FreeNAS reports in TiB (2 ^ 40 bytes). 1 TB is roughly equal to 0.9 TiB. Your pool will therefore have a "gross" (not accounting for parity) capacity of 6 x 3 TB x (0.9 TiB / TB) = 16.2 TiB--which is exactly the sum of your 7.6 TiB used and 8.6 TiB available. The dataset shows the "net" (accounting for parity) capacity, which should be (6 - 2) x 3 TB x (0.9 TiB / TB) = 10.8 TiB. Your system shows a sum of 10.5 TiB, which is pretty darn close IMO. ZFS uses some disk space for its own purposes, which likely accounts for the .3 TiB discrepancy.
 
Joined
Feb 5, 2015
Messages
9
Every zpool is also a dataset of the same name, which is why your Data1 pool has a Data1 dataset. Prior to 9.3, that dataset wasn't shown, but starting with 9.3, it is. Any datasets you create will be under what I call the root dataset (and if there's a more appropriate term for that I'm all ears).

As to capacities, disks are sold in TB (10 ^ 12 bytes), while FreeNAS reports in TiB (2 ^ 40 bytes). 1 TB is roughly equal to 0.9 TiB. Your pool will therefore have a "gross" (not accounting for parity) capacity of 6 x 3 TB x (0.9 TiB / TB) = 16.2 TiB--which is exactly the sum of your 7.6 TiB used and 8.6 TiB available. The dataset shows the "net" (accounting for parity) capacity, which should be (6 - 2) x 3 TB x (0.9 TiB / TB) = 10.8 TiB. Your system shows a sum of 10.5 TiB, which is pretty darn close IMO. ZFS uses some disk space for its own purposes, which likely accounts for the .3 TiB discrepancy.

Thanks! I don't know what math I was doing last night--I must have been tired. That means I don't have anything to worry about with capacities.

So to solve my problem, I can either add another drive/pool, or I can create a "data" dataset and "plugin" dataset under "Data1". Is the second option even possible--can I move the data I already have down a level?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes, you can move your data "down a level", though it'll take a while. Take this opportunity to create a dataset for each share on your system. Once you've done that, log into the shell as root and do
Code:
# cd /mnt/Data1
# mv dir1 dir2 dir3 dataset1
# mv dir4 dir5 dir6 dataset2

If you're familiar with the *nix command line, you'll know that mv usually is very quick. It won't be here, because a dataset is treated as its own filesystem. What mv is doing here is copying your data, applying all the same attributes (ownership and permissions), and deleting the original. It'll work just fine, but you can expect it will take a while (on the order of hours for 5 TiB of data).

ZFS replication might be a slick alternative--I think it could be used in this application, but I don't know it well enough to know how.[/code]
 
Joined
Feb 5, 2015
Messages
9
Thanks for all the help. Here's what I ended up doing (I'm sure there was a better way to do some of this, but it all worked out in the end):
1) Delete share on Data1.
2) Detach volume Data1.
3) Rename volume (I didn't want to have all my datasets called Data1 and this made sense to an extent).
zpool import Data1 Volume1
zpool export Volume1
4) Attach volume Volume1.
5) Create 2 new datasets (Data1 and Jails). Leave as UNIX shared or mv command in next step may not work.
6) Move data with mv (I decided not to tempt fate with ZFS replication since we're talking about my life's data here).
7) Recreate share on new Data1.

This gives me the following, which is cleaner than before, allowing the jails and random FreeNAS files to not show up in my CIFS share.
KWj0bXL.png
 

moosethemucha

Dabbler
Joined
Feb 25, 2017
Messages
33
Hey FredWallace18,

Im having a similar problem, I want my jails to be on a seperate dataset. Similar to the set up in this official guide.

https://www.youtube.com/watch?v=3DnUWTliaOY

In that he creates his volume and then adds two seperate datasets to it one for his data and one for the jails - directly through the GUI. I tried the steps above and wasn't able to get the same result - It simply changed the name of my dataset to volume_1 rather than it being a sub set of it. Im am a newb; but every thing else seems to be working. This is also inhibiting me from installing plugins/jails. I was under the impression that best practice is to place your jails into a seperate dataset on the volume?

Thank You
 

moosethemucha

Dabbler
Joined
Feb 25, 2017
Messages
33
I was able to set it up, not really sure what I did but I'm now able to create Jails (which are really neat!) and install plugins.
 
Status
Not open for further replies.
Top