You are not logged in.

#1 2014-11-19 04:06:08

Xenarios
Member
From: High Wycombe, UK
Registered: 2014-11-08
Posts: 2

"/dev/sdb2 is apparently in use by the system" when it shouldn't be.

I'm attempting to format a partition on my second hard drive in preparation to install Arch, and I'm getting the message:

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

I have checked the forum for an answer and found that it was possibly an issue where the system believed it was in a RAID:
https://bbs.archlinux.org/viewtopic.php?id=149532

Unfortunately i tried this and it didn't work. I was also told to attempt "cat /proc/mdstat" to see if it told me any RAID was running, but no luck there.

This is during the installation of Arch on a USB. I've got a Windows Partition and that's all on the drive, all the other data is redundant. I've also tried unmounting them, and even deleting the partition and rewriting it in cfdisk (since the data isn't needed).

Does anyone know what this possibly may be?

Offline

#2 2014-11-19 04:34:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,333
Website

Re: "/dev/sdb2 is apparently in use by the system" when it shouldn't be.

You mention many things you've tried tangentially, but it's not really clear what exactly has been done and what exactly resulted in each case.

What command gives that error?  What is the output of `lsblk` and `mount` when you get that error?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-11-19 13:32:57

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: "/dev/sdb2 is apparently in use by the system" when it shouldn't be.

Recently this became an issue for me too while trying to configure LUKS. You might just need to remove the RAID config from the partition with:

mdadm --zero-superblocks /dev/sdb2

It wasn't readily apparent that there was a lingering RAID configuration on that partition but this seemed to have made my partition available again.

Last edited by KairiTech (2014-11-19 13:51:53)

Offline

#4 2015-01-11 12:27:22

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: "/dev/sdb2 is apparently in use by the system" when it shouldn't be.

In my case the cause was an udev rule for automounting usb drives that I had created. This wasn't apparent to me at first because the drive didn't seem mounted (checked with 'cat /proc/mounts') or  in use (checked by 'lsof /dev/sdc').  After seeing that there were systemd devices with the name of that device ('systemctl | grep sdc' ) I remembered the udev rule. After disabling the rule I could format the usb drive.

Last edited by rwd (2015-01-11 12:33:22)

Offline

Board footer

Powered by FluxBB