Auto move from Pool1 to Pool2?

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi,

I am looking to use Freenas as a storage box for a friends camera server. The box has six WD Red (4tb) and is in use as a file server for 4 workstations - not much activity on the unit.

The camera server has 45 cameras on it (2-4mp units). I have tried setting the freenas box with the spinning disks as the destination but the camera software keeps giving hard drive error messages indicating it is not fast enough. I spoke to the camera software vendor & they said that I need at least 115 megabytes per second - I think gigabit is close enough (or I would think).

So I took a windows PC with a SSD, setup a share, then setup the camera server to point to the windows SSD share. Everything seems to work great.

My thought was to buy a SSD for freenas, setup a pool on that drive, then try to figure out how to 'auto move' everything on the SSD pool onto the spinning disk pool.

Any ideas on how I can make that happen? Ideally it would copy the file from the SSD, then delete the file off the SSD so it never runs out of space.

Thanks,
Rich
 
Joined
Oct 18, 2018
Messages
969
I spoke to the camera software vendor & they said that I need at least 115 megabytes per second - I think gigabit is close enough (or I would think).

So I took a windows PC with a SSD, setup a share, then setup the camera server to point to the windows SSD share. Everything seems to work great.
Can you say more about your setup? Are you using a SLOG? Are you using RAIDZ2 or Mirror vdevs? How are you connecting to the share? WIFI? 1G?
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi,

Sure - This is the system in my sig Freenas#1 - I gave it to them. No slog drive (might have to read what that is).

The connection is hard wired Cat6 over gigabit network. It is a RaidZ2. Using SMB Sharing.

FreeNAS-11.1-U7

Thanks for the help.

When I do a file transfer of a large file from the Freenas box to a hardwired PC, I am getting 95-100mb/s - 800-920Mbps
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Sure - This is the system in my sig Freenas#1
X10SL7-F / Xeon E3-1231V3 / 32GB Crucial ECC Unbuffered DDR3
SeaSonic 650 PSU, 6x 2TB drives & 8x 6TB (WD RED)
All 14 of those drives are in one pool? Are the 2TB drives also WD Red?
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi - I need to update that - the machine has 8x 6tb WD Reds - the 2tb drives are in box #2. Sorry that was confusing.

I have a single pool, of 8 x 6tb drives.

Thanks,
Rich
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I need to update that - the machine has 8x 6tb WD Reds
That rig should be able to handle that speed requirement, unless it is a lot of random IO or small files involved. What does the data look like once it is placed on disk? Are these cameras downloading individual time-slice files?
This is something that might be IOPS constrained by the number of simultaneous writes to different files.

As for your original question, you can make a SSD pool and have the cameras write there. From there, you would need to create a script to be run on a schedule to move files from the SSD to the main pool. FreeNAS doesn't have a built-in function for that, but it does have a scheduler that would allow you to run a script on a recurring basis. If the cameras are dumping individual files into the SSD pool, you could create a script that would move those files based on age. Once it was configured, it should run fine, but you would also need to check the main pool time to time to make sure it isn't getting full and either copy those files to a third location or delete them.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
115MB/s as a minimum isn't really comforting for a 1Gb/s LAN.
Is this number really accurate?
To push the discussion further, it will take about 3.6 days before you fill your entire pool. How long is the data supposed to be retained for?
I think what you are after is some kind of circular buffer technique that will keep video for the x last hours or days and older content will get recycled.
If that's the case, I am not sure ZFS and Freenas is the proper use case for such scenario.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
I would also add that having only one vdev will cause significant performance issue if 115MB/s is sustained when trying to read back from it.
For that, I would prefer you break it into 2 vdevs but that also means higher drive count.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I think what you are after is some kind of circular buffer technique that will keep video for the x last hours or days and older content will get recycled.
If that's the case, I am not sure ZFS and Freenas is the proper use case for such scenario.
True. FreeNAS and ZFS is not always the solution.
Any ideas on how I can make that happen?
It might be better to use a Linux or even a Windows system with a regular hardware RAID controller.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
Hi,

So it is 45 cameras - motion based some it could be quiet a bit of data being sent at the same time. The DVR gets the data, sets it to record, and that data is sent to the Nas.

I have had it running for a good chunk of today to the SSD on the windows PC - it is not as high end as the specs on the freenas box.

I know if i were to try to point all 45 cameras at a single spinning disk it would give the same hard drive error.

I am a bit confused - if I add a 256 SSD as a slog drive, would the data initially write to that drive then get moved to the rest of the pool?

I think that would work well - if it works like that.

Thanks,
Rich

That rig should be able to handle that speed requirement, unless it is a lot of random IO or small files involved. What does the data look like once it is placed on disk? Are these cameras downloading individual time-slice files?
This is something that might be IOPS constrained by the number of simultaneous writes to different files.

As for your original question, you can make a SSD pool and have the cameras write there. From there, you would need to create a script to be run on a schedule to move files from the SSD to the main pool. FreeNAS doesn't have a built-in function for that, but it does have a scheduler that would allow you to run a script on a recurring basis. If the cameras are dumping individual files into the SSD pool, you could create a script that would move those files based on age. Once it was configured, it should run fine, but you would also need to check the main pool time to time to make sure it isn't getting full and either copy those files to a third location or delete them.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
So I dont think that could be accurate

This is what the chat tech said: please note that nas is not recommended since it in general has much slower read/write speed than HDD. the minimum write speed is 110mb/s or above for compatibility with our systems whether it is dss or nas. the maximum number of cameras that can record to a hard drive would be determined by the resolution and frames per second of the camera. see chart here (https://snag.gy/tZxbne.jpg)

Watching now - the current activity shows a range of 9MB/s to 35MB/S on the SSD drive which is gettting the camera data written to it.

The camera software will overwrite old data as it runs out of room on the disk so I think that would still work on a NAS - even if it doesnt I can just delete older data when I get the 80% freenas capacity email.

The issue is I think I need some sort of SSD to help with the writes as it works with a windows share.

115MB/s as a minimum isn't really comforting for a 1Gb/s LAN.
Is this number really accurate?
To push the discussion further, it will take about 3.6 days before you fill your entire pool. How long is the data supposed to be retained for?
I think what you are after is some kind of circular buffer technique that will keep video for the x last hours or days and older content will get recycled.
If that's the case, I am not sure ZFS and Freenas is the proper use case for such scenario.
 

RichTJ99

Patron
Joined
Sep 12, 2013
Messages
384
True. FreeNAS and ZFS is not always the solution.

It might be better to use a Linux or even a Windows system with a regular hardware RAID controller.


My third freenas box which is basically a VM could be turned into a Ubuntu box & I can use Rsync to backup the freenas box 1 but the freenas software has worked very well for me for years.

Knowing I am not saying the right thing, would a ZIL help or turning off writes? Slog?

The site has a generator & a UPS - so I am not really concerned with dataloss from a power outage.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you don't have any other data on this system, I would suggest re-configuring the pool into two RAIDz1 vdevs so that you can have more IOPS. It will allow the system to put the data to disk faster and you still have some redundancy. It should be roughly twice as fast as it is now.
The pool would look something like this after:
Code:
zpool status
  pool: Backup
 state: ONLINE
  scan: resilvered 1.89T in 0 days 09:08:10 with 0 errors on Sat Mar  9 17:38:21 2019
config:

        NAME                                            STATE     READ WRITE CKSUM
        Backup                                          ONLINE       0     0     0
          raidz1-0                                      ONLINE       0     0     0
            gptid/2e919d3d-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/2f292da6-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/2fb95d07-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/30514e6b-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
          raidz1-1                                      ONLINE       0     0     0
            gptid/41d3312f-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/426b7b47-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/43029d18-2c1a-11e9-af8b-00074306773b  ONLINE       0     0     0
            gptid/af54c9c6-4277-11e9-af8b-00074306773b  ONLINE       0     0     0

errors: No known data errors
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I am a bit confused - if I add a 256 SSD as a slog drive, would the data initially write to that drive then get moved to the rest of the pool?
A slog (Separate Log) device is only used for synchronous writes and most writes are asynchronous which are cached in RAM on FreeNAS, sync writes must be committed to stable storage, so that is why you need a SLOG if you are doing sync writes and you don't need slog if you are not.
 
Top