Using file-based pools

Status
Not open for further replies.

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
I am going to be building a 36 drive FreeNAS box soon. I've been playing with a box with 4 physical drives, but I want to see some of the ins and outs of managing that wide of a vdev.

I know FreeBSD/ZFS supports file-based storage and I know that can't be set up in the FreeNAS GUI, but can I do this with some command-line work?

Thanks!

What I have so far:

dd if=/dev/zero of=filename.img bs=1k count=1 seek=100M
zpool create nameofzpool /absolute/path/to/filename.img
zfs create nameofzpool/main
 
Last edited:

tvsjr

Guru
Joined
Aug 29, 2015
Messages
959
Reading into your post a bit... please tell me you aren't considering a 36-drive vdev?

As far as management, there's really nothing special or different about managing 4 drives or 40... just that you end up with multiple vdevs, which can easily be configured in the GUI.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Maybe he said vdev but was thinking pool.
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
Sorry about the mix-up of terms. No, I will not be making a 36 drive vdev. :p That would be crazy. At most RAIDZ2 8-12 wide. The only reason I would even venture that far out is because the entire FreeNAS box will be replicated offsite to another FreeNAS box. Ideally, I'd like to stay about RAIDZ2 8 wide.

I'm going to get very little time to get this box configured before it goes into production. So I was hoping to practice a little using file-based storage. it has no practical use case, except as a learning tool.

:) So does anyone know how to emulate 40 storage devices using files?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Sorry about the mix-up of terms. No, I will not be making a 36 drive vdev. :p That would be crazy. At most RAIDZ2 8-12 wide. The only reason I would even venture that far out is because the entire FreeNAS box will be replicated offsite to another FreeNAS box. Ideally, I'd like to stay about RAIDZ2 8 wide.

I'm going to get very little time to get this box configured before it goes into production. So I was hoping to practice a little using file-based storage. it has no practical use case, except as a learning tool.

:) So does anyone know how to emulate 40 storage devices using files?
...why not use VMWare Player, and create 40, say, 10GB "drives" virtualized? SHould work fine for testing purposes.
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
Good idea, but we are not a VMWare shop and I didn't want to spend the time setting up a ESXi server. or a RHEV machine.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Good idea, but we are not a VMWare shop and I didn't want to spend the time setting up a ESXi server. or a RHEV machine.
Are you messing with me right now?

No one said anything about ESXi, and any competent person with any equipment ("not a VMWare shop" lol) set should be able to set up VMWare Player, or Virtualbox, or whatever else is desired in ten minutes or less. I assume you will be able to manage. No hypervisor is even remotely necessary for this. Whatever your operating systems are, be it Windows or what not, just put a non-hypervisory VM over it, which is free to download, and you'll be set in 10 minutes. "VMWare Player" (or "VMWare Workstation PLayer", which is pretty much the same thing) is the piece of software I'd recommend.
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
Thanks, I am not messing with you. I'm just a mid-level admin trying to get this running without introducing another layer. If FreeNAS can not use ZFS file-based devices, that is fine. I was just asking if it were possible and to see if anyone had tried it yet.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Sorry about the mix-up of terms. No, I will not be making a 36 drive vdev. :p That would be crazy. At most RAIDZ2 8-12 wide. The only reason I would even venture that far out is because the entire FreeNAS box will be replicated offsite to another FreeNAS box. Ideally, I'd like to stay about RAIDZ2 8 wide.

I'm going to get very little time to get this box configured before it goes into production. So I was hoping to practice a little using file-based storage. it has no practical use case, except as a learning tool.

:) So does anyone know how to emulate 40 storage devices using files?
Make sure to do a proper hardware burn-in. I don't know if there's much difference between managing 4 drives and 40 drives. I try to keep a spreadsheet that correlates hotswap bay numbers in the chassis with drive serial numbers. One more idiot test to prevent pulling the wrong drive.

That said, you may not like the result if you're using this "file-based storage" for virtual hard disks. Mirrors are better suited for that sort of task.

I always try to pad my testing phase as much as possible. Don't rush into production and don't be afraid to push back against management a bit to avoid going off half-cocked.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Thanks, I am not messing with you. I'm just a mid-level admin trying to get this running without introducing another layer. If FreeNAS can not use ZFS file-based devices, that is fine. I was just asking if it were possible and to see if anyone had tried it yet.
If you're using a type2 hypervisor, create a bunch of virtual hard disks as DrKK suggested, attach them to the FreeNAS VM, then created your zpool as you normally would.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
If you're using a type2 hypervisor, create a bunch of virtual hard disks as DrKK suggested, attach them to the FreeNAS VM, then created your zpool as you normally would.
Right. This is really very simple.

You download VMWare (Workstation) Player for Windows (or whatever). You have the FreeNAS .iso on hand. In the VMWare, you'll make 20 or 40 or whatever small "drives" (say 10GB apiece or whatever you like---make sure you turn off in the advanced setting the 2GiB allocation for swap as this is useless and significant in this case). These drives will appear as ad0, ad1, etc... in your virtual FreeNAS. And you can simulate a wide pool/vdev to your heart's content.

I have been thinking of writing a guide on this, actually. Let us know if you manage to work it out. It's one of these things that easy/obvious how to do it if you're messed with type 2 hypervisors a lot (i.e., not ESXi), and maybe isn't obvious at all if you've never done that.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
...or, if you'd rather not use VMWare for whatever reason, you can use VirtualBox instead.
Right. The procedure is identical, and easily done on any of these big name VM solutions that offer a type-2 hypervisor solution.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I am going to be building a 36 drive FreeNAS box soon. I've been playing with a box with 4 physical drives, but I want to see some of the ins and outs of managing that wide of a vdev.

I know FreeBSD/ZFS supports file-based storage and I know that can't be set up in the FreeNAS GUI, but can I do this with some command-line work?

Thanks!

What I have so far:

dd if=/dev/zero of=filename.img bs=1k count=1 seek=100M
zpool create nameofzpool /absolute/path/to/filename.img
zfs create nameofzpool/main
So what you describe and what commands you write are 2 different things. Yes zfs can be piped to to and from a file. That's what your commands show. What it sounded like you asked for was a way to emulate the creation of 36 drives so that freenas can lay down zfs across all 36 "drives", hence the suggestions to use some sort of hypervisor. I believe you can also create drives within freebsd and you should be able to use them in freenas.
https://www.freebsd.org/doc/handbook/disks-virtual.html
 
Status
Not open for further replies.
Top