I had Centos & Windows systems dual booted previously. I am replacing Centos with Arch now.

I have Centos's /boot installed on /dev/sda8 and / on /dev/sda9

When I try the following command on Arch(booted using USB) to format /dev/sda9, it doesn't allow me to do.

mkfs.ext4 /dev/sda9
/dev/sda9 is apparently in use by the system; will not make a filesystem here!

I checked whether the device is currently mounted. It is NOT! Googling the error brings up certain sites which are related to disk being setup as RAIDs. I am not using RAID too and the arch is currently being mounted on /dev/sdb(USB device).

I was able to format /dev/sda8(which was /boot partition) using

mkfs.ext4 /dev/sda8

which means I have borked the ability to boot to Windows. Please help.

Edit: Reproducing(partial) output of lsblk -f command by typing,

NAME                          FSTYPE        LABEL
|--sda1                       vfat          DellUtility
|--sda2                       ntfs
|--sda3                       ntfs
|--sda5                       ntfs
|--sda6                       ntfs
|--sda7                       ntfs
|--sda8                       ext4
|--sda9                       LVM2_member
   |--VolGroup00-LogVol00     ext3
   |--VolGroup00-LogVol01     swap
sdb                           iso9660        ARCH_201310
|--sdb1                       iso9660        ARCH_201310
|--sdb2                       vfat           ARCHISO_EFI
  • 3
    Looks like /dev/sda9 was an LVM(not sure what that is, need to read more!). After I did an dmsetup remove VolGroup00=LogVol00 dmsetup remove VolGroup00-LogVol01 I was able to format! – steve Nov 1 '13 at 14:35
  • 1
    Well done on answering your own question, tempted to write it up as an official answer? I'll upvote you if you do :) - LVM stands for Logical Volume Manager and to cut a long story short, is a great way to add storage to system without having to create new mounts or even system downtime in some instances. Good WP article here -> en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) – sgtbeano Nov 1 '13 at 15:07
  • 3
    @sgtbeano I wish I could, but new users can not answer their own questions apparently in less than 8 hours. Thanks for the info. – steve Nov 1 '13 at 15:56
  • :( - I've up voted both your comments – sgtbeano Nov 1 '13 at 15:59
  • 1
    This is a good question and answer. After your 8 hours have passed, you should post your answer. One suggestion for the question though. Tell us how you verified /dev/sda9 was not mounted. did you do mount | grep sda9 and receive no output? Some other means? – Drew Chapin Mar 20 '14 at 22:47

This answer was originally posted as a comment by the OP, who did not return to answer the question. Because Stack Overflow permits posting somebody's comment as an answer if it is deemed to be such, I am answering 'on behalf of' the OP, incorporating @sgtbeano's comment about LVM.

It looks like /dev/sda9 was a Logical Volume Manager (LVM). After I did the following, I was able to format! :

dmsetup remove VolGroup00=LogVol00 ; dmsetup remove VolGroup00-LogVol01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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