Snippet: Converting all .flac to .mp3 into the same directory

I needed all my flac as mp3 to play them on a device that does not support .flac. Heres how to convert them all:

export IFS="                                                                                                                                          
"
for file in `find /home/claw/Musik -name *.flac` ; do echo "converting $file" && nice -19 sox $file `echo $file | sed 's/\.flac/\.mp3/g'`   ; done

You may have to install sox and libsox-fmt-mp3:

apt-get install sox libsox-fmt-mp3

Intelligent standby for Server- and NAS-Systems

177px IEC5009 Standby Symbol.svg  Intelligent standby for Server  and NAS Systems

I have developed a concept which reduces the power consumption and uptime of my network attached storage.

The system is therefore intelligent because it is recognizing that its needed or not on its own and sets to standby.There are many methods out there how to do that but none of them worked for me quiet well because the system turned off when i was coping files what was not really meant to be. For doing it my way i am using simple bash scripts which i would like to share with you and explain. Continue reading

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

Prelink – Speed up your Linux even more

tux Prelink   Speed up your Linux even moreLast week i posted an article about the application Preload and how you can use it to tune the startup of applications impressively. While researching on Preload i found another way for tuning my system even more with a similar technique. Lets talk about Prelink:

Continue reading

Preload – Speed up your Linux

tux Preload   Speed up your LinuxPreadload is a daemon that runs in background of your system just as every daemon does.

This daemon creates statistics of your process and application usage. And that is all that is need for speeding up the start of applications by about 50%.

Preload is one of the applications i usually install right after setting up a new desktop distribution. Die effect on the response time of a system is clearly observable. Everything goes faster an makes much more fun icon smile Preload   Speed up your Linux .

Continue reading