Skip to contentSkip to conversation

HEALTH_WARN 192 pgs degraded

ceph-commit Josh Durgin 4 participants 5 messages Oct 24, 2012 – Oct 25, 2012 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Moving to ceph-devel, ceph-commit is for notifications from the source code repository

Quoted 20 lines · Roman Alekseev

Hi there,

I've made simple fresh installation of ceph on Debian server with the following configuration:
************************
[global]
debug ms = 0
[osd]
osd journal size = 1000
filestore xattr use omap = true

[mon.a]

host = serv1
mon addr = 192.168.0.10:6789

[osd.0]
host = serv1

Quoted 8 lines

[mds.a]
host = serv1
************************

Seems everything is working fine but when I perform "ceph health" command I receive the next message:
HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean; recovery 21/42 degraded (50.000%)

The default replication level is 2, but you only have 1 osd. Thus, you only have 1 copy of everything, and ceph reports this condition as 'degraded'. You can add a second osd and it will copy data and report HEALTH_OK.

Josh

#2 lore raw
In reply to a message not in the archive

[moved to ceph-devel]

Quoted 20 lines · Roman Alekseev

Hi there,

I've made simple fresh installation of ceph on Debian server with the following configuration:
************************
[global]
debug ms = 0
[osd]
osd journal size = 1000
filestore xattr use omap = true

[mon.a]

host = serv1
mon addr = 192.168.0.10:6789

[osd.0]
host = serv1

Quoted 8 lines

[mds.a]
host = serv1
************************

Seems everything is working fine but when I perform "ceph health" command I receive the next message:
HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean; recovery 21/42 degraded (50.000%)

This is simply because you only have 1 osd but the default policy is 2x replication. As such, all PGs are 'degraded' because they are only replicated once.

If you add another OSD to your cluster the warning will go away.

sage

Quoted 15 lines

Kindly help me to find the reason of this issue.
Thanks.

Signature · 8 lines
Kind regards,

R. Alekseev

_______________________________________________
Ceph-commit mailing list
[email protected]
http://lists.ceph.newdream.net/listinfo.cgi/ceph-commit-ceph.newdream.net
#3 lore raw
Quoted 31 lines · Sage Weil

[moved to ceph-devel]

Quoted 20 lines · Roman Alekseev

Hi there,

I've made simple fresh installation of ceph on Debian server with the following configuration:
************************
[global]
debug ms = 0
[osd]
osd journal size = 1000
filestore xattr use omap = true

[mon.a]

host = serv1
mon addr = 192.168.0.10:6789

[osd.0]
host = serv1

Quoted 8 lines

[mds.a]
host = serv1
************************

Seems everything is working fine but when I perform "ceph health" command I receive the next message:
HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean; recovery 21/42 degraded (50.000%)

Quoted 8 lines

This is simply because you only have 1 osd but the default policy is 2x replication. As such, all PGs are 'degraded' because they are only replicated once.

If you add another OSD to your cluster the warning will go away.

sage

The other alternative is to just set the pool(s) replication size to 1, if you are just wanting a single osd for (say) testing:

$ ceph osd pool set <your pool(s)> size 1

I find it I need to restart ceph after doing the above, it then sorts itself out to a nice healthy status!

Regards

Mark

#4 lore raw
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines

HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean; recovery 21/42 degraded
(50.000%)

Quoted 8 lines

This is simply because you only have 1 osd but the default policy is 2x replication. As such, all PGs are 'degraded' because they are only replicated once.

If you add another OSD to your cluster the warning will go away.

sage

Quoted 7 lines

The other alternative is to just set the pool(s) replication size to 1, if you are just wanting a single osd for (say) testing:

$ ceph osd pool set <your pool(s)> size 1

I find it I need to restart ceph after doing the above, it then sorts itself out to a nice healthy status!

OTOH it should be noted that I'm constantly running test clusters with replication 2, #osd 1, and they're "unhealthy", and work just fine. (These are test clusters, clearly, but...nothing wrong with them.)

#6 lore raw
In reply to a message not in the archive
Quoted 13 lines · Mark Nelson
Quoted 11 lines · Dan Mick

HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean; recovery 21/42

Quoted 8 lines

The other alternative is to just set the pool(s) replication size to 1, if you are just wanting a single osd for (say) testing:

$ ceph osd pool set <your pool(s)> size 1

I find it I need to restart ceph after doing the above, it then sorts itself out to a nice healthy status!

Quoted 11 lines

I was actually just talking to Greg and Sam about this earlier today. If you rely on ceph health as part of an automated process to determine whether or not tests should start running, having degraded PGs due to some of the pools expecting 2x replication (when there is 1 OSD) is annoying. It will go away if whatever default pools are created get manually set to 1x replication, but it's not something that is immediately obvious. I don't know that changing the defaults is necessarily the right answer. Instead perhaps we just haven't done a good enough job of explaining what pools get created, how they are used, and when/if they should be modified in some way . Maybe this belongs in a FAQ?

Ah yes - you are quite right, it is *not* required to restart ceph to make it sort out those stuck pages after changing the size. I believe at some point (maybe < 0.50) it was and I had gotten into the habit!

+1 for adding a FAQ about the defaults pools and replication levels etc.

Cheers

Mark