ceph - down pgs after lost osd

Posted on Wed 19 August 2020 in Ceph • Tagged with ceph, osd, pgs, howto, linux, notepad, work • 1 min read

Initial situation / Issue

  • pool size = 1 (Don't ask why)
  • lost/crashed osd
  • pgs down/incomplete

Verify

$ ceph pg <id> query
{
    "snap_trimq": "[]",
    "snap_trimq_len": 0,
    "state": "active+clean",
    "epoch": 348,
    "acting": [
        87
    ],
[...]
         "blocked": "peering is blocked due to down osds",
         "down_osds_we_would_probe": [
               60],
         "peering_blocked_by": [
               { "osd": 60,
                 "current_lost_at": 0,
                 "comment": "starting or marking this …

Continue reading

ceph - rbd namespaces

Posted on Mon 14 October 2019 in Ceph • Tagged with ceph, rbd, namespace, radosgw, howto, linux, notepad, work • 1 min read

Fun with rbd namespaces

cli

# rbd --namespace $namespace $command $pool/$image
# rbd $command $pool/$namespace/$image

create

# rbd namespace ls --format=json
[]
# rbd namespace create --namespace newns1
# rbd namespace ls --format=json
[{"name":"newns1"}]
# rbd create --namespace newns1 newrbd1 --size 1G
# rbd ls --long
# rbd --namespace newns1 ls --long
NAME …

Continue reading

gpg - export all (private-)keys

Posted on Sat 04 May 2019 in Linux • Tagged with howto, linux, notepad, gpg • 1 min read

GPG export

for keyid in $( gpg -K --with-colons | grep ^sec | cut -d: -f5 ); do \
  [[ -d ~/.gnupg/export ]] || mkdir ~/.gnupg/export; \
  gpg --export -a --export-options export-minimal --output ~/.gnupg/export/${keyid}.pub $keyid; \
  gpg --export-secret-keys -a --output ~/.gnupg/export/${keyid}.key $keyid;
done

For a public key without signatures use --export-options export-minimal …


Continue reading

cryptsetup - remote unlocking over ssh

Posted on Fri 03 May 2019 in Linux • Tagged with howto, linux, notepad, work, initrd • 1 min read

Notes

Only vaild for Ubuntu/Debian!

Package(s)

  • dropbear-initramfs

Configuration

ip config

# egrep "(DEVICE|IP)=" /etc/initramfs-tools/initramfs.conf 
DEVICE=enp3s0f0
IP=10.12.13.11::10.12.13.1:255.255.255.0::enp3s0f0:off
IP=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:
   <device>:<autoconf>:<dns0-ip>:<dns1 …

Continue reading

Quickstart guide with kolla-ansible (for rocky)

Posted on Fri 15 February 2019 in openstack • Tagged with openstack, kolla, ansible, howto, linux, notepad, work • 2 min read

Requirements

  • kolla-ansible (testet with 7.0.1)
  • ansible (testet with 2.6.13)
  • epel-release (for centos)
  • python-pip

And some magic:

  • vagrant
  • vagrant-libvirt plugin
  • vagrant config

Quickstart

We will run all commands on our admin-node (vagrant ssh kolla-admin)

sudo yum install -y epel-release
sudo yum install -y python2-pip
sudo …

Continue reading

ceph/rgw metasearch with elasticsearch 6.x

Posted on Tue 29 January 2019 in Ceph • Tagged with ceph, elasticsearch, radosgw, howto, linux, notepad, work • 1 min read

Houston, we have a problem

Since elasticsearch 6.x requires to provide the correct content-type for a request and the elastic sync module has no option for the content-type....we stucked at elastic 5.x

Error message

{"error":"Content-Type header [] is not supported","status":406}

strace log

strace -e network …

Continue reading

ceph - wrong osd id with lvm+filestore

Posted on Wed 04 July 2018 in Ceph • Tagged with bluestore, ceph, ceph-ansible, LVM, linux, notepad, howto • 2 min read

Not sure why...but i've found a strange ceph-volume behavior with lvm and filestore.

ceph-volume lvm list shows the wrong osd id while the affected osd is online with a another id.

$ mount | grep ceph-2
/dev/mapper/vg00-datalv1 on /var/lib/ceph/osd/ceph-2 type xfs (rw,relatime,seclabel,attr2 …

Continue reading

ceph metasearch – elasticsearch backend - part 2

Posted on Thu 27 April 2017 in Ceph • Tagged with ceph, elasticsearch, radosgw, howto, linux, notepad, work • 2 min read

ceph-kraken

requirements

  • ceph cluster (kraken release)
  • elasticsearch

The rgw syncer is only used/triggered in multisite configurations - so we need to setup a second zone for the metasearch.

environment / settings
export rgwhost="192.168.122.80"
export elastichost="192.168.122.71"
export realm="demo"
export zonegrp="zone-1"
export 1zone="zone1-a …

Continue reading

ceph radosgw (set)lifecycle - AWS v4 is broken

Posted on Wed 26 April 2017 in Ceph • Tagged with ceph, elasticsearch, radosgw, howto, linux, notepad, work • 1 min read

First - s3cmd config
Setting signature_v2 = true is not enough! You have to set --signature-v2 as a parameter.

Second - 'Prefix' tag
You have specify a Prefix tag - and yes with a captial P!

without prefix tag
<LifecycleConfiguration>
    <Rule>
        <ID>ExampleRule</ID>
    <Status>Enabled</Status>
        <Expiration>
             <Days>1</Days>
        </Expiration>
    </Rule>
</LifecycleConfiguration …

Continue reading

ceph metasearch - elasticsearch backend

Posted on Fri 21 April 2017 in Ceph • Tagged with ceph, elasticsearch, radosgw, howto, linux, notepad, work • 1 min read

ceph-kraken

Fetch zonegroup configuration (json struct)
# radosgw-admin zonegroup get > /tmp/zonegroup.json

change the tier_type to elasticsearch

Import the configuration
# radosgw-admin zonegroup set --infile /tmp/zonegroup.json
Fetch zone configuration (json struct)
# radosgw-admin zone get > /tmp/zone.json

Add the following parameter endpoint & {url} for the section tier_config

    "tier_config": [
        {
            "key": "endpoint …

Continue reading