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.