Resize ZFS pool after running out of space (PBS datastore full)

mhert

Well-Known Member
Jul 5, 2017
96
3
48
45
Over the weekend my pbs datastore is running out of space and now I'm unable to run a garbage collection.

This is the output of discus:

1740404696057.png

and this is the output of zpool list:

1740404742465.png

What is the meaning of FREE and second question: How could this help me out of my dilema? Is is possible to use the free space or resize the pool in a way which make a garbage collection possible?

Regards,

itiser
 
Last edited:
For me it means exactly what is says: You have used 14.4 TB of 14.5 TB available disk space and thus can't continue (the backup user used by PBS can't use the last inch of the volume because that's left free for the root user). How did you build your ZFS pool? Is it a RAIDZ or a mirror? In any case you should be able to add further disks to reszize the pool to have more space, but depending on the pool layout your options are different.

Another option might be add another larger datastore (e.G. via NFS/CIFS or an external hard drive) sync everything on the existing datastore to it with a local sync job, run garbage collection on the temporary datastore. Afterwards destroy your old datastore and resync everything from the temporary datastore like proposed by Dunuin in this thread:


Another alternative would be to use zfs send/receive (if your current datastore and your temporary location have zfs) or more hacky approaches like this one (be warned: There is a high chance by loosing data if you do something wrong):
Or this one (another more hacks again think twice before executing a command, only do it if you are sure about the possible consequences):
 
Last edited:
  • Like
Reactions: UdoB
Yes setting a quota to something like 80% of the pool size is also a good idea because then you have some breathing room if the quota limit is reached: You can then temporary remove the quota, remove data as needed and add it again.