0

I'm following a tutorial for setting up MongoDB on EC2 and I got stuck at the following part:

$ sudo mkfs.ext4 /dev/xdf

mke2fs 1.42.3 (14-May-2012)
Could not stat /dev/xdf --- No such file or directory

The device apparently does not exist; did you specify it correctly?

Not sure how to proceed- any help would be greatly appreciated!

Edit:

$ ls /dev
autofs           disk  hvc4   loop1         mapper              ppp     sdg     tty1   tty17  tty24  tty31  tty39  tty46  tty53  tty60  ttyS1    vcs4   vcsa5        xvdh
block            fd    hvc5   loop2         mem                 psaux   sdh     tty10  tty18  tty25  tty32  tty4   tty47  tty54  tty61  ttyS2    vcs5   vcsa6        zero
btrfs-control    full  hvc6   loop3         net                 ptmx    shm     tty11  tty19  tty26  tty33  tty40  tty48  tty55  tty62  ttyS3    vcs6   vga_arbiter
char             fuse  hvc7   loop4         network_latency     pts     stderr  tty12  tty2   tty27  tty34  tty41  tty49  tty56  tty63  urandom  vcsa   vhost-net
console          hvc0  input  loop5         network_throughput  random  stdin   tty13  tty20  tty28  tty35  tty42  tty5   tty57  tty7   vcs      vcsa1  xen
core             hvc1  kmsg   loop6         null                root    stdout  tty14  tty21  tty29  tty36  tty43  tty50  tty58  tty8   vcs1     vcsa2  xvda1
cpu              hvc2  log    loop7         oldmem              sda1    tty     tty15  tty22  tty3   tty37  tty44  tty51  tty59  tty9   vcs2     vcsa3  xvdf
cpu_dma_latency  hvc3  loop0  loop-control  port                sdf     tty0    tty16  tty23  tty30  tty38  tty45  tty52  tty6   ttyS0  vcs3     vcsa4  xvdg

From the answers it sounds like those were the names of the block devices. In the management console, it looks like they are sdh, sdf, sdg. Makes sense xdf doesn't exit.

1
  • 1
    can you paste the output of $ ls /dev ? Sep 29 '13 at 19:14
3

This error means that the block device /dev/xvdf which you are trying to format with ext4 filesystem doesn't exist.

Please make sure /dev/xvdf exists. It might have some other name as well instead of xvdf.

0
5

Did you launch your instance as the tutorial specified using the ec2-run-instances command or are you using an instance you launched differently?

It specifies the additional volumes in the ec2-run-instances command:

$ ec2-run-instances ami-05355a6c -t m1.large -g [SECURITY-GROUP] -k [KEY-PAIR] -b "/dev/xdf=:200:false:io1:1000" -b "/dev/xdg=:25:false:io1:250" -b "/dev/xdh=:10:false:io1:100" --ebs-optimized true

If you launched an instance without these volumes, you could either create them and attach it to your instance, or launch a new instance with the parameters above.

The pre-built AMI's in the marketplace might be easier to get you started, they've got everything already setup and many optimizations pre-configured.

1
  • I'm using the ami-43315d2a pre-build, i just kinda assumed it would use the same names
    – AJcodez
    Sep 29 '13 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.