sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

bug: file transfers need twice the disk space #1388

Open mkunz7 opened 4 years ago

mkunz7 commented 4 years ago

Describe your environment

  1. minimega version latest
  2. Linux distro/version ubuntu 18.04.3
  3. Go compiler version 1.12.13
  4. VM types all

Describe the bug The file API doesn't throw an error when you run out of disk space.

If you send a 50gB file, you need to have at least 100gB's of free space.

To Reproduce Start Minimega on 2 nodes Create a large file (10gB) and put it in the file path on node1

On node2 only have 15 gB remaining. Mounting the file path in a ram drive helps.

From node2

file get mylargefile.qcow2

The file downloads, then truncates to 5gB without error to CLI. If you have multiple nodes downloading the file with mesh send all file get mylargefile.qcow2 once one node finishes all the qcows get corrupted before they finish downloading.

Expected behavior Error on running out of disk space. Why is this a copy and not move operation?