Temporarily Moving Chunks To Other Storage

rbeard.js

Member
Aug 11, 2022
64
2
13
Hi there,

I unfortunately have run out of storage on my proxmox backup server. Ive tried deleting log files and clearing what I can but I still cant run garbage collection.
Ive seen some good ideas to prevent this in the future by adding quotas but I still need to get myself out of this situation first.
I cant add to my zpool as its a raidz2 with an 8 wide vdev.
Ive seen in other posts that I can symbolically link some chunks to another storage device, run garbage collection, and put them back.
I have over 200GB free on rpool. Can someone help me with the commands to move the chunks, link them, and move them back after?
My rpool is names as such and my main datastore zfs pool is named carbon

Im not really sure how this happened as with weekly GC I was keeping 1TB free. Maybe GC didnt run or something for a week or two, idk

Any help would be amazing. Thank you
 
Last edited:
I was able to resolve this issue moving the chunks to my rpool in a temp folder. You can also mount an external drive and move the data there. I just used rpool because this system was remote.

Code:
mv "chunk" /rpool/ROOT/pbs-1/temp/

then in the chunk folder located at /mnt/datastore/"datastore"/.chunks I used
Code:
ln -s /rpool/ROOT/pbs-1/temp/"chunk" ./"chunk"

this creates a symbolic link between the two locations so the data isnt missing when GC is run

If anyone has a way to move multiple chunks at once or make multiple links at once, this would make things less tedious but it did work for me and I was able to run a garbage collection successfully.

As mentioned in another forum, Im adding a quota to the pool to prevent this from happening again:

Code:
zfs set refquota=850G rpool/encrypted_data
 
If anyone has a way to move multiple chunks at once or make multiple links at once, this would make things less tedious but it did work for me and I was able to run a garbage collection successfully.

Disclaimer: I haven't tested this with real chunks! Using it is your risk ;)

To answer your question: it depends whether you mean "chunks" as real chunks (files in directories) or directories themselves.

For reference, my directories with chunks are in the directory /pool1/store1/.chunks
In the above dir there are 65536 subdirectories (from 0000 to ffff).

Let's say you want to move directories 0000, 0001, 0002 to /rpool/ROOT/pbs-1/temp under the condition that /rpool/ROOT/pbs-1/temp is empty:
mv 0000 0001 0002 /rpool/ROOT/pbs-1/temp

Now (still being in /pool1/store1/.chunks) we want to make symlinks with one command:
ln -s /rpool/ROOT/pbs-1/temp/* .
Note at the end of the command: asterisk space dot

Test before real use!