Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LVM and mdadm

190 views
Skip to first unread message

Petter Adsen

unread,
Apr 4, 2015, 6:50:04 AM4/4/15
to
I've just finished setting up Jessie with mdadm and LVM, the latter of
which I have never used before.

/dev/md0 is a 1G mirror for /boot, no LVM there. /dev/md1 is a mirror,
than consists of the major part of /dev/sda and /dev/sdb - both 250G.
There are also 4G swap partitions on sda and sdb, no RAID there.

The installation went smoothly, and I think I got everything right.
However, when I run "pvdisplay -v", it says:
DEGRADED MODE. Incomplete RAID LVs will be processed.
Scanning for physical volume names
--- Physical volume ---
PV Name /dev/md1
VG Name ROOTVG
PV Size 227.90 GiB / not usable 2.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 58342
Free PE 17812
Allocated PE 40530
PV UUID bpoMmU-Z9w0-arNA-Q6Je-jdyl-P2nH-JiPtJY

Does that mean there is something wrong with the mirror under LVM?

Petter

--
"I'm ionized"
"Are you sure?"
"I'm positive."

Reco

unread,
Apr 4, 2015, 7:00:05 AM4/4/15
to
Hi.
It's possible that you have logical volumes created with --mirrors
option, for example. It's not bad, just redundant (i.e. mirroring over
mirroring).

Please post the output of vgdisplay -v.

Reco


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20150404135633.0309...@gmail.com

Petter Adsen

unread,
Apr 4, 2015, 7:10:04 AM4/4/15
to
Yeah, that would be redundant. I wouldn't really know, as I just
created the RAID mirror with the installer, and also used the installer
to create a PV filling md1, with a single VG, and a few LV's inside
that.

> Please post the output of vgdisplay -v.

Here goes. "freshinstall" is just a snapshot of the system right after
the first boot.

root@fenris:~# vgdisplay -v
DEGRADED MODE. Incomplete RAID LVs will be processed.
Finding all volume groups
Finding volume group "ROOTVG"
--- Volume group ---
VG Name ROOTVG
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 227.90 GiB
PE Size 4.00 MiB
Total PE 58342
Alloc PE / Size 42924 / 167.67 GiB
Free PE / Size 15418 / 60.23 GiB
VG UUID XviEb0-4Xq7-4aJO-4m8c-LtxI-aVGj-8CUIoN

--- Logical volume ---
LV Path /dev/ROOTVG/LV_ROOT
LV Name LV_ROOT
VG Name ROOTVG
LV UUID ec5Fg4-OF3y-yB1S-dsXi-v2Nv-TqTJ-cwbEBg
LV Write Access read/write
LV Creation host, time fenris, 2015-04-04 11:23:03 +0200
LV snapshot status source of
freshinstall [active]
LV Status available
# open 1
LV Size 9.31 GiB
Current LE 2384
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/ROOTVG/LV_VAR
LV Name LV_VAR
VG Name ROOTVG
LV UUID 8JVtGt-kZtM-P0bv-wFJe-MAse-u1MO-6SenQJ
LV Write Access read/write
LV Creation host, time fenris, 2015-04-04 11:23:43 +0200
LV Status available
# open 1
LV Size 55.88 GiB
Current LE 14305
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/ROOTVG/LV_HOME
LV Name LV_HOME
VG Name ROOTVG
LV UUID IenPg1-9gY1-n4At-rC3v-6auK-X2Vd-tJ2ldf
LV Write Access read/write
LV Creation host, time fenris, 2015-04-04 11:24:13 +0200
LV Status available
# open 1
LV Size 93.13 GiB
Current LE 23841
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Path /dev/ROOTVG/freshinstall
LV Name freshinstall
VG Name ROOTVG
LV UUID n835Yc-gPq8-asVg-1yDV-1dgL-5eBU-sSV9db
LV Write Access read/write
LV Creation host, time fenris, 2015-04-04 12:55:44 +0200
LV snapshot status active destination for LV_ROOT
LV Status available
# open 0
LV Size 9.31 GiB
Current LE 2384
COW-table size 9.35 GiB
COW-table LE 2394
Allocated to snapshot 0.00%
Snapshot chunk size 4.00 KiB
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

--- Physical volumes ---
PV Name /dev/md1
PV UUID bpoMmU-Z9w0-arNA-Q6Je-jdyl-P2nH-JiPtJY
PV Status allocatable
Total PE / Free PE 58342 / 15418

Reco

unread,
Apr 4, 2015, 8:10:05 AM4/4/15
to
Hi.

On Sat, 4 Apr 2015 13:04:16 +0200
Petter Adsen <pet...@synth.no> wrote:

> > Please post the output of vgdisplay -v.
>
> Here goes. "freshinstall" is just a snapshot of the system right after
> the first boot.

Yup. vgdisplay -v says just that.

> root@fenris:~# vgdisplay -v
> DEGRADED MODE. Incomplete RAID LVs will be processed.
> Finding all volume groups
> Finding volume group "ROOTVG"
> --- Volume group ---
> <skip>

Ok, I have a good news, and I have a bad news.

The good news are:

1) You don't have any mirrored LVs. Such LVs are explicitly marked by
having 'Mirrored volumes', and you have none of those.

2) You don't seem to have a problem with your LVM configuration,
everything appears to be in place.

And the bad news are:

'-v' option misleads you.

It says that 'Incomplete RAID LVs will be processed' and other
scary stuff regardless of presence of such LVs. It says 'DEGRADED
MODE', even in the case there everything is OK.

About the only way to know for sure whenever it's OK or not - is to
carefully view the status of every VG, LV and PV.

In fact, it seems that any LVM command with '-v' option will spew such
'warnings'.

It's Jessie's new feature, and it seems that nobody cared about
documenting it. Short of original bug report, of course - [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=905063

Reco


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20150404150920.e2a0...@gmail.com

Petter Adsen

unread,
Apr 4, 2015, 8:40:05 AM4/4/15
to
On Sat, 4 Apr 2015 15:09:20 +0300
Reco <recov...@gmail.com> wrote:

> Hi.
>
> On Sat, 4 Apr 2015 13:04:16 +0200
> Petter Adsen <pet...@synth.no> wrote:
> > root@fenris:~# vgdisplay -v
> > DEGRADED MODE. Incomplete RAID LVs will be processed.
> > Finding all volume groups
> > Finding volume group "ROOTVG"
> > --- Volume group ---
> > <skip>
>
> Ok, I have a good news, and I have a bad news.
>
> The good news are:
>
> 1) You don't have any mirrored LVs. Such LVs are explicitly marked by
> having 'Mirrored volumes', and you have none of those.
>
> 2) You don't seem to have a problem with your LVM configuration,
> everything appears to be in place.

Good. :)

> And the bad news are:
>
> '-v' option misleads you.
>
> It says that 'Incomplete RAID LVs will be processed' and other
> scary stuff regardless of presence of such LVs. It says 'DEGRADED
> MODE', even in the case there everything is OK.

Yes, I noticed that. While viewing the configuration here, the message
only came up with "-v", which I thought would be odd if it was really
serious.

> About the only way to know for sure whenever it's OK or not - is to
> carefully view the status of every VG, LV and PV.
>
> In fact, it seems that any LVM command with '-v' option will spew such
> 'warnings'.
>
> It's Jessie's new feature, and it seems that nobody cared about
> documenting it. Short of original bug report, of course - [1].
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=905063

OK, I didn't see that when I was searching for answers. Thank you for
taking the time anyway, it is good to know it was set up correctly,
especially since this is new to me. It would be nice if this was clear
in the man pages, though.

Bob Proulx

unread,
Apr 4, 2015, 7:00:04 PM4/4/15
to
Petter Adsen wrote:
> /dev/md0 is a 1G mirror for /boot, no LVM there. /dev/md1 is a mirror,
> than consists of the major part of /dev/sda and /dev/sdb - both 250G.
> There are also 4G swap partitions on sda and sdb, no RAID there.

This isn't a complaint but just comment. I gave myself a lot of free
space so that I could be slack about removing previous kernels. I
have a lot of kernels installed. I should prune.

$ ls /boot/vmlinuz-* | wc -l
14

But I still have a lot of space.

Filesystem Size Used Avail Use% Mounted on
/dev/md0 456M 261M 172M 61% /boot

That 1G of /boot is going to be a lot of space for you. Of course
drives are so large these days that another 512M is absolutely nothing
in the grand scheme of things. You are just going to have a lot of
space there and will never have a concern over filling up that
partition. :-)

> The installation went smoothly, and I think I got everything right.
> However, when I run "pvdisplay -v", it says:
> DEGRADED MODE. Incomplete RAID LVs will be processed.
> Scanning for physical volume names

And I see the discussion and answer from Reco on this. I had not
ever used -v and had never seen that message. I would have wondered
if I had. Now I can file the information away as a bug.

There are two other bugs that routinely annoy me. One is that in
Jessie they added more columns to the output. Fine. But then they
print all of the spaces between even when the columns are empty.

https://bugs.debian.org/761676

The other is that lvm complains about things it should not complain
about. Specifically open file descriptors. I often see this
abnoxious message from lvm depending upon the environment and scripts
from which I invoke it.

File descriptor 3 (/dev/tty) leaked on lvs invocation. Parent PID 12261: /bin/bash

https://bugs.debian.org/639773

Both are minor nuisances and do not affect any functionality.

Bob
signature.asc
0 new messages