Kategorien
Blog Software

Server crash

Not the sudo RaspberryPi, also knows as the CuBox, nor the Linux/Raspbian is making the most problems of my server, but very often it’s the hardware.

This time it was the hard disk. A Toshiba one, working since almost 3 years now, quite ok, only troubled by the other hardware problem I faced so far with the server, the USB hub.

Now the server was down. Normally this was not a big deal so far, just make a

fsck -y /dev/sda1

and everything was OK after some reboots.

This time it was different. The file system check could not recover, although the disk was still readable. So I bought a new one, formatted it, copied the data from the old disk preserving the file attributes/permissions.

mkfs -t ext4 /dev/sdc1
mount /dev/sdc1 /mnt
cp -pr /media /mnt

Finally it turned out that finding the bad blocks of the old hard disk helped to recover that as well:

fsck -y -c /dev/sda1

Then I made a snapshot of the new system with

tar -zcvpf /mnt/backups/fullbackup.tar.gz --directory=/ --exclude=mnt .

Let’s see how long it lasts now…

Von Gerhard Vogt

Born in Munich, but living more then 10 years now in the lovely Stuttgart area.
Grown up in a technical environment, moved then into the project and people management.
I'm interested in plenty of outdoor sports like sailing, biking, skiing, hiking, but also ball sports like tennis and badminton.
Travelling the world, and making photos is another hobby.
Never get bored! :-)

3 Antworten auf „Server crash“

Hmm,
finding the problem took me ~4h,
solving it with the command running the fsck took ~6-8h. This depends mainly on the size of the hard disk.

Yesterday i also had some problem with my external hard disk that i formatted as ext4 filesystem to be compatible with linux environments. The mounted hard disk suddenly became read only.
==> fsck -y -c /dev/sda1
Running this command helped me. Thanks Gerhard.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert