2

I've created a new EC2 instance and setting up a bunch of software on it. MongoDB 3.2's Production checklist suggests installing it on an XFS (or ext4) volume. How do I create a volume of, say 15 GB, out of /dev/xvda1, format is as XFS using mkfs and then mount it? Here's the output of df -h right now:

udev            492M   12K  492M   1% /dev
tmpfs           100M  340K   99M   1% /run
/dev/xvda1       30G  2.5G   26G   9% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            497M     0  497M   0% /run/shm
none            100M     0  100M   0% /run/user

OS is Ubuntu 12.04 LTS

Aayush Kothari
  • 526
  • 3
  • 20

1 Answers1

1

Does it have to be the root partition?

If not, you can simply create a new volume in the AWS EC2 UI and attach it to the instance. It will show up as e.g. /dev/xvdf and you can format and mount it.

Also, this might answer your question.

Community
  • 1
  • 1
  • Thanks for the help, but we want to stay within the free tier unless absolutely necessary. – Aayush Kothari Jul 03 '16 at 14:44
  • 1
    In that case, please refer to the link I provided above ("Option 1: Convert Root Volume to XFS") in order to exchange the root volume with a different root volume that is XFS formatted. Please note that this is quite tricky (for HVM instances, you need to write the grub config, for example), so I'd strongly recomment to try that out on "throwaway" instances first! – tobi-wan-kenobi Jul 03 '16 at 14:47