Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow create gluster without manage lvm volumes #76

Closed
theundefined opened this issue Dec 5, 2016 · 5 comments
Closed

Allow create gluster without manage lvm volumes #76

theundefined opened this issue Dec 5, 2016 · 5 comments

Comments

@theundefined
Copy link
Contributor

I would like to create glusterfs on previously created volumes. I've added empty gluster.server.disks table to not create partitions there, then I've added brick_mount_path to correct dir, set volumes... but it doesn't work. I'ave received error:

 NoMethodError
  -------------
  undefined method `[]' for nil:NilClass

on line:
24>> peer_bricks = chef_node['gluster']['server']['volumes'][volume_name]['bricks'].select { |brick| brick.include? volume_name }

@shortdudey123
Copy link
Owner

Currently only LVM managed bricks are supported. The brick list is created in the server_setup recipe.

Have you tried setting that yourself?
node.default['gluster']['server']['volumes'][volume_name]['bricks'] = ['/mnt/data/brick1/', etc...]

@theundefined
Copy link
Contributor Author

it doesn't work.
I have manually configured:
volume name "staticfiles", bricks in /srv/space/staticfiles
servers : node1 and node2

"by hand" i created it using something like

gluster volume create staticfiles rep 2 transport tcp node{1..2}:/srv/space/staticfiles
gluster volume start staticfiles
mount -t glusterfs node1:/staticfiles /srv/staticfiles

(of course after probing servers)

I've tried to recreate that configuration using chef by setting attributes:

    "gluster": {
      "server": {
        "disks": [   ],
        "brick_mount_path": "/srv/space/",
        "volumes": {
          "staticfiles": {
            "peers": [
              "node1",
              "node2"
            ],
            "replica_count": 2,
            "volume_type": "replicated",
            "bricks": [
              "/srv/space/staticfiles/"
            ]
          }
        }

@shortdudey123
Copy link
Owner

shortdudey123 commented Dec 6, 2016

I can look at adding support for existing disks. Feel free to submit a PR if you wish though :)

@theundefined
Copy link
Contributor Author

please, #77 :-)

@shortdudey123
Copy link
Owner

Released under v5.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants