Menü Schließen

GlusterFS – Brick einem Striped mit anderem Stripe Count hinzufügen

Gluster Logo

System ist ein Debian Wheezy mit GlusterFS 3.4. und einem Volume vom Typ Striped mit 2 Bricks.
Ziel bzw. Test ist es das Verhältnis von 1*2=2, also das für jede Erweiterung immer 2 neue Bricks benötigt werden, auf 1*3=3 bzw. 1*4=4 zu ändern.

1. Status quo
# gluster volume info
Volume Name: vol1
Type: Stripe
Volume ID: e2c07968-4f01-441f-b936-58a643bac7c7
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: glusternode1:/gluster/striped
Brick2: glusternode2:/gluster/striped
Options Reconfigured:
auth.allow: 192.168.0.*

Hier schön zu sehen wie beide Bricks dem vol1 angehören und vom Type Stripe mit 1×2=2 laufen.

2. als erstes wird der neue Brick die neuen Bricks / Server dem Trusted Pool hinzugefügt
# gluster peer probe glusternode3 bzw. gluster peer probe glusternode4
Peer probe successful

3. Add mit Fehler bei ungerader Anzahl :
# gluster volume add-brick vol1 glusternode3:/striped
volume add-brick: failed: Incorrect number of bricks supplied 1 with count 2 gluster volume add-brick vol1 glusternode3:/striped    volume add-brick: failed: Incorrect number of bricks supplied 1 with count 2

4. daher nun mit zusätzlicher Änderung der Stripe Count mit korrekter Angabe von 2 auf 3
# gluster volume add-brick vol1 stripe 3 glusternode3:/striped
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)
volume add-brick: success

4.1 soweit so gut – Kontrolle der Änderung
# gluster volume info
Volume Name: vol1
Type: Stripe
Volume ID: e2c07968-4f01-441f-b936-58a643bac7c7
Status: Started
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: glusternode1:/gluster/striped
Brick2: glusternode2:/gluster/striped
Brick3: glusternode3:/striped
Options Reconfigured:
auth.allow: 192.168.0.*

5. nun noch eine Änderung der Stripe Count mit korrekter Angabe von 2 auf 4
#gluster volume add-brick vol1 stripe 4  glusternode3:/glusterfs/striped glusternode4:/glusterfs/striped
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)
volume add-brick: success

5.1 auch hier die Kontrolle der Änderung
# gluster volume info
Volume Name: vol1
Type: Stripe
Volume ID: 98ae3e8c-31c8-4ff5-9bbd-e80ca10f87e6
Status: Started
Number of Bricks: 1 x 4 = 4
Transport-type: tcp
Bricks:
Brick1: glusternode1:/gluster/striped
Brick2: glusternode2:/gluster/striped
Brick3: glusternode3:/gluster/striped
Brick4: glusternode4:/gluster/striped
Options Reconfigured:
auth.allow: 192.168.0.*

Ergebnis
Am Ende war es so, dass ob mit grader (4) oder ungerader (3) Anzahl an Bricks, keine Balancing möglich war und auch die Daten nicht mehr angezeigt wurden, obwohl die Größe des Volumes nach dem Inhalt der Daten aussah, also Speicherplatz verbraucht wurde.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert