1

I've created a new disk partition by sudo fdisk /dev/xvda1 and the following commands:

  1. n
  2. p
  3. 1
  4. Enter
  5. Enter
  6. w

After, when I want to change the partition system file into xfs by sudo mkfs.xfs -i size=1024 /dev/xvda1p1 I got:

/dev/xvda1p1: Not such file or directory

P.S. : xvda1p1 is the name of the new created partition when I type sudo fdisk -l

I'm following these instructions in order to achieve a tutorial of creating a Swift Cluster.

Thanks.

BuZZ-dEE
  • 14,223
Dady
  • 662

2 Answers2

2

/dev/xvda1 is a partition. You don't create partitions inside partitions. You wanted fdisk /dev/xvda.

psusi
  • 37,551
  • And the resulting name of the first primary partition for /dev/xvda is /dev/xvda1. The partition number gets appended to the base disk name, NOT p#. – mdpc Apr 10 '13 at 16:58
  • ah ok, so what does it mean when i got after typing "fdisk -l" Disk /dev/xvda1: 8589 MB, 8589934592 bytes 86 heads, 1 sectors/track, 195083 cylinders, total 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 Disk identifier: 0x5cd8852f
      Device Boot      Start         End      Blocks   Id  System
    

    /dev/xvda1p1 2048 16777215 8387584 83 Linux

    – Dady Apr 11 '13 at 11:47
  • @psusi when i type "fdisk /dev/xvda" i got "fdisk: unable to open /dev/xvda: No such file or directory" !! – Dady Apr 11 '13 at 14:04
  • @user1959686, add the contents of /proc/partitions to your question. – psusi Apr 11 '13 at 17:28
  • @psusi major minor #blocks name 202 1 8388608 xvda1 – Dady Apr 12 '13 at 08:50
  • @user1959686, put the whole file in your question, not one line in a comment. – psusi Apr 12 '13 at 13:20
  • @psusi yes i put the whole file, i found juste one line in the file, its a new Ubuntu instance running on Amazon cloud. – Dady Apr 12 '13 at 13:38
  • @user1959686, then your vm is misconfigured. Normally it isn't possible to have a partition with no underlying disk, but I guess it is with xen if you configure it wrong. – psusi Apr 12 '13 at 19:51
0

you could install gparted to make it easier. You can find it in the Ubuntu Software Center

Silviu
  • 187
  • i'm on a remote machine, i can't acess to Ubuntu Software Center – Dady Apr 11 '13 at 11:49
  • @user1959686 Assuming you use ssh to get to it, if you want you can get a remote desktop to the machine. TinyVNC comes preinstalled but you have to change permissions first. I found something this on ask.ubuntu link – Silviu Apr 11 '13 at 12:08
  • yes i will see with that, even if later i will continue with command line, thank's – Dady Apr 11 '13 at 12:20