Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [failure-resistance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers

Interpret the output of smartctl for SSD and hard drive

I have dropped my external hard drive on the floor recently and wanted to know if the electronic parts and mechanical parts were damaged. I have no idea how to find this out from the output of ...
Make42's user avatar
  • 667
0 votes
1 answer

How do I find at which line my data file fails while being piped to a command?

I have a file that contains one SQL command per line and I pipe it to the mysql client. I would like to know at which line it fails (when it fails) to be able to continue without re-processing the ...
moechofe's user avatar
-1 votes
2 answers

Bash: Run Command (with a specific pattern) only if another Command (with another specific pattern) has failed

I have a shell script that creates a function (in a bashscript file which is sourced by .bashrc) for each Markdown files to open it in the editor. Example: ls /home/nikhil/Notes/Studies ...
Porcupine's user avatar
  • 2,056
0 votes
1 answer

backup boot / root in case primary fails to boot

I have these mini-servers based on raspberry pi. Lots of them. But currently we have relatively frequent malfunctions because for some reason or another the filesystem on the SD card gets corrupted ...
velis's user avatar
  • 397
2 votes
0 answers

Make Linux reboot when it runs out of PID

I want to configure a headless server to automatically reboot under catastrophic circumstances. Right now I have configured to make it panic when running out of RAM, and reboot automatically on kernel ...
iBug's user avatar
  • 3,548
13 votes
1 answer

Does BTRFS guarantee data consistency on power outages?

As ZFS states exclusively, ZFS is claimed to be invulnerable ZFS accepts that it might be vulnerable to power failures. I couldn't find such a statement for BTRFS. Is it (or designed/planned to be) ...
ceremcem's user avatar
  • 2,361
4 votes
3 answers

Is it "broken" to replace an existing file without fsync()?

In Linux's mount(2) man page, I noticed the following excerpt: Many broken applications don't use fsync() when replacing existing files via patterns such as fd = open("")/write(fd,...)/...
Nate Eldredge's user avatar
3 votes
1 answer

Where/when are exit statuses returned for background jobs in bash?

I'm writing a bash script which has many parts, but I want built in resiliency and parallel processing as much as possible. An example is below: while true do var=$(curl someurl) || continue var2=...
Teofrostus's user avatar
13 votes
3 answers

Can the filesystem become inconsistent if interrupted when moving a file?

I have two folders on the same partition (EXT2) If I mv folder1/file folder2 and some interruption occur (e.g. power failure) could the file system ever end up being inconsistent? Isn't the mv ...
graphtheory92's user avatar
44 votes
6 answers

Corruption-proof SD card filesystem for embedded Linux?

Recently we had a rather unpleasant situation with our customer - Raspberry Pi based "kiosk" used to display remote sensing data (nothing more fancy than a kiosk mode browser displaying a self-...
SF.'s user avatar
  • 2,941
6 votes
3 answers

Where does LVM store data?

My questions are similar to this thread Does LVM increase the risk of data loss?, however, I couldn't find a satisfying answer. So the question is, where does LVM store data/files, when I have a ...
Cherrun's user avatar
  • 197
5 votes
1 answer

To sync /var or not?

It seems in a hard crash, in particular failure of a UPS to keep a system running, that some of the contents of logs get lost due to file system caching. As an experiment, I tried mounting the /var ...
casualunixer's user avatar