7 min to complete
This lesson explains commonly used admin procedures such as: bootstrapping a new node into a cluster, removing a node, replacing a node, adding a data center to a cluster, repair operations, and backup and restore. It includes examples and links to further information.
Admin procedures basically bootstrap our new node into a cluster you already
had other sessions so I’m assuming you install Scylla with you know the
repository you run Scylla set up you edit your yaml file right and then there
you go you have a node running it’s the same steps so you just have to specify
on your yaml that you have the same cluster name that your IPs are matching
the right ports and there are right addresses and it’s going to contact your
your seed and it’s going to join the cluster it’s it cannot be more
straightforward than that and again I know we have limited time here this is
the type of thing that you should do on the hands on session if by mistake
let’s say you made a mistake on your yaml file for example you put the wrong
cluster name and now the node it’s not going to join you just clear up the
commit log in the data file and then you restart your node you should join
because well people make mistakes that’s how you circumvent that problem
that’s the process so that that is the new node it’s talking to the seed the
seed is going to tell it the topology and it’s going to join it’s pretty straight forward
after the new node joined, on all the other nodes you run nodetool clean up just
to make sure because now the the token ranges were redistributed so you wanted
the old nodes get rid of those token ranges that were transferred to the new
node, remove a node we have three use cases hardware problems reduced cost
lower demand so there are two cases that you want to remove a node one it’s
because you’re planning ahead you’re removing your node for whatever reasons
maybe you know you have a lower workload right now if the all the nodes are on a
healthy state then you can just issued node to decommission it’s going to
restream all the data back to the other nodes we distribute everything and then
you’re done and then there’s the other case where you already lost that nude
right you had a harder problem you’ve had some kind of failure and then you
can do two things you can remove that node for good so you run nodetool remove
node to let the cluster know that that node is not coming back so it’s going to
redistribute the token ranges and after that of course you run a repair or you
can replace that node right again you had a node that you lost you’re going to
bring another box another VM whatever and you’re going to replace that node
it’s the same procedure that we used to bootstrap a node but with the added
option of replace address so you’re going to get the IP from that node that
you lost you’re going to replace that address and it’s going to join it’s
going to string out all the data again every time you have a problem in your
cluster so it’s wise you’ve run a repair after that seed nodes are nothing
special it’s just a point of entry to your cluster so but there are two things
you you should have in mind regarding seeds first one is when you join your
new node or when you’re replacing a node you never joined the cluster has a
seed because then it’s not going to stream any any data so you should join
has a regular node and after that after it’s up and normal then you can promote
it to a seed the last one the last procedure is
adding a data center so basically you are going to create a new data center on
on your key spaces you you’re going to add that data center with replication 0
after you have all your nodes ready and you deal everything as we mentioned
before configured the Scylla yaml all that then you start those nodes so same
procedure that I mentioned before you know installation Scylla setup
configuring the yaml starting up after after the DC’s there you’re going to
change the replication factor for that. DC for whatever you want in this
case is 3 but maybe you want a different replication factor on the new DC and
then you’re going to run nodetool rebuild with the new DC name and the existing
one and it’s going to stream all the data from the first DC and it’s going to
build that DC again I know it’s a lot of a lot of stuff we have very little
time backups are done with nodetool snapshot it’s going to put it on that
path that you see there for our lib/scylla/data then the key space name the
table name slash snapshot they are all going to be there you can use nodetool list
snapshots to see all the snapshots that you have clear snapshots if you want to
get rid of the old ones if you want to restore one of the snapshots what
you do is you clear the commit log you clear that the DB files for that
particular table and you put the snapshots there and you restart the node
optionally you could put it on the uploads directory and run nodetool refresh
but again the documentation is there what else
so I think that’s what I had for today I told you guys that it was going to be
intensive