Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

After having added 2 disks of 1Tb to a Dell PowerEdge, I went through their initialization with the goal to add them to an existing LVM VG.

When the MegaCli background initialization went complete, I did fdisk the new disk to add a Linux LVM partition on it.

Then, pvcreate refused to work:

pvcreate  /dev/sdn1
  Can't open /dev/sdn1 exclusively.  Mounted filesystem?

Part of strace of the pvcreation:

open("/dev/sdn1", O_RDWR|O_EXCL|O_DIRECT|O_NOATIME) = -1 EBUSY (Device or resource busy)

Of course, the device is NOT mounted nor used: (fuser reports nothing).

Any idea why this is blocked?

Thanks

share|improve this question

1 Answer 1

Maybe device-mapper is 'stealing' this device. Try this:

[root@host ~]# dmsetup ls
sdb     (253, 2)
VolGroup00-LogVol01     (253, 1)
VolGroup00-LogVol00     (253, 0)

If you find sdb device listed as above example, remove it using dmsetup and create the physical volume:

[root@host ~]# dmsetup remove sdb

[root@host ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
share|improve this answer
    
Copy-pasted from stackoverflow.com/a/11477042 (it's your own post, but readers have to know about copy-paste). –  Deer Hunter May 2 at 7:42
    
you use lsblk and blkid to identify who is using /dev/sdn1 –  c4f4t0r May 2 at 12:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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