Defining Failure Domains
Based on the levels of hierarchy described above, you can use the
pstorage set-attr
command to define failure domains for proper file replica allocation:
# pstorage -c
<cluster_name>
set-attr -R -p /failure-domain=<disk|host|rack|row|room>
where
-
disk
means that only 1 replica is allowed per disk or chunk server,
-
host
means that only 1 replica is allowed per host (default),
-
rack
means that only 1 replica is allowed per rack,
-
row
means that only 1 replica is allowed per row,
-
room
means that only 1 replica is allowed per room.
You should use the same configuration for all cluster files as it simplifies the analysis and is less error-prone.
As an example, do the following to configure a 5-rack setup:
-
Assign
0.0.1
to
/etc/pstorage/location
on all hosts from the first rack,
0.0.2
on all hosts from second rack, and so on.
-
Create 5 metadata servers: 1 on any host from the first rack, 1 on any host from second rack, and so on.
-
Configure Parallels Cloud Storage to have only 1 replica per rack (assuming that the cluster name is
pcs1
):
# pstorage -c pcs1 set-attr -R -p /failure-domain=rack
-
Create CS services with the
pstorage-make-cs
command as described in
Setting Up Chunk Servers
.
|