Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661912 - sys-cluster/ceph: startup script should include mounting the bluefs when using bluestore
Summary: sys-cluster/ceph: startup script should include mounting the bluefs when usin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-23 17:47 UTC by jonas.licht
Modified: 2019-02-02 11:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonas.licht 2018-07-23 17:47:35 UTC
Hi

I'm using cephs osd with there own filesystem called bluefs.
It contains e.g. the keyring file, which is needed for the deamon to startup.

To do this mount, I must run ceph-volume lvm activate 2 5a05cb5a-56e6-4f04-8f18-94656e46ac27 --no-systemd.
This do the following:
Running command: /bin/mount -t tmpfs tmpfs /var/lib/ceph/osd/ceph-2
Running command: /usr/bin/ceph-bluestore-tool --cluster=ceph prime-osd-dir --dev /dev/ceph-64ccf941-8ff9-4dda-8170-4393b4b49bc8/osd-block-5a05cb5a-56e6-4f04-8f18-94656e46ac27 --path /var/lib/ceph/osd/ceph-2
Running command: /bin/ln -snf /dev/ceph-64ccf941-8ff9-4dda-8170-4393b4b49bc8/osd-block-5a05cb5a-56e6-4f04-8f18-94656e46ac27 /var/lib/ceph/osd/ceph-2/block
Running command: /bin/chown -R ceph:ceph /dev/dm-0
Running command: /bin/chown -R ceph:ceph /var/lib/ceph/osd/ceph-2
Running command: /bin/ln -snf /dev/vg0/lvol0 /var/lib/ceph/osd/ceph-2/block.wal
Running command: /bin/chown -R ceph:ceph /dev/dm-1
Comment 1 Larry the Git Cow gentoo-dev 2018-11-29 23:57:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f

commit bbbd36a51a7a23e7d7d40e881e4d703a3a4ac25f
Author:     Patrick McLean <chutzpah@gentoo.org>
AuthorDate: 2018-11-29 23:56:27 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2018-11-29 23:56:27 +0000

    sys-cluster/ceph: Version bump to 12.2.10
    
    Also update init script for radosgw args (bug #670066) and bluefs
    mounting (bug #661912)
    
    Bug: https://bugs.gentoo.org/670066
    Bug: https://bugs.gentoo.org/661912
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 sys-cluster/ceph/Manifest             |   1 +
 sys-cluster/ceph/ceph-12.2.10.ebuild  | 308 ++++++++++++++++++++++++++++++++++
 sys-cluster/ceph/files/ceph.confd-r5  |  15 ++
 sys-cluster/ceph/files/ceph.initd-r10 | 108 ++++++++++++
 4 files changed, 432 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2018-11-30 01:28:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96df26d385f072bf63b8884b26129f726f3b2e14

commit 96df26d385f072bf63b8884b26129f726f3b2e14
Author:     Patrick McLean <chutzpah@gentoo.org>
AuthorDate: 2018-11-30 01:28:27 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2018-11-30 01:28:27 +0000

    sys-cluster/ceph: Revision bump to 13.2.2-r3
    
    Update to new version of confd and init scripts.
    
    Closes: https://bugs.gentoo.org/670066
    Closes: https://bugs.gentoo.org/661912
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 sys-cluster/ceph/{ceph-13.2.2-r2.ebuild => ceph-13.2.2-r3.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Stuart Longland 2019-02-02 10:57:22 UTC
Silly question, but I've been bitten by this bug too, and I see in the commit related to this bug, the following got added to the init script:

        if [ -n "${bluestore_osd_fsid}" ]; then
                einfo "Mounting Bluestore"
                ceph-volume lvm activate "${daemon_id}" "${bluestore_osd_fsid}" --no-systemd
        fi


Question is, how does `bluestore_osd_fsid` get set?  Right now my workaround is to tar up the data directory, unmount the tmpfs, then untar my back-up so I have a persistent copy.  This isn't ideal and isn't how it's supposed to work.  If that variable was set, it should handle this for me.
Comment 4 jonas.licht 2019-02-02 11:14:38 UTC
I've made a README update in Pull Request:
https://github.com/gentoo/gentoo/pull/10468/files#diff-ece4b1d409b645e53f039d47e37ea407

So you simply create a conf.d file for each OSD, which contains the variable.