The orders on the server live on a mirror, an array of two disks. At night monitoring sent an e-mail about a failed disk, yet the application runs as usual. A colleague asks you to look at the array and check that the files are intact.
Look at the array and the files
Look at the array summary with cat /proc/mdstat, then at the files in /srv/data/orders and the space in /srv/data.
First, predict
One of the array's two disks has failed. What will ls -l /srv/data/orders show?
Now start the exercise, run the command and compare your prediction with the output.
Why can the files in /srv/data be read even though a disk of the array has failed?
-
loop2is not part of the array: themd0line does not list it, andlsblkshows nomd0under it. -
The kernel has already noticed:
loop1carries the(F)mark in/proc/mdstat, and the array runs with[2/1]. -
The cache has nothing to do with it: after
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches',ls -l /srv/data/ordersshows the same files.
The array reads the data from the remaining working disk, loop0.