puppet-gluster icon indicating copy to clipboard operation
puppet-gluster copied to clipboard

Combination of `add-brick` and `replica` and `stripe` seems to be invalid

Open zstyblik opened this issue 9 years ago • 2 comments

Hello,

it seems to me like combination of add-brick and replica and stripe is invalid.

/usr/sbin/gluster volume add-brick logs stripe 2 replica 2 <new_brick1> <new_brick2>
Wrong brick type: 2, use <HOSTNAME>:<export-dir-abs-path>
Usage: volume add-brick <VOLNAME> [<stripe|replica> <COUNT>] <NEW-BRICK> ... [force]

However, the same command without replica 2

/usr/sbin/gluster volume add-brick logs stripe 2 <new_brick1> <new_brick2>
Changing the 'stripe count' of the volume is not a supported feature. In some cases it may result in data loss on the volume. Also there may be issues with regular filesystem operations on the volume after the change. Do you really want to continue with 'stripe' count option ?  (y/n) n

Now, how this came to be. I've setup glusterfs with two servers and replica factor 2 first.

  gluster::peer { $gluster_peers:
    pool    => 'xxx',
  }
  gluster::volume { 'xxx':
    replica => 2,
    bricks  => $gluster_bricks,
    require => Gluster::Peer[$gluster_peers],
  }

Then I've decided to throw in two more servers and add stripe => 2, because that was original plan and I wanted to test it. You know the rest.

I'm not sure about how to fix this. I guess don't add replica when adding new brick? stripe and the fact you're unable to change it is probably another story :)

zstyblik avatar Aug 05 '15 07:08 zstyblik