I created a 2TB volume to increase space on home directory.

I created the partition:

$ parted /dev/xvdb mklabel gpt
$ parted -s /dev/xvdb mkpart primary ext4 1 100%

Formatted the partition:

$ mkfs.ext4 -I 512 /dev/xvdb1

Added the entry to /etc/fstab

/dev/xvdb /export/home/brick3 ext4 defaults 0 0

Created the mountpoint:

$ mkdir -p /export/home/brick3
$ chmod 0755 /export/home/brick3

Mounted the partition:

$ mount /export/home/brick3
$ mkdir /export/home/brick3/home
$ chmod 0775 /export/home/brick3/home

once I tried to add the new brick to volume thats where I get an error.

$ gluster volume add-brick home <hostname>:/export/home/brick3/home
volume add-brick: failed Incorrect number of bricks supplied 1 with count 2
  • What's the output of the home volume look like? gluster volume info? – slm Jul 12 '18 at 2:34
  • /dev/xvdca1 992G 843G 99G 90% /export/home/brick1 /dev/xvdcn1 992G 82G 859G 9% /export/home/brick2 /dev/xvdcp1 1.8T 68M 1.8T 1% /export/home/brick3 – Mervyn Clarke Jul 16 '18 at 18:39
  • Please add this to your Q. – slm Jul 16 '18 at 18:47
  • I am adding all three after gluster volume add-brick... ? – Mervyn Clarke Jul 16 '18 at 19:01
  • You need to add the number of replicas to that – slm Jul 16 '18 at 19:11

You need to include the replica $COUNT. This is a known issue when you have replicas enabled:

Current design constraints in replicate module doesn't allow for us to add individual bricks into an existing topology.


You tried something like this:

$ gluster vol add-brick test-volume-replicated3 \

volume add-brick: failed: Incorrect number of bricks supplied 1 with count 2

Your scenario is likely one where you have a number of replicas configured for your gluster volume because it was built like this originally:

$ gluster vol create test-volume-replicated3 replica 3 \
    host1:/rhss/bricks/brick1/test-volume-replicated3 \
    host2:/rhss/bricks/brick1/test-volume-replicated3 \
volume create: test-volume-replicated3: success: please start the volume to access data

And currently its topology is now like this:

$ gluster vol info test-volume-replicated3

Volume Name: test-volume-replicated3
Type: Replicate
Volume ID: 10b3d0e2-14a2-4ec3-a98c-9a3307f3fd8f
Status: Created
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Brick1: host1:/rhss/bricks/brick1/test-volume-replicated3
Brick2: host2:/rhss/bricks/brick1/test-volume-replicated3
Brick3: host3:/rhss/bricks/brick1/test-volume-replicated3

So to get your command to run you have to tell gluster your replica count when adding another brick:

$ gluster vol add-brick test-volume-replicated3 replica 3 \
   host:/rhss/bricks/brick1/test-volume-replicated3 \
   host:/rhss/bricks/brick2/test-volume-replicated3 \


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.