Additional storage for a Cozy VM


#1

Howdy folks, I just joined and was wondering if there is an option to allow for adding either a Virtual HD or a physical drive to a Virtual Box VM for Cozy?

The default image is 4gbs but I am quickly running low on that.


#2

Hello @Salvorin,

Please note that we don’t recommend using the VirtualBox image in production. It’s an easy way to test Cozy, but if you plan to use it in production, don’t forget to update the OS and install security tools like firewalls and so on.

If you want to add more space to the VM, you can resize it using VBoxManage and Parted. Or you can mount an external drive from your local network and move the database to this partition.


#3

Hi, Thanks for the reply.

I am still just testing out the new version, since the last one i used was over 2 years ago.
Is the VboxManage, the CLI that I found here: https://www.virtualbox.org/manual/ch08.html ?

Also, a similar question: Can I just mount a USB stick, for the PI version of Cozy?
It doesn’t seem to auto mount.


#4

Yes, it’s a command line tool that allow to manage your VB images with a lot more options than the GUI.

The Pi version of Cozy is built on Raspbian. The udev rules for auto-mounting an USB device are probably missing, but you should be able to mount it by following any of the tutorials available on the Internet.


#5

@Clochix Hello again,

I was able to mount the USB flash drive and set it up in fstab, but I don’t see it showing up on the Cozy page.

Is there an additional step that I need to do?


#6

Hello @Salvorin,

Sorry for the misunderstanding. The default Cozy applications don’t allow to acess the file system of your server. Cozy uses a virtual file system, stored inside its database.

To access the files on your disk, you can use Cloud Commander. It’s a third party application we ported to Cozy. It’s available in the applications repository. But keep in mind that:

  • you may hit some access rights limits: every application is run using its own UNIX user, so Cloud Commander will only be able to access files the user cozy-cloud-commander can read.
  • Cloud Commander won’t be available in Cozy V3. The next major version of Cozy, coming this year, will only allow client-side applications.

#7

@Clochix Huh, that seems very limiting, I guess there’s a backup option for this, ‘Virtual file system’.
So, if the initial SD card gets corrupted, then you need to rely on this backup, and hope it a recent one.

I have read a bit on moving the database to a USB drive, but again that can lead to relying on a backup if things go haywire. I don’t know the reasoning behind this, but it seems kind of backwards.


#8

In Cozy, everything is a document and every documents are stored inside the database. A filesystem is nothing else that a specialized kind of database. Whether your files are stored inside the database or on the filesystem, you will need a backup, because, if your disk get corrupted, the way files are stored is not important, the risk of loosing data is the same.

Anyway, in Cozy V3, the next version that we are working on, you will be able to select how your files are stored: inside the database, on the filesystem or on a remote storage provider.