Way back when Veeam Backup & Replication v10 was released, there was a lot of new features and functionalities focused around the Linux ecosystem, this ranged from the ability to now leverage Linux Proxies in hot add mode to protect your VMware virtualised environment, on top of that the ability to use NFS repositories, well this was possible pre v10 but it required a middle man to achieve this, the middle man I mention is where we required a Linux server to write the data to the NFS share, ideal for some smaller NAS devices. VIX for Linux was another important feature for file level restores, application aware processing etc.

The feature we want to talk about in this post though is the ability to leverage XFS as a backup repository (not new in v10) but with the ability to integrate into the block cloning technology or data block sharing feature of XFS also known as reflink. A similar story to Windows ReFS which there has been lot of content over the last few years in that space.

Using XFS and Block Cloning for a Veeam repository

As I mentioned before Windows ReFS integration came about a few years ago from a Veeam Backup & Replication point of view which brought some benefits to certain processes when it comes to the Veeam backup process. In general, what both block cloning technology enables is the ability to perform faster merges as well space less synthetic full backups.

Ultimately this will enable faster backup jobs (faster merges) and reduce space consumed when using synthetic full backups.

This post will be a short introduction into XFS and Ubuntu, we have been able to use XFS as a repository for years running on Ubuntu and other Linux distributions, this post will run through the adding a disk to an Ubuntu machine and getting things set and ready for taking advantage of this block cloning technology.

XFS as a file system is available on other distributions of Linux but the one being used here today is Ubuntu, requirements can be found here in the Veeam Help Centre.

Benefits of Block Clone for Backup Repository

I have already mentioned some of the benefits in previous sections but I think the visual concept of these benefits also are worth seeing, this YouTube video demo below is based on Windows ReFS but the concept is the same for those fast merges and space less synthetic full backups.

https://youtu.be/NndMBCDPBDY

more details from a Windows ReFS point of view is explained in this blog post.

Preparing your Ubuntu XFS repository

For the purposes of the demo I am using a virtual machine and I am going to add a disk to that virtual machine and then run through these steps, the same steps will apply for a physical Linux system to achieve the same thing.

We first need to add the new disk to our virtual machine, obviously you can use a previously added disk but you will be formatting this drive so please do take care before just running through some of the following steps especially if you are holding existing backups on the disk you are about to format.

Once added reboot the VM

Now that your system is back up and you are connected again run the following command, this will now show you your newly added disk.

fdisk -l

082020 1315 Gettingyour1

At this stage this disk is not mounted or useable, so we must run the following command, where /dev/sdc is label of your disk shown above.

Mkfs.xfs -b size=4096 -m reflink=1,crc=1 /dev/sdc

082020 1315 Gettingyour2

Next we need to create a mount point run the following command, I am using the name /backup you can choose to call this what you wish but advice is something relevant to what you will be storing in this extent.

mkdir /backup

to this point you will now have a useable disk where you can store data but on reboot this mount will be removed so we need to make it persistent across reboots. We can do this by inserting the new disk device and mount point to the following. Run the following command.

vi /etc/fstab
then hit I to insert
/dev/sdc    /backups    xfs    defaults    1 2

To commit these changes hit ESC and the following.

:wq

Now we can mount the new disk and file system using the following command.

mount /dev/sdc

Now just to confirm that you have your newly created disk and mount point type the following command.

df -h

Adding new XFS disk to Veeam Backup & Replication as a Backup Repository

Now we are ready to add the machine above into Veeam Backup & Replication so we can start sending our backups and take advantage of the data block sharing. First up we need to open the Veeam Backup & Replication console and navigate to Backup infrastructure and Backup Repositories and hit Add Repository you will then select direct attached storage and walk through the wizard below or edit if you previously had this machine added. Give the repository an appropriate name.

082020 1315 Gettingyour3

If this is a new Linux machine you will have to add the Linux box as a managed server if it already added, then it will be available in the drop down. When you add and you select populate you will see all the available paths that can be used, this also gives you the capacity and free space.

082020 1315 Gettingyour4

Next, we need to define the path to the folder we want to use for the backup repository, this is where we must remember to tick use fast cloning on XFS volumes.

082020 1315 Gettingyour5

The following screens to completion are to define the mount server, this is used for restoring scenarios so choose something close to the repository or use the local Veeam Backup & Replication server if all in the same environment. Then we have review, apply and the summary of what you have just created.

From here you can go and create your backup job and point your backups to land on the new repository. As part of the job configuration be sure to enable synthetic full. You will find this setting under storage, and advanced settings with the following window.

082020 1315 Gettingyour6

To confirm those space less synthetic full backups you can jump back onto the Linux machine and run the following command and see the space used.

dh -h

You should not be using root!

It was suggested that I should add a section on creating a specific user so that we are not just using the root account, I in fact do not just use the god mode to add the repository but I follow this process when creating or editing a repository server to be used within Veeam Backup & Replication. Aside from the obvious security issues with using root which works fine for most lab environments it is not going to be best practice for most organisations (this should be not best practice for any organisation)

Veeam only needs a regular user that has the correct permissions to be able to write to the specific repository folder. Sudo is not required and again why would it be based on the best practice I just mentioned. The best approach is to create a restricted user, set the appropriate required permissions and then set the repository folder to only that user.

I will also mention that I create my Ubuntu / CentOS boxes with a template using a more privileged account, depending on your distribution and how you are attaching disks or first starting here you may have to use sudo depending on your default access user to make the required Veeam accounts for repository use. But, the point is that Veeam does not require root access or sudo to your repository servers.

Creating the user

Useradd –d /home/veeam -m veeam
Passwd Veeam123!

(BYOP – Bring Your Own Password)

Configure the folder / repository permissions

Chown veeam.veeam /disk3/backups
Chmod 700 backups

Then when you go and add this repository server to Veeam Backup & Replication then you will add the Linux account and credentials like below

2020 08 25 18 30 27

Let’s show some savings

I am interested in people that have already gone down this route and those that are seeing some good savings from using XFS and Reflink. I know a number of Service Providers that have gone down this route. My ask is that if you can share your results and show us the savings. If you mail them to me Michael.Cade@veeam.com I will upload the results here to show the benefits from a real life scenario rather than just lab testing.

Leave a Reply

Your email address will not be published. Required fields are marked *