Unrar in TrueNAS Scale

Joined
Oct 22, 2019
Messages
3,641
Why unzip an archive in the system itself? Why is there even an archive in the system itself, isn't it better to let ZFS compress the files?
A few reasons:
  • Some of us have files from before our NAS days. 7z, RAR, and ACE, etc. Sort of like legacy, preserved artifacts. We want to keep them (and their timestamps) intact, and be able to extract them on the NAS if needed. (Rather than hunting all of them down, converting all of them, and then re-applying the modification timestamps.)
  • Inline compression isn't always enough, especially LZ4. Sometimes you want to dedicate more compression savings to a specific folder or set of files.
  • We don't want to extract all our archives and let them exist as a bunch of folders and tons of files out in the open. Especially if they are not accessed too often. (It would increase the overhead of file metadata. Think about an archived website that is comprised of thousands of files. You can contain it into a single, compressed file. That's a big difference.)
  • Some formats, such as 7z, RAR, and ZIP have internal checksums. This allows them to be easily transferred to another non-ZFS system, and still be able to ensure its integrity outside of ZFS.

The 7-zip package is small. Very small. It's a zero-cost solution, and its uses are ubiquitous for a NAS server. It should, de facto, be available to any serious NAS system, especially those that carry legacy archive files.


UPDATE: Donate money to my charity or vote for my ticket. Either works for me!
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Why unzip an archive in the system itself?
Why have a file manager (mc) in the system itself? Because doing things at the shell is often far more efficient than doing them through a network protocol, and the same is (often) true of file compression/uncompression.
Also, isn't there tar already?
Of course--but tar doesn't know how to deal with .zip, .rar, etc.
 
Joined
Oct 22, 2019
Messages
3,641
Why have a file manager (mc) in the system itself?
I like how you used "mc" as the example. You know, because TrueNAS doesn't have an integrated web-based GUI file manager... yet. (Or maybe never.) :wink:

Granted, your point still stands.
 

Saoshen

Dabbler
Joined
Oct 13, 2023
Messages
47
TrueNAS doesn't have an integrated web-based GUI file manager
which is unfortunate, as I am sure that a lot of 'newbie' truenas users (including myself) would greatly appreciate a built in, safe and supported, web based file manager, as I suspect it would alleviate a majority of reasons for people to be 'mucking things up' via ssh/cli/etc.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I like how you used "mc" as the example. You know, because TrueNAS doesn't have an integrated web-based GUI file manager.
Even if it did, I think mc would be a better comparison as a terminal-based tool. I'd presume a web-based file manager would make the issue moot.
yet. (Or maybe never.)
Well, iX did "accept" a suggestion for that, a few years back. Maybe we'll see it before the heat death of the universe.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The multi_report script will not install 7zip if it's already installed, that is why it does not try to install on a CORE system. I could also do this for smartmontools 7.4, well I do for myself at least since CORE is using v7.2 and SCALE is using v7.3. There is better nvme support in v7.4. If you want to install smartmontools v7.4 manually, PM me.

I think it's funny you were using 7zip in SCALE and realized multi_report installed it. Seems like I did something good that had more than one benefit.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
if one has a multi-gig (or whatever large arbitrary size) archive, unzipping over the network is relatively slow.
unzipping the file locally on the server, then remotely accessing those files from directly on the server, is much faster.
Isn't it better to copy the archive to the client and then unzipping it on the client?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Isn't it better to copy the archive to the client and then unzipping it on the client?
Not if you only need a part of the archive on the client.
 
Joined
Oct 22, 2019
Messages
3,641
Not if you only need a part of the archive on the client.
Or to keep that part on the server itself. (If it's within an SMB share, you'll be able to access the extracted part on the share, keeping everything on your NAS, with all its safeguards and snapshots, etc, without going back and forth from TrueNAS to a client's filesystem back to TrueNAS...)
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Or to keep that part on the server itself. (If it's within an SMB share, you'll be able to access the extracted part on the share, keeping everything on your NAS, with all its safeguards and snapshots, etc, without going back and forth from TrueNAS to a client's filesystem back to TrueNAS...)
The archive is on the NAS anyway, just compressed.
Anyway, personal preference here. More features are always welcomed... especially since it's already on CORE.
 
Joined
Oct 22, 2019
Messages
3,641
More features are always welcomed... especially since it's already on CORE.
Ironic, since it's usually the other way around. :wink:

HAH! EAT THAT, YOU SUCKERS ON SCALE! We've got something you don't have! Nanny nanny nah naaaah!!!
 

vii

Dabbler
Joined
Aug 17, 2023
Messages
13
For those who wonder why I need to compress or decompress my files when the system provides many algorithms that work fine, here's the workflow:

I work with big data AI models, so I often download training data in RAR or ZIP formats, and these files can be up to 250 GB. To work on and store them on my NAS server, I need to decompress the files first to access the data.

After receiving these files, I download them directly to my NAS server because there is not enough space on my main PC to store 250 GB and decompress them, which can double the size. I used to decompress the files on my main PC using WinRAR over the network "SMB", but recently WinRAR started causing issues, like filling up all the RAM space on my main PC or encountering network errors with slow bandwidth. In such cases, I had to start from the beginning.
.
 
Top