Reputation: 6246
I am using a D class EC2 which is supposed to be a storage optimized EC2. I have about 20 GB of files that I need to write to disk. I am getting an out of disk space error once the total size of files reaches 15 GB. The instance is supposed to have way more than this. Why am I getting this error? How can I write more than 15GB of data to a D class EC2?
Upvotes: 0
Views: 149
Reputation: 446
Please check if there are multiple user profiles, in case if there are you may not have permissions to see them and this will not allow you to see the space occupied by them.
Upvotes: 0
Reputation: 269360
From Amazon EC2 Instance Types - Amazon Web Services:
D2 instances feature up to 48 TB of HDD-based local storage, deliver high disk throughput, and offer the lowest price per disk throughput performance on Amazon EC2.
Please note that this is local storage, which is very fast but the contents of these disks is lost if the instance is stopped. Therefore, it is recommended for temporary storage only.
Linux
I launched a d2.xlarge
Linux instance.
I then followed instructions from How to use “Instance Store Volumes” storage in Amazon EC2?:
$ sudo fdisk -l
Disk /dev/xvda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 70E4A118-98BD-4BF4-8DF9-6926A964902A
Device Start End Sectors Size Type
/dev/xvda1 4096 16777182 16773087 8G Linux filesystem
/dev/xvda128 2048 4095 2048 1M BIOS boot
Partition table entries are not in disk order.
Disk /dev/xvdb: 1.8 TiB, 2000387309568 bytes, 3907006464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/xvdc: 1.8 TiB, 2000387309568 bytes, 3907006464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/xvdd: 1.8 TiB, 2000387309568 bytes, 3907006464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
This showed 3 disks, each of 1.8TiB.
I then formatted and mounted them:
sudo mkfs.ext4 /dev/xvdb
sudo mkfs.ext4 /dev/xvdc
sudo mkfs.ext4 /dev/xvdd
sudo mkdir /mnt/disk1
sudo mkdir /mnt/disk2
sudo mkdir /mnt/disk3
sudo mount -t ext4 /dev/xvdb /mnt/disk1
sudo mount -t ext4 /dev/xvdc /mnt/disk2
sudo mount -t ext4 /dev/xvdd /mnt/disk3
I then viewed the mounted disks:
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 436K 15G 1% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/xvda1 8.0G 1.3G 6.8G 16% /
tmpfs 3.0G 0 3.0G 0% /run/user/1000
/dev/xvdb 1.8T 77M 1.7T 1% /mnt/disk1
/dev/xvdc 1.8T 77M 1.7T 1% /mnt/disk2
/dev/xvdd 1.8T 77M 1.7T 1% /mnt/disk3
I was then able to use the disks. (Tip: Change permissions on the mount folders so you don't need to sudo
all the time.)
Windows
I also booted up a d2.xlarge
Windows instance. I then had to:
D:
, E:
and G:
Upvotes: 1