How much space needed for snapshot with dump(8)

I'm doing a live dump using dump(8) with the -L flag. The dump is not stored locally but on an NFS mount. I understand that dump(8) creates a snapshot and then dumps the snapshot instead of the live file system. My question now is how much space is needed for that snapshot?

Example:

My local filesystem is using 6 GB of 8 GB. The .snap directory is in the same file system. The dump destination is on a remote file system. Am I right that the snapshot uses some kind of internal linking/referencing and need additional space only for the changes that are made to the files system while dump(8) is running? If this is correct, does this mean that I'm OK doing a snapshot of my 6 GB allocated file system when I only have 2 GB free space? As the snapshot itself will not be 6 GB (requiring at least 6 GB free space).
 
The snapshots are copy-on-write which means that only the changed blocks (when compared to the current state of the filesystem) will take additional space. If the contents of the filesystem hasn't changed from the time of taking the snapshot the snapshot itself takes zero additional space (a minor amount of administrative information has to be stored though). So yes, you can take a snapshot of a filesystem that has 6GB of used space but only 2 GB of free space.

Be careful though with snapshots because they can grow in size unexpectedly and fill the filesystem quickly. In case of dump(8) they are deleted automatically when not needed anymore.
 
Back
Top