[SOLVED] Enable KRBD on non-KRBD Ceph Pool

Discussion in 'Proxmox VE: Installation and configuration' started by symmcom, Mar 15, 2019.

  1. symmcom

    symmcom Active Member

    Joined:
    Oct 28, 2012
    Messages:
    1,062
    Likes Received:
    16
    I do not have a test Ceph cluster to test this with, so wondering if anybody got some info.

    I have always used 2 ceph pools for KVM and LXC disk images. On LXC Ceph pool I had KRBD enabled while the pool for KVM disk images had KRBD disabled.

    My question is, can I enable KRBD on the non-KRDB pool which has live VM disk images and move LXC disk images onto it or will enabling KRBD on it will mess up data?

    Basically trying to eliminate unnecessary Ceph pools to reduce the number of PGs. How are you Ceph users using pools?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Zombie

    Zombie New Member

    Joined:
    Feb 12, 2018
    Messages:
    1
    Likes Received:
    0
    I would like to hear what others have to say about it too. Someone mentioned there was pros and cons for having KRBD enabled or not enabled.
     
  3. alexskysilk

    alexskysilk Active Member

    Joined:
    Oct 16, 2015
    Messages:
    539
    Likes Received:
    58
    You can add a second storage pool using the same ceph pool, one with krbd and one without, and no, it doesnt mess up any data :) This is also the default behavior when you use the proxmox gui to create a ceph pool.
     
  4. symmcom

    symmcom Active Member

    Joined:
    Oct 28, 2012
    Messages:
    1,062
    Likes Received:
    16
    I think my initial post was not clear enough. I am already using 2 pools, one for KVM disk images with KRBD disabled, and the other for LXC containers with KRBD enabled.
    My question was if I can enable KRBD for the non KRBD pool and start storing LXC containers along with KVM disk images on the same Ceph pool. The non-KRBD pool right now holds a lot of KVM disk images. So was wondering enabling KRBD option on to the non-KRBD pool does anything to the disk images it currently holds.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. alexskysilk

    alexskysilk Active Member

    Joined:
    Oct 16, 2015
    Messages:
    539
    Likes Received:
    58
    Yes. krbd doesnt have anything to do with CEPH, it has to do with how you are mounting the devices on your host. As long as you create a second PROXMOX storage pool, you can attach the same CEPH pool.

    eg: rbd_ct and rbd_vm actually point to the same ceph pool:

    upload_2019-3-15_11-21-59.png

    upload_2019-3-15_11-23-8.png
    upload_2019-3-15_11-23-44.png

    If you check on your ceph pool, rbd ls will show you both your containers and your vm disks as they all coexist :)
     
  6. symmcom

    symmcom Active Member

    Joined:
    Oct 28, 2012
    Messages:
    1,062
    Likes Received:
    16
    Thank you guys for all your input. It worked fine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Alwin

    Alwin Proxmox Staff Member
    Staff Member

    Joined:
    Aug 1, 2017
    Messages:
    2,097
    Likes Received:
    184
    I want to throw in, that with the latest PVE version for containers the KRBD option doesn't need to be set anymore. As a container needs to use KRBD anyway to get a mapped device.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice