Shrink RAIDZ volume non-destructively?

RJC

Cadet
Joined
Dec 6, 2015
Messages
2
I currently have a 5x3Gb array, RAIDZ type. I had allocated (some years ago, the volumes have migrated through a couple hardware upgrades) about 650Gb in a volume on my FreeNAS server for my macbook backups from a 500gb HDD. I am in the process of upgrading my MBP and would like to go with the 1Tb drive option...but I've allocated my entire remaining space for another volume.

I've got about 7Tb of storage used in the other volume and I obviously don't want to lose that and finding a temp storage option is kind of expensive just for one process. Hence the question...is there a way to shrink the larger volume without destroying the data already on it? Obviously if there is any appreciable risk of data loss (other than what is always there) I probably won't do this but thought I would ask.

Thanks for any insight.
 
Joined
Oct 18, 2018
Messages
969
Hi @RJC, welcome back to the forums. I think I have an idea of what you're asking but I want to be sure; some of what you wrote was hard to follow. Would you mind clarifying my questions below?

I currently have a 5x3Gb array, RAIDZ type.
I assume you means 5x3TB (Terabyte) and not 5x3Gb (Gigabit)? Also, what exactly are you using for RAIDZ? That could refer to RAIDZ1, RAIDZ2, or RAIDZ3.

about 650Gb in a volume on my FreeNAS server for my macbook backups from a 500gb HDD.
What do you mean here exactly? Do you mean that you have allocated 650GB on your FreeNAS machine to be used as backup media for your Macbook's 500GB HDD? If so, how did you allocate it?

I imagine you created a dataset, but maybe you created a zvol? Did you assign a quota or reservation to anything?

For any datasets or zvols you have exactly how big are they and how much data is in them?

I am in the process of upgrading my MBP and would like to go with the 1Tb drive option...but I've allocated my entire remaining space for another volume.
How are you backing up your MBP? Are you using Time Machine, are you moving files over yourself manually, are you using some other backup software?

Hence the question...is there a way to shrink the larger volume without destroying the data already on it? Obviously if there is any appreciable risk of data loss (other than what is always there) I probably won't do this but thought I would ask.
Generally losing data will be fairly hard; the system is set up to try to prevent data loss. Exactly how to go about what you want to do and whether you can do it in the first place will depend on the answers above. Please try to copy exact values etc from the system where possible. Screenshots can be helpful as well but be sure to expand menus where appropriate to provide all the relevant data; I'm thinking specifically about datasets etc.

Also, what version of FreeNAS are you running?
 

kennywai25

Cadet
Joined
Jun 8, 2022
Messages
8
apologies for necroing this thread. i have a similar predicament as titled, i am trying to shrink my vdev. the server currently was setup with 2x 6-disks z1 array totally 12 disks. as HDD getting cheaper and cheaper, i am trying to shrink my pool, so as to take less risk at raidz1 failure keeping me up at night ( my end goal was to end up with something like a 5 disk raid z2 ( some totally different layout ), what are the best known methods to achieve this? ( something along the lines of replication and snapshots? import and export pools? )

the data i have on the server is non-critical, but i would like to keep my ubuntu and other VMs ( with lots of docker containers ) and i could not find out a way how to backup and restore a byhve VM properly; hence aside from rebuilding the entire pool, is there any way to shrink my vdev?

edit: i am using TNCore U13.1; i have a backup replication target server with storage enough to fit the data of my original server, if it helps...
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
what are the best known methods to achieve this? ( something along the lines of replication and snapshots? import and export pools? )
Backup, destroy and restore is the best known method. Because it is the SOLE method.
So the backup server will definitely be of use.
 

kennywai25

Cadet
Joined
Jun 8, 2022
Messages
8
seems so i guess. can you help share the related cli commands to do this?
i've only done everything via the gui..
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Do it in the GUI - no point in the CLI
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
More specifically, you set up a replication task in each direction. Either one-off, or run manually a regular scheduled task.
 

kennywai25

Cadet
Joined
Jun 8, 2022
Messages
8
in an effort to backup my VM ( not critical data, just tons of containers which is a huge hassle to re setup ), i have created and successfully replicated the zvol for my VM to my backup server. my problem now is i am unable to spin up the VM on the backup server. ( i intend to do this as a proof of concept of reviving the VM before destroying and recreating the zpool on my main server with fewer disks )

i went through the usual processes for creating a VM, using the zvol as "an existing disk" and leaving the "mount iso" empty. am i doing anything wrong? i havent been able to come across a guide for this purpose.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What do you mean by "unable to spin up"? What is visible in either the VNC or the serial console depending on your configuration?
 

kennywai25

Cadet
Joined
Jun 8, 2022
Messages
8
thanks for the help in advance!
below is what i see when trying to start my dietpi VM on my backup server ( which hosts my pihole on my main machine ). it does not shows the dietpi login screen

dietpi.jpg


below is another screenshot of the vnc of my ubuntu server which hosts all of my docker containers. on the main machine it shows the ubuntu login splash screen..
ubuntu.jpg


please help..
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Run fsck -y or whatever Linux needs for a manual fsck as the prompts tell you. This is a Linux, not a TrueNAS issue. Put "Linux initramfs requires manual fsck" into your search engine of choice - that should give you some helpful results.
 
Top