Availability
Warning
The console commands in this section have not yet been validated. This warning will be removed when it is safe to copy and paste the code examples.
Now we want to see how Tahoe provides availability in the event of a storage failure. So we will add storage nodes, upload files and see what happens in a failure scenario.
See how Tahoe handles failures
Upload
image0tostorage00add storage1, a local storage node
modify the client to use storage1 (share settings and storage fURL
Upload
image1fileShut down the
storage00nodeDownload the
image0= failDownload the ``image1``= success
Note
Learn more about failure scenarios in the section about Reliability under architecture.
Upload a file to Tahoe
tahoe put …
Check with CLI
Upload the first file
Tahoe -d ./ put ~/image0.png > image0_uri (notice the long ugly URI…)
Notice the long URI
cat image0_uri
Download the first file
tahoe -d ./ get $(cat image0_uri) > image0_download
open both files to compare the contents….
Now let’s skip the long URIs
tahoe -d ./ create-alias pictures: (creates directory on the storage grid)
tahoe -d ./ put ~/image0.png pictures: (see? much nicer)
$ tahoe ls pictures: to see the contents of the pictures “directory”
Add a new storage node
$ tahoe --node-directory=./storage1 create-node \
--hostname=localhost \
--nickname=storage1 \
--shares-happy=1 \
--shares-needed=1 \
--shares-total=1
--webport=none
Add the storage1 fURL and key
edit rhwe client config as you did in :ref:`Prepare the client`_
Start the tahoe with CLI
tahoe run…
See the storage replication
Check with CLI
tahoe status
Download the first file
it should fail, __because….__
Note
The files are not permanently lost. Learn more about availability in the TODO section on failure scenarios.
Upload a second file
Check with CLI
Note
Save the URI !
A node goes offline
Check with CLI
tahoe status …
Download the second file
Note
This was uploaded with the new share settings