Linux Distributions

Debian everything else is inferior.

The Fine Art of Playlists

I make my playlists with attachment:mkplaylist. You will have to edit the script to make it work, change $base to the base dir for all your mp3s. Then make new makeplaylist entries, each one is for each playlist, the makeplaylist function takes directories as parameters and it recurses into them and writes a playlist to the right file. It even writes the extended information.

/proc/mdstat information

Linux has a software raid subsystem and it called md. It is generally quite well documented. However the md status file in the proc pseudo filesystem is not documented at all. So this is one of those cases where you have to read the source to understand what's going on. I'll jump right in, this is what my mdstat looks like:-

$ cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 hde2[0] hdg2[1]
        224187008 blocks [2/2] [UU]

md0 : active raid1 hde1[0] hdg1[1]
        20008832 blocks [2/2] [UU]

unused devices: < none >
$

A little scary, but this is what a mdstat look like when there are failed devices:-

$ cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 hde1[0] hdi1[1]
        244195904 blocks [2/2] [UU]

md1 : active raid1 hda2[0]
        2168704 blocks [2/1] [U_]

md0 : active raid1 hda1[0]
        7823552 blocks [2/1] [U_]

unused devices: < none >
$

This is less scary, this is sample output when an array is syncing

Personalities : [raid1]
md1 : active raid1 sdb3[2] sda3[0]
      214178496 blocks [2/1] [U_]
        resync=DELAYED
md0 : active raid1 sdb2[2] sda2[0]
      20008832 blocks [2/1] [U_]
      [==>..................]  recovery = 13.6% (2728704/20008832) finish=9.5min speed=30003K/sec
unused devices: 

this is what's logged to syslog

Feb 17 19:13:49 localhost kernel: md: trying to hot-add unknown-block(22,1) to md0 ...
Feb 17 19:13:49 localhost kernel: md: bind
Feb 17 19:13:49 localhost kernel: RAID1 conf printout:
Feb 17 19:13:49 localhost kernel:  --- wd:1 rd:2
Feb 17 19:13:49 localhost kernel:  disk 0, wo:0, o:1, dev:hda1
Feb 17 19:13:49 localhost kernel:  disk 1, wo:1, o:1, dev:hdc1
Feb 17 19:13:49 localhost kernel: md: syncing RAID array md0
Feb 17 19:13:49 localhost kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Feb 17 19:13:49 localhost kernel: md: using maximum available idle IO bandwith (but not more than 200000 KB/sec) for reconstruction.
Feb 17 19:13:49 localhost kernel: md: using 128k window, over a total of 15007488 blocks.
Feb 17 19:26:15 localhost kernel: md: md0: sync done.
Feb 17 19:26:15 localhost kernel: RAID1 conf printout:
Feb 17 19:26:15 localhost kernel:  --- wd:2 rd:2
Feb 17 19:26:15 localhost kernel:  disk 0, wo:0, o:1, dev:hda1
Feb 17 19:26:15 localhost kernel:  disk 1, wo:0, o:1, dev:hdc1

Here is large raid5 which uses aoe components.

Personalities : [raid6] [raid5] [raid4] 
md0 : active raid5 etherd/e1.1p1[0] sdb1[5] sda1[4] etherd/e1.3p1[3] etherd/e1.2p1[2] sdd1[1]
      4883799680 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
      bitmap: 2/233 pages [8KB], 2048KB chunk

unused devices: <none>

As a side note the documentation has improved since I wrote this, the Linux Raid wiki has some more useful information about mdstat.

TomsWeb: Linux (last edited 2009-05-27 12:58:25 by ThomasStewart)