Adding brick volume to gluster fails

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












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






share|improve this question





















  • What's the output of the home volume look like? gluster volume info?
    – slm♦
    Jul 12 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 at 18:39











  • Please add this to your Q.
    – slm♦
    Jul 16 at 18:47










  • I am adding all three after gluster volume add-brick... ?
    – Mervyn Clarke
    Jul 16 at 19:01










  • You need to add the number of replicas to that
    – slm♦
    Jul 16 at 19:11














up vote
1
down vote

favorite












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






share|improve this question





















  • What's the output of the home volume look like? gluster volume info?
    – slm♦
    Jul 12 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 at 18:39











  • Please add this to your Q.
    – slm♦
    Jul 16 at 18:47










  • I am adding all three after gluster volume add-brick... ?
    – Mervyn Clarke
    Jul 16 at 19:01










  • You need to add the number of replicas to that
    – slm♦
    Jul 16 at 19:11












up vote
1
down vote

favorite









up vote
1
down vote

favorite











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






share|improve this question













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








share|improve this question












share|improve this question




share|improve this question








edited Jul 12 at 2:33









slm♦

233k65479651




233k65479651









asked Jul 11 at 14:37









Mervyn Clarke

184




184











  • What's the output of the home volume look like? gluster volume info?
    – slm♦
    Jul 12 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 at 18:39











  • Please add this to your Q.
    – slm♦
    Jul 16 at 18:47










  • I am adding all three after gluster volume add-brick... ?
    – Mervyn Clarke
    Jul 16 at 19:01










  • You need to add the number of replicas to that
    – slm♦
    Jul 16 at 19:11
















  • What's the output of the home volume look like? gluster volume info?
    – slm♦
    Jul 12 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 at 18:39











  • Please add this to your Q.
    – slm♦
    Jul 16 at 18:47










  • I am adding all three after gluster volume add-brick... ?
    – Mervyn Clarke
    Jul 16 at 19:01










  • You need to add the number of replicas to that
    – slm♦
    Jul 16 at 19:11















What's the output of the home volume look like? gluster volume info?
– slm♦
Jul 12 at 2:34




What's the output of the home volume look like? gluster volume info?
– slm♦
Jul 12 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 at 18:39





/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 at 18:39













Please add this to your Q.
– slm♦
Jul 16 at 18:47




Please add this to your Q.
– slm♦
Jul 16 at 18:47












I am adding all three after gluster volume add-brick... ?
– Mervyn Clarke
Jul 16 at 19:01




I am adding all three after gluster volume add-brick... ?
– Mervyn Clarke
Jul 16 at 19:01












You need to add the number of replicas to that
– slm♦
Jul 16 at 19:11




You need to add the number of replicas to that
– slm♦
Jul 16 at 19:11










1 Answer
1






active

oldest

votes

















up vote
0
down vote













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.




Scenario



You tried something like this:



$ gluster vol add-brick test-volume-replicated3 
host:/rhss/bricks/brick1/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
host3:/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
Bricks:
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
host:/rhss/bricks/brick3/test-volume-replicated3


References



  • How to add a new brick to an existing replicated volume?





share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454707%2fadding-brick-volume-to-gluster-fails%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    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.




    Scenario



    You tried something like this:



    $ gluster vol add-brick test-volume-replicated3 
    host:/rhss/bricks/brick1/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
    host3:/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
    Bricks:
    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
    host:/rhss/bricks/brick3/test-volume-replicated3


    References



    • How to add a new brick to an existing replicated volume?





    share|improve this answer

























      up vote
      0
      down vote













      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.




      Scenario



      You tried something like this:



      $ gluster vol add-brick test-volume-replicated3 
      host:/rhss/bricks/brick1/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
      host3:/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
      Bricks:
      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
      host:/rhss/bricks/brick3/test-volume-replicated3


      References



      • How to add a new brick to an existing replicated volume?





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        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.




        Scenario



        You tried something like this:



        $ gluster vol add-brick test-volume-replicated3 
        host:/rhss/bricks/brick1/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
        host3:/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
        Bricks:
        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
        host:/rhss/bricks/brick3/test-volume-replicated3


        References



        • How to add a new brick to an existing replicated volume?





        share|improve this answer













        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.




        Scenario



        You tried something like this:



        $ gluster vol add-brick test-volume-replicated3 
        host:/rhss/bricks/brick1/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
        host3:/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
        Bricks:
        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
        host:/rhss/bricks/brick3/test-volume-replicated3


        References



        • How to add a new brick to an existing replicated volume?






        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jul 12 at 2:41









        slm♦

        233k65479651




        233k65479651






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454707%2fadding-brick-volume-to-gluster-fails%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?