Fix volgen to handle distribute groups correctly for volume type = "Distribute"
vatsa287 opened this issue · 0 comments
vatsa287 commented
When a volume is created or expanded(WIP), the volgen creates a client volfile with multiple distributed groups even for a pure distribute volume as in ,
volume vol1-distribute
type cluster/distribute
subvolumes vol1-distribute-0 vol1-distribute-1
end-volume
For,
root@kadalu-dev:/src/mgr# ./bin/kadalu volume create dev/vol1 kadalu-dev:/mnt/disk1 kadalu-dev:/mnt/disk2
Volume vol1 created
ID: 7e33fdb3-da50-4cd5-9a36-16c08a7d0448
Whereas this should have been single distribute group with 2 storage units not the other way.
Fix in volgen to create correct volfiles for volume.type = "Distribute"
Ref. volfile generated in above issue case,
root@kadalu-dev:/src/mgr# cat /var/lib/kadalu/volfiles/vol1.vol
volume vol1-distribute-1-client-1
type protocol/client
option remote-subvolume /mnt/disk2
option remote-host kadalu-dev
option remote-port 49253
end-volume
volume vol1-distribute-1
type cluster/distribute
subvolumes vol1-distribute-1-client-1
end-volume
volume vol1-distribute-0-client-0
type protocol/client
option remote-subvolume /mnt/disk1
option remote-host kadalu-dev
option remote-port 49252
end-volume
volume vol1-distribute-0
type cluster/distribute
subvolumes vol1-distribute-0-client-0
end-volume
volume vol1-distribute
type cluster/distribute
subvolumes vol1-distribute-0 vol1-distribute-1
end-volume
volume vol1-utime
type features/utime
subvolumes vol1-distribute
end-volume
volume vol1-write-behind
type performance/write-behind
subvolumes vol1-utime
end-volume
volume vol1
type debug/io-stats
subvolumes vol1-write-behind
end-volume
volume meta-autoload
type meta
subvolumes vol1
end-volume