‘Use 100%’ – But there is space left!

lrg tango drive hard disk Use 100%   But there is space left!It just happened that a md device appeared as out of storage space.

df displayed the following:

# df -H
Dateisystem   Size   Used  Avail Use% Eingehängt auf
/dev/md0      6,0T   5,6T    13G 100% /mnt/raid1

Calculative there is something wrong because there are still 0,4T left. This is because ext reserves 5% of space per default because you would not be able to login in if there not enough space on the filesystem and you wont be able to enter the rescuing rm command. For my md device, which does not contain any systemfiles there is no need to reserve any space :

#tune2fs -m 0 /dev/md0

Sets the reserve to 0% and the 0,4T are free for usage.

md: Check consistency of Raids

lrg tango drive hard disk md: Check consistency of RaidsIf you want to grow a raid array or perform other actions on it you should make sure that all files are consistent.

mdadm has a function that can ensure this even without having to rebuild the raid.

trans md: Check consistency of Raids

Before you can start you always have to make sure that everything is save for the present:

root@nas34 cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md42 : active raid5 sdd[0] sdb[4] sda[3] sde[1]
      4395411456 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]

If everything looks just fine, as above, we would not have to be concerned, if there would not be the risk of bad blocks because they have the characteristic that they become conspicuous only if there are read or write actions performed to them. For ensuring that the array act correct we are going to perform a manual check:

echo check >/sys/block/md42/md/sync_action

Now we have to check that the “check” we have just sent to /sys/block/md42/md/sync_action produces an effect:

cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md42 : active raid5 sdd[0] sdb[4] sda[3] sde[1]
      4395411456 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      [>....................]  check = 0.0% (23564/1465137152) finish=500.0min speed=63564K/sec

Alright! The action has been started. If the Raid does not show any errors:

cat /sys/block/md42/md/mismatch_cnt
0

and does not suddenly start to rebuild we can grant that it is stable and start with the proper work, without being concerned that one of the disk could be damaged any way.

If you want to you can cancel the procedure by sending ‘idle’ to  /sys/block/md42/md/sync_action:

echo idle >/sys/block/md42/md/sync_action

auffallend

Benchmark: md_raid5 – comparing 4 hard drives versus 3

lrg tango drive hard disk Benchmark: md raid5   comparing 4 hard drives versus 3Recently i had to grow the capacity of my NAS. The NAS is running Debian and RAID is powered by md. I had attached 3 hard drives to it which were working as RAID5 array. Now i could write about how to grow a RAID, but you will be able to read that on more than enough other websites. I would rather share a benchmark i have created using Bonnie++. Let me show you the effects of changing the amount of hard drive on the read and write performance.

Continue reading