0

I have an AWS RHEL instance.

Following are the storage devices on it:

$lsblk
   NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
   xvda    202:0    0  20G  0 disk
   xvda1 202:1    0   6G  0 part /

I am trying to mount xvda here to make it available by using the following link:

Making an Amazon EBS Volume Available for Use

The issue I am facing is during formatting of the volume i.e :

$ sudo mkfs -t ext4 /dev/xvda
       mke2fs 1.41.12 (17-May-2010)
       /dev/xvda is apparently in use by the system; will not make a filesystem here!

As you can see, the device can not be formatted because of error message /dev/xvda is apparently in use by the system; will not make a filesystem here!

Meanwhile my output for device file is as follows:

$ sudo file -s /dev/xvda
   /dev/xvda: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive   0x80, 1st sector stage2 0x17e070, GRUB version 0.94; partition 1: ID=0xee, starthead 0, startsector 1, 20971519 sectors, extended partition table (last)\011, code offset 0x48

I am unable to understand, why and who is using the device /dev/xvda when it's not even formatted and made available for use.

Please help, Thanks in advance.

Ashish Sharma
  • 233
  • 1
  • 9
  • 1
    You have only one disk on the system, and that disk is xvda, and its partition xvda1 is mounted. You need to create additional EBS volume and attach it to your instance. Then with fdisk -l you should see it as xvdb most likely. – titus Mar 02 '15 at 12:41
  • Titus, you were right, so I tried resizing 'xvda1' partition on 20GB xvda disk, but the partition size goes to 10GB only and does not move beyond that, any suggestions why I can't utilize my full disk space in the partition? – Ashish Sharma Mar 04 '15 at 09:10
  • 1
    You cannot resize the partition in the current setup because it is not a LVM. Instead you can create a new partition ```/dev/xvda2``` and add the rest of space there. You can use parted or fdisk for that. – titus Mar 04 '15 at 10:10

0 Answers0