-4

I'm following the guide here to making an EBS volume available for use.

I use the cmd:

lsblk

I get the output:

NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   8G  0 disk 
└─xvda1 202:1    0   8G  0 part /

As the guide states I then check if a file system exists:

sudo file -s /dev/xvda

I get:

/dev/xvda: DOS/MBR boot sector

Which I presume means no file system installed?

I then try the cmd to make a file system:

sudo mkfs -t ext4 /dev/xvda

I get warned:

Found a dos partition table in /dev/xvda Proceed anyway? (y,n)

I proceed and get the error:

/dev/xvda is apparently in use by the system; will not make a filesystem here!

I've tried rebooting the instance and running the cmds again with no luck.

Do I need to install a file system and if so, how?

2
  • Why the down vote?
    – panthro
    Oct 9, 2016 at 18:12
  • For one thing, that guide isn't appropriate to what you're attempting to do. Oct 9, 2016 at 19:33

1 Answer 1

2

xvda1 is your main partition that holds your running operating system. It's created from the Ubuntu image via an AMI. Update - apparently - "DOS/MBR boot sector" is normal for Ubuntu 16.04 on AWS, according to Michael as per comment below - seems a bit weird to me.

Why are you trying to format that partition? What are you actually trying to achieve here? Mounting an additional data drive? How did you create this instance? More background information is required.

Note, here's what happens when I ask for the file system on my Amazon Linux instance

# file -s /dev/xvda
/dev/xvda: GPT partition table, version 1.0, GUID: 5d0491dc-(removed), disk size: 20971520 sectors of 512 bytes

# file -s /dev/xvda1
/dev/xvda1: Linux rev 1.0 ext4 filesystem data, UUID=7715e0d4-(removed) (needs journal recovery) (extents) (large files) (huge files)
1
  • confirmed: /dev/xvda: DOS/MBR boot sector is normal for Ubuntu 16.04 in EC2. Oct 10, 2016 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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