Trying to set up ZFS for the first time (ZFS on Linux)

Status
Not open for further replies.

tatsu

Cadet
Joined
May 21, 2017
Messages
3
Hi all !

Fist post on this forum. hope this is in the right section.

I'm an ubuntu user trying to set up my first ZFS cross drive partition.

I can't quite figure it out.

in fact the end goal is to boot my emulated hardware pass-through windows on this partition https://forum.level1techs.com/t/nee...passthrough-on-ubuntu-3930k/115090/43?u=tatsu

as you can see I've got a setup with 1SDD (256G) and 3HDD (1T 2T & 4T). all are under the GPT partitioning scheme and Ext4.

So far I've run (as root) :
Code:
zpool create -f my-pool /dev/sdd1


making the 1T drive a ZFS partitioned drive (as i understand it)

I've also split my SDD main partition into two with most of the space for an empty ext4 partition that'll be dedicated to being part of the ZFS partition.

my current output for 'fdisk -l' is :
Code:
Disk /dev/sda: 223,6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F536857C-7D12-4852-93D5-8FF582CA348D

Device		Start	   End   Sectors   Size Type
/dev/sda1	  2048   1175551   1173504   573M EFI System
/dev/sda2   1175552  94713855  93538304  44,6G Linux filesystem
/dev/sda3  94713856 468860927 374147072 178,4G Linux filesystem


Disk /dev/sdb: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 74C34D56-67A9-466D-A8E4-7921DFF86FEA

Device	 Start		End	Sectors  Size Type
/dev/sdb1   2048 3907028991 3907026944  1,8T Linux filesystem


Disk /dev/sdc: 3,7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 33D9F960-68B6-464E-8263-4E5029285086

Device	 Start		End	Sectors  Size Type
/dev/sdc1   2048 7814035455 7814033408  3,7T Linux filesystem


Disk /dev/sdd: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8CC46482-A7D2-6A4F-AFE7-2A02232D7D27

Device		  Start		End	Sectors   Size Type
/dev/sdd1		2048 1953507327 1953505280 931,5G Solaris /usr & Apple ZFS
/dev/sdd9  1953507328 1953523711	  16384	 8M Solaris reserved 1


here's a screenshot of my drives' view in nautilus :

upload_2017-5-21_19-28-6.png


and in disks :
upload_2017-5-21_19-29-13.png


I'm stuck here because the command :
Code:
zpool create tank -o mountpoint=/media/tank -oashift=12 /dev/sdd1 log /dev/sda2 cache /dev/sda3

returns :
Code:
property '--mountpoint' is not a valid pool property



I donnot understand this. how do I create a ZFS partition that is across a small bit of SSD and an entire Terabyte HDD?

Thanks for any and all help.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
This really isn't a good idea and will result in strange behavior and data loss. This is also the freenas forums. We know about zfs but zfs on Linux is something different. Try a Linux forum they can probably help. Make sure to also read up on some best practices.

Sent from my Nexus 5X using Tapatalk
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
The thing that is confusing is I don't think you know what you are doing. You talk about zfs, partitions and ext4. This isn't normal. With zfs you give the filesystem the entire disk and don't share it with anything else.

Are you even using freenas or just Linux?

Sent from my Nexus 5X using Tapatalk
 

tatsu

Cadet
Joined
May 21, 2017
Messages
3
yes,
as stated and tagged ("noob")... I'm new to this. I'm under the impression that ZFS's doesn't have fakeRAID/RAID-like as it's sole capacity. Having a mountpoint in a non ZFS partition is, seemingly, something it can also do, but of course it is very likely i'm misunderstanding. Perhaps you may run me through what, amongst the possible, ZFS setup, the linked guy has exactly?
I may then use the correct terms and abstract concepts? as for Linux/Freenas : I'm on ubuntu (this also was in the OP ). ubuntu is a a distribution of linux so no I am not on Freenas.

may I please have some ZFS-related help or is not being segregationist enough an issue here? ;)

(And if we're to think this way, Are we not of closer bloodline amongst Linuxers and FreeBSD-ers then amongst either and windows-ers? )
 
Last edited:

scwst

Explorer
Joined
Sep 23, 2016
Messages
59
Okay. Let's take a huge step back.

If I understand you correctly, you have one smaller SSD for your operating system, and three HDs for data storage (1, 2 and 4 TB). We'll ignore the SSD for the moment and see what we can do with the HDs.

For ZFS to be of much use, it must have access to more than one hard drive to provide redundancy (if one hard drive fails, the data is still on the others). Also, ZFS likes to have the complete drives, and wants all drives to be the same size. So 1, 2 and 4 TB are are not ideal.

For a simple, lets-get-started version, my suggestion would be to mirror the 2 and 4 TB drive. ZFS will only use 2 of the 4 TB drive, and so you'll have 2 TB of useful, mirrored space. I would suggest that should be your first setup.

As for background reading - I'm not sure about the link you provided, I think you might want to start with Aaron Toponce's famous series at https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/ . It's a little dated, but still one of the best intros for Linux around. Also, there is now a book out for ZFS on Linux - https://www.amazon.de/gp/product/154462204X - though I haven't read it yet. You'll probably want to read one or the other (or both) first.

And this really is probably not the right forum for Linux questions ;).
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can also read the threads linked in my signature. They are all filled with great information.

Sent from my Nexus 5X using Tapatalk
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Moving to offtopic, since it has nothing to do with FreeNAS.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I have used ZFS with Solaris 10 & 11, as well as ZFS on Linux. At the command level it's basically
the same as in FreeBSD / FreeNAS. That said, there are some gotchas with ZFS on Linux. (I boot
3 Linux computers on to ZFS root FS.)

However, @tatsu, you will need to read up and define what you want to do. See @SweetAndLow's
Recommended Reading link in his signature. I read through your postings, and it's not clear what
you want.

In general;
  • Using virtualization with your first instance of ZFS is not a good idea unless you are just learning / playing
  • Mis-matched hard disk sizes are not as useful with ZFS, unless you simply want a storage pool without any redundancy, (meaning no Mirroring or RAID-Zx)
  • Most home users don't need a SLOG or Cache device. Attempting to use such without knowing what you are doing, can actually make your storage slower.
  • Further, SLOG devices need to be specific type of hardware. Random disks or SSDs are simply un-suitable
  • Last, we here at the FreeNAS forums are pretty conservative. We want our data to last, thus, tend to use ZFS with ideal configurations. Meaning ECC memory, >=8GB of memory, and disk layouts that include reasonable amount of redundancy.
Returning to your original post, this is the correct syntax. Note the Capital O, not lower case. You are confusing
the pool properties, (which are set with the lower case o), with the initial ZFS dataset's properties, (which are
set with a Capital O). I've also remove the SLOG and Cache devices as they don't make sense.

Code:
zpool create tank -O mountpoint=/media/tank -oashift=12 /dev/sdd1


So, do some reading. Understand there is a difference between a ZFS Pool and ZFS Dataset, (which lives in a pool).
 
Last edited:
Status
Not open for further replies.
Top