Hello everyone, this video I will continue the series of videos about building a private cloud with an old hard drive
In this video I will show you how to replace the hard drive in case the hard drive fails
Let's say the 500GB hard drive fails and I have to replace it with another hard drive
I use a hard drive with the same capacity to replace
You can use a larger capacity hard drive to replace
You replace the hard drive and then start your own cloud server
Then you will get an error message and you will not be able to boot as usual
You cannot access it remotely from another computer
So you need to execute the commands directly on your target server
First you need to make sure your server has detected the new hard drive
So the server detected the new hard drive as sdd
A new hard drive with a capacity of 465GB
First you create a partition for the new hard drive with the command sudo gdisk /dev/sdd
o key to create a single partition for the entire hard drive
n key to create new partition
Press p to see the result
W key to save changes
Next with the new hard drive you create the Filesystem ext4
You replace x with your drive
In my case sdd1
It will be different for you
Next you create a new directory to mount your new hard drive
sudo mkdir /mnt/disk3
To create a mount you need to get the identifier of the new hard drive
So much information that I can't find my hard drive's identifier
So when I will use another command
And this is the identifier I want to find
Identification of the new 500 GB hard drive
You edit the fstab file to mount the disk3 folder with the new hard drive
You replace disk2 with disk3
Next you replace the old identifier with the new identifier
The rest of the configuration you do not change
In my case disc 2 failed so I replaced it with disc 3
Don't forget to save your changes and close the configuration file
For the changes to be applied use the command sudo mount -a
Now you need to restart your computer
You restart the computer and you can access the Cloud Server from another computer
You should not add edit delete data with your cloud
You can now access the Cloud Server from another computer
ssh username @ ip address
As you can see the mounts are finished
The hard drives have been merged into one thanks to the mergerfs
Next you configure snapraid to recover your data
You open snapraid's configuration file and replace disk 2 with disk 3
Save changes and close the file
You run the debug command and create a log file
sudo snapraid -d d2 -l fix.log fix
Perform error checking before data recovery
sudo snapraid -d d2 -a check
And finally you recover your data
sudo snapraid sync
Fast or slow depending on your data more or less
I like this command very much I will run it again
You open the configuration file and finalize it
So I have introduced how to replace the hard drive when it fails
I will go to the private cloud and check if it works well
So my cloud work fine
Now you can upload download your data
Thanks for watching don't forget to like and subscribe