0

I'm on a Linux EC2 machine and I'm getting an error that my storage space is full.

  Error writing to connection:  No space left on device

I used df and I can see that I have plenty of space in some of my filesystems.

Filesystem     1K-blocks    Used Available Use% Mounted on
devtmpfs         8202604      60   8202544   1% /dev
tmpfs            8213188       0   8213188   0% /dev/shm
/dev/xvda1       8123812 8023744         0 100% /

I'm on a t2.xlarge. Is it possible to make more space available in xvda?

5
  • You have "plenty of space" on a tmpfs and a devtmpfs fs mount...clear up data on /
    – Lenniey
    May 15, 2019 at 16:21
  • Can I move files from xvda1 to these other file systems?
    – goollan
    May 15, 2019 at 16:26
  • @Lenniey they're both ramdisks, they can't be used to extend the real disk
    – Chopper3
    May 15, 2019 at 16:50
  • @Chopper3 I know, that's why I put the " around plenty of space and to clear up data on /, wasn't clear enough, obviously
    – Lenniey
    May 15, 2019 at 16:57
  • @goollan I didn't want to sound condescending. No you can't extend your root filesystem or move data to them, as they are not "normal" filesystems. You either have to add more storage to your instance or clear up space on your root filesystem
    – Lenniey
    May 15, 2019 at 17:05

1 Answer 1

1

When using GNU coreutils df, get in the habit of filtering by file system type: df -t xfs -h. Or maybe you are using ext4 or other file systems. This ignores in memory types that are not permanent storage, like tmpfs.


Create new disks (EBS volumes in the case of AWS), create LVM volumes and file systems on them. Then migrate onto the new mount points (/srv or somewhere under /var perhaps) by copying data. You can then do neat tricks like booting an image with upgraded software, then swing the existing disk over to the new instance.

Or, you could expand the existing disk and the file system on it. However, that ties your data to your operating system volume.

2
  • The advantage of one larger disk vs two smaller disks is effectively higher IOPS, as the OS isn't really going to be using the disk all that much.
    – Tim
    May 15, 2019 at 21:17
  • I mentioned a data mounts scheme for administrative convenience first, not necessarily performance. Also, you can boot the OS from spindles and put the data on faster solid state LUNs if you like. May 15, 2019 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .