LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Manjaro (https://www.linuxquestions.org/questions/manjaro-119/)
-   -   Manjaro does not recognize LVM PV on top of mdadm RAID 1 (https://www.linuxquestions.org/questions/manjaro-119/manjaro-does-not-recognize-lvm-pv-on-top-of-mdadm-raid-1-a-4175655203/)

tofino_surfer 06-05-2019 12:36 PM

Manjaro does not recognize LVM PV on top of mdadm RAID 1
 
I am a long time Fedora user who has just installed Manjaro KDE in a multi-boot arrangement. I have run into one issue. I have an mdadm RAID 1 with an LVM PV on top. It contains a volume group and is divided into several data partitions. With Fedora everything is recognized at boot.

Code:

$ cat /etc/fedora-release
Fedora release 29 (Twenty Nine)
$ uname -r
5.0.17-200.fc29.x86_64

$ cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdd1[0] sde1[1]
      2930263928 blocks super 1.2 [2/2] [UU]
     
unused devices: <none>

$ sudo lvm
lvm> pvs
  PV        VG          Fmt  Attr PSize    PFree 
  /dev/md0  vg_raid1    lvm2 a--    <2.73t  <1.27t
  /dev/sda3  vg_server47 lvm2 a--  <55.41g      0
  /dev/sdb10 vg_samsung  lvm2 a--  <125.41g <70.41g
lvm> vgs
  VG          #PV #LV #SN Attr  VSize    VFree 
  vg_raid1      1  3  0 wz--n-  <2.73t  <1.27t
  vg_samsung    1  3  0 wz--n- <125.41g <70.41g
  vg_server47  1  1  0 wz--n-  <55.41g      0
lvm> pvscan
  PV /dev/sdb10  VG vg_samsung      lvm2 [<125.41 GiB / <70.41 GiB free]
  PV /dev/md0    VG vg_raid1        lvm2 [<2.73 TiB / <1.27 TiB free]
  PV /dev/sda3    VG vg_server47    lvm2 [<55.41 GiB / 0    free]
  Total: 3 [<2.91 TiB] / in use: 3 [<2.91 TiB] / in no VG: 0 [0  ]

However with Manjaro :

Code:

$ cat /etc/manjaro-release
Manjaro Linux
$ uname -r
4.19.28-1-MANJARO

$ cat /proc/mdstat
Personalities : [raid1]
md127 : active (auto-read-only) raid1 sdd1[0] sde1[1]
      2930263928 blocks super 1.2 [2/2] [UU]
     
unused devices: <none>

$ sudo pvs
  PV        VG          Fmt  Attr PSize    PFree 
  /dev/sda3  vg_server47 lvm2 a--  <55.41g      0
  /dev/sdb10 vg_samsung  lvm2 a--  <125.41g <70.41g

$ sudo pvscan
  PV /dev/sdb10  VG vg_samsung      lvm2 [<125.41 GiB / <70.41 GiB free]
  PV /dev/sda3    VG vg_server47    lvm2 [<55.41 GiB / 0    free]
  Total: 2 [180.81 GiB] / in use: 2 [180.81 GiB] / in no VG: 0 [0  ]
 
$ sudo vgs
  VG          #PV #LV #SN Attr  VSize    VFree 
  vg_samsung    1  3  0 wz--n- <125.41g <70.41g
  vg_server47  1  1  0 wz--n-  <55.41g      0

With Manjaro the RAID is recognized as read-only, the /dev/md PV is missing and the pvscan command doesn't find it.

berndbausch 06-05-2019 07:08 PM

auto-read-only seems to be a normal intermediate status when assembling an array. Which is what you are doing - your system boots, finds MD array superblocks and assembles the array. See also https://unix.stackexchange.com/quest...resync-pending.

A few suggestions for getting more information about your problem:
Code:

mdadm --detail /dev/mdwhatever
mdadm --detail --scan
lsblk    # list all block devices; should show the array
blkid    # identifies UUIDs and LABELs on block devices; should show MD UUIDs
dmesg

You could also try to help your system assemble the array with ARRAY and DEVICE directives in /etc/mdadm.conf. See the mdadm.conf man page for how to do that.

Did you create the array on the Manjaro system or did you migrate it there from Fedora? Has the Manjaro box ever recognized the PV?

EDIT: Example for mdadm.conf:
Code:

# cat /etc/mdadm.conf
ARRAY /dev/md/bb metadata=1.2 spares=1 name=lsna112:bb UUID=13adcd45:f7f073d8:9039774c:55c8684a
DEVICE /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

I would also be curious what happens when I stop the array, then re-assemble it manually:
Code:

mdadm --stop /dev/mdwhatever
mdadm --assemble --scan
or
mdadm --assemble /dev/mdwhatever --name mydeararray /dev/sdd1 /dev/sde1

More info: The md section on kernel.org, in particular the long article about mdadm.

tofino_surfer 06-05-2019 10:10 PM

Quote:

Did you create the array on the Manjaro system or did you migrate it there from Fedora?
I never had a 'Manjaro system' until yesterday. I am a 17 year user of Fedora (since FC5) and more recently CentOS. Before I installed Manjaro yesterday I had a Fedora 29, Fedora 28 (now EOL), and Centos 7 triple boot system. I now have a quadruple boot system with one being EOL. This is my first attempt to install anything other than Fedora/CentOS in 17 years of Linux use. Since this is the same computer the term 'migrate' isn't applicable.

I was drawn to try another distribution as RH deprecated KDE and KDE soon stopped working when I 'updated' Centos 7. I like KDE Plasma and wanted to try another distribution where KDE is officially supported. I was drawn to Manjaro specifically by positive comments made on FedoraForum by several people one of whom is a forum moderator.

Quote:

Has the Manjaro box ever recognized the PV?
Given the above explanation no as my desktop was never a Manjaro box.

I created the array in summer 2016 when I bought two 3TB WD drives, assembled them into a RAID1 mirror and then put LVM on top. The creation went perfectly and it worked immediately. It was all created with Centos 7 but worked perfectly with Fedora 24,28 and now 29. Everything was assembled at boot and the volume group and all of the LVs inside were visible and mountable after boot. Two of the LVs are mounted in my fstab on Fedora and Centos as well the swap partition is on this array to reduce wear on the SSD.

Thank you for your reply. I will try your suggestions.

I now realize that despite what flaws it may have Fedora is quite powerful.

syg00 06-05-2019 10:53 PM

Manjaro is (or was) based on Arch - so you'd need to make sure the appropriate modules are;
i) in the initrd, and
ii) in the correct order.

Normally for data partitions it shouldn't matter, but it probably will for swap. As with all things Arch, see the wiki - amongst the best doco around.
FWIW I found Manjaro "difficult" to adopt after years of Fedora - and although I also did KDE (for digikam) I still hate it.
That machine only gets used for photo processing - but I use btrfs for RAID, not mdadm.

tofino_surfer 10-07-2019 01:07 PM

A late reply. The problem eventually went away with a few more boots. It was intermittent at first occurring on some boots and not others but eventually went away for good. I now mount data partitions on these LVs on top of the RAID1 in Manjaro with no problems.


All times are GMT -5. The time now is 04:57 PM.