Virtual disk (.qcow2 or .raw) on Google Drive

Hi,

Loving rclone! :+1:

My first post, did some googling to try to find a solution with no luck.

Successfully installed and configured on my PVE home lab (Debian Virtual Environment). I have mounted the drive, can create files/folders and backup Virtual Machines there with no problems. Thank you for amazing documentation and "rclone config" step by step configuration.

Issue I have is when trying to created virtual disk image (.raw or .qcow2) on that drive using pvesm I'm getting "operation not permitted" message. Could it be blocked by Google? See code below:

[ICODE]
root@pve:~# pvesm alloc gdrive 101 vm-101-disk10.raw 1000G
Formatting '/mnt/pve/gdrive/images/101/vm-101-disk10.raw', fmt=raw size=1073741824000
unable to create image: qemu-img: /mnt/pve/gdrive/images/101/vm-101-disk10.raw: Could not resize file: Operation not permitted
[/ICODE]

Any suggestions?

Thanks

Karol

hello and welcome to the forum

you have not supplied any of the requested information, makes it hard for us to to help you.

Thanks asdffdsa, sorry just noticed the whole post instructions (working on a small screen).

Version: rclone v1.53.1

  • os/arch: linux/amd64
  • go version: go1.15

OS: Debian, x64 (Proxmox)

Cloud Storage: Google Drive

Config file:

[gdrive]
type = drive
client_id = removed
client_secret = removed
scope = drive
token = {"access_token":"removed

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

A log from the command with the -vv flag

Paste  log here

not sure why this didn't attach to my last message, and sorry in advance:
Command: pvesm alloc gdrive 101 vm-101-disk10.qcow2 100G

gdrive is my rclone mounted Google Drive

Not entirely sure how I can extract logs from pvesm but will have a look.

can you post the

  • rclone mount command
  • rclone log

rclone mount gdrive:/ /mnt/pve/gdrive

as said, mount works and I can edit files, folders, backup virtual machines there with no problems, it's just creating the virtual disk - where it's creating ok on local drive but not on Google Drive.

I'll get rclone log as soon as I can.

you might need to choose a vfs cache mode.

your command is using https://rclone.org/commands/rclone_mount/#vfs-cache-mode-off

you might try https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full

Thanks, it worked. Not the exact outcome I was expecting though. I could create the virtual disk but, as it was set to to full cache. It was trying to recreate the whole 10TB dynamic drive on my local system drive (I think) which filled up my system drive very quickly (60GB system partition, 56GB was free before I mounted gdrive and created dynamic disk).

Ideally I would like to work on live dynamic virtual drive in the cloud.

Now I'm not sure where the cache is stored, rebooting the system didn't work. Low on space so can't run certain commands (or mount the drive with rclone again if needed to delete cache?). Tried some commands re clearing cache but either not worked or I didn't type them properly (or needed the mount connected?).

Thanks

Karol

Unfortunately objects on cloud storage are generally immutable, which means that trying to do the sort of random access read and writes that a filing system does isn't possible with one large object.

It is possible if you chunk the object up into lots of little bits, but rclone doesn't support that yet.

This will show you the default place for storing cache files

$ rclone help flags cache-dir
Usage:
  rclone help flags [<regexp to match>] [flags]

Flags:
  -h, --help   help for flags

Global Flags:
      --cache-dir string   Directory rclone will use for caching. (default "/home/ncw/.cache/rclone")
1 Like

Thank you Nick,

Default cache folder emptied, worked like a treat :slight_smile:
I guess I will need to look into other ways of achieving what I need.

Perhaps will try built in encryption, worth a try :slight_smile:

Karol

1 Like

What did you end up doing? I was looking for a similar (for a .VHDX) solution.

Thanks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.