Red Hat Enterprise Linux 7 installation failed with LVM on M device with "Can'tRed Hat Enterprise Linux 7 installation failed with LVM on MD device with "Can't open /dev/md/1 exclusiv open /dev/md/1 exclusively. Mounted filesystem?" from pvcreate command

Solution Verified - Updated -

Issue

  • The kickstart installation of Red Hat Enterprise Linux 7 failed.
  • A system with LVM configured on MD raid in kickstart file as below.
part raid.01 --size=512 --ondisk=sda
part raid.02 --size=131072 --grow --ondisk=sda
part raid.03 --size=512 --ondisk=sdb
part raid.04 --size=131072 --grow --ondisk=sdb

raid /boot --fstype=ext4 --level=1 --device=md0 raid.01 raid.03 
raid pv.01 --fstype=ext4 --level=1 --device=md1 raid.02 raid.04 
volgroup vg_root pv.01 
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --size=16384 
logvol swap --fstype=swap --name=lv_swap --vgname=vg_root --size=8192 
  • Observed below error in /tmp/program.log.
    ~~
    XX:XX:XX,XXX INFO program: Running... lvm pvcreate --config devices { preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"] } /dev/md/1
    XX:XX:XX,XXX INFO program: Can't open /dev/md/1 exclusively. Mounted filesystem?
    XX:XX:XX,XXX DEBUG program: Return code: 5
    ~~~
  • How can to avoid this problem?

Environment

Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content