Sistemas de Ficheiros


The virtual machine disks can be saved or used over three different filesystems, AFS, GlusterFS and local. Each one has advantages and disadvantages.

AFS

AFS is a distributed filesystem managed by DSI. It is where your files are saved when you login to the workstations in the labs.

You can save the data and access it from anywhere. Your data is also permanently stored, and will never be deleted.

Because it is distributed, running a virtual machine with a disk stored in here will be slow.

Furthermore, your account has a quota of 1GB of data. You can ask for more space by sending an email to dsi@tecnico.ulisboa.pt, but space will be an issue.

GlusterFS

GlusterFS is a distributed filesystem provided by RNL.

You can save data there and access it from any of the laboratories’ workstations. However, unlike AFS, your data is not permanently stored, and is usually cleaned when space is needed or maintenance operations occur.

Your GlusterFS home for virtual machines can be found in /mnt/sequoia/glusterfs/users/Y/Z/cluster1XXXXYZ, where XXXXYZ is your IST ID number.

It’s more efficient than AFS, but it’s slower than the local filesystem.

As an advantage, there is no formal limit on the data which can be stored in GlusterFS, meaning large VM images can be stored there, although quotas might be applied in the future.

Local

The recommended local folder to store virtual machines is /var/tmp. This folder is specific to the computer and can not be accessed from other computers. Data is also deleted at logout (but it is not deleted if a crash occurs and a hard reboot happens, unlike what would happen in /tmp).

As the folder is local to the computer you are working on, it is the fastest place where you can run virtual machines.

Options and alternatives

When choosing where and how to save a virtual machine’s disk, you have a few choices.

Save and run in an external device

This is the simplest and most reliable solution. You can run your virtual machines and have a good performance if you store them in a flash drive with at least class 10 with high capacity or if you store them in an external HDD or SSD.

The workstations only have USB 2.0, so disk read/write speeds will be capped by USB 2.0 speeds (approximately 60 MB/s).

Save in AFS or GlusterFS, run in local

If you don’t have an external device, you can save your disks either in AFS or GlusterFS, and when you need to run the disk, copy it to the local filesystem in /var/tmp.

Make sure to copy any used disk back to the original folder when you’re done so no data is lost.

This way your data is kept safe and your virtual machines will run quickly.

Use differential disks to reduce size and speed up copying

To avoid having to copy things from one place to another, you can use a differential disk, which stores only the differences in relation to a master copy in the local filesystem.

This is provided by the command rnl-virt disk create.

The differential disk minimizes space problems, as only the changes are stored, and speeds up the execution, as most of the accesses are to the master copy in the local filesystem.

Then you only need to copy the differential disk to AFS or GlusterFS instead the whole disk. This will be more efficient than using complete images when safeguarding your work. You could also save several versions of this differential disk as your development are going on.