Using lessfs to backup or archive your favorite SAN.
One example of how lessfs can be put to work is to use it to archive the data of your favorite storage array. This is much more space efficient then using Equallogic snapshots or replication. A snapshot requires at least 100% extra storage when one wants to be certain that the backup is always valid. If you want your data to be copied to another equallogic your need at least 105% extra storage. lessfs can be used to do the job much more space efficient. The deduplication and compression that lessfs provides compresses the data in most cases at least 30% for the first copy. When a daily backup is needed then lessfs wil require very little extra storage to store a full backup.
Someone might mention that lessfs is a brand new filesystem and that he doesn’t trust his data to be stored on a new system. This fear is easily removed by creating a simple script that makes it possible to verify the data.
This is how it’s done:
Let’s say the server that runs lessfs hash connected an Equallogic snapshot on /dev/sda
The script would simply do something like:
md5=$(dd if=/dev/sda bs=1M | dd5sum – /pooldata/$VOL/$DATE/$lv 2>&1)
This would read from the Equallogic snapshot and write to /pooldata while calculating the md5 hash of the data that is read from /dev/sda. We can easily store the date, volumename and md5sum in our favorite database. This makes it possible to prove that we have a valid backup. It also makes it possible to verify data correctness after we restored the backup in case of a disaster recovery.
It is also possible to copy the lessfs data to another site. This can be done by putting the lessfs databases on drbd or by copying the databases with rsync. Compared to replication with an equallogic array this requires only a fraction of the bandwidth since the data that has to be transferred is highly compressed.