4

I'm attempting to detach Amazon EBS Volume from an Instance, and I can't figure out why the filesystem can't be found/isn't mounted.

On my EBS Volumes, the attachment information shows:

(Instance1):/dev/sdh (attached)
(Instance1):/dev/sdo (attached)
(Instance1):/dev/sdo (attached)
(Instance1):/dev/sdj (attached)
(Instance1):/dev/sdi (attached)
(Instance1):/dev/sdn (attached)
(Instance1):/dev/sdm (attached)
(Instance1):/dev/sda1 (attached)
(Instance1):/dev/sdl (attached)

Running fdisk -l on the instance, I get:

Disk /dev/xvda: 16.1 GB, 16106127360 bytes
Disk /dev/xvdh: 156.8 GB, 156766306304 bytes
Disk /dev/xvdm: 156.8 GB, 156766306304 bytes
Disk /dev/xvdi: 156.8 GB, 156766306304 bytes
Disk /dev/xvdn: 156.8 GB, 156766306304 bytes
Disk /dev/xvdj: 156.8 GB, 156766306304 bytes
Disk /dev/xvdo: 156.8 GB, 156766306304 bytes
Disk /dev/xvdk: 156.8 GB, 156766306304 bytes
Disk /dev/xvdl: 156.8 GB, 156766306304 bytes
Disk /dev/md127: 1254.1 GB, 1254122061824 bytes

Trying to umount:

[root@ip-10-0-0-22 ~]# umount -d /dev/xvdm
umount: /dev/xvdm: not mounted
[root@ip-10-0-0-22 ~]# umount -d /dev/sdm
umount: /dev/sdm: not found

mount:

[root@ip-10-0-0-22 ~]# mount
/dev/xvda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/md127 on /vertica/data type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

How can I delete the underlying filesystems?


Delete what underlying filesystems? Also, could you cut-and-paste the output of cat /proc/mdstat into your question? – MadHatter

[root@ip-10-0-0-22 ~]# cat /proc/mdstat
Personalities : [raid0]
md127 : active raid0 xvdj[2] xvdn[6] xvdl[4] xvdh[0] xvdm[5] xvdi[1] xvdk[3] xvdo[7]
      1224728576 blocks super 1.2 1024k chunks

unused devices: <none>
10
  • 1
    ...because the drives aren't mounted?
    – Nathan C
    May 13, 2014 at 14:59
  • Delete what underlying filesystems? Also, could you cut-and-paste the output of cat /proc/mdstat into your question?
    – MadHatter
    May 13, 2014 at 14:59
  • Oh wait, read that better...you have an mdadm RAID setup. Use those tools to release drives from the array (don't do this unless you know what you're doing!!!!)
    – Nathan C
    May 13, 2014 at 15:00
  • @NathanC pardon my ignorance, but what are the disks listed?
    – Kermit
    May 13, 2014 at 15:02
  • @MadHatter updated.
    – Kermit
    May 13, 2014 at 15:03

3 Answers 3

2

OK, you've been clear that you don't want the data (thank you, it's good to be clear about things like that). Unmount the filesystem

umount /vertica/data

Then stop the metadevice

mdadm -S /dev/md127

That should be enough to free up the devices so they become detached from the host instance.

1

Assuming the drives are mounted into the filesysem, try unmounting the filesystem mount point

umount /path/to/mount/point/for/xvdm

This should work under most circumstances whereas there are times when unmounting the device will fail

The umount command detaches the file system(s) mentioned from the file hierarchy. A file system is specified by giving the directory where it has been mounted. Giving the special device on which the file system lives may also work, but is obsolete, mainly because it will fail in case this device was mounted on more than one directory.


You've updated your question but the answer is basically the same. You have a number of devices that have been made into a RAID-0 array. If you really want to unmount this then

umount /vertica/data

should do the trick.

1

You have a RAID or LVM setup that's simply merging all the disks into one big disk:

/dev/md127 on /vertica/data type ext4 (rw)

All those drives are critical to that mount point. If you must for some reason release a drive for one reason or another, do so with the same tools used to create the array.

MAKE A BACKUP BEFORE YOU DO THIS! Countless bytes have been lost due to improper array management.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .