Thursday, August 23, 2007

Custom Font Config

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
default settings for all fonts.
-->
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>


<!-- disable anti-alias for 8-17 size fonts -->
<match target="font" >

<test compare="contains" name="lang" qual="any">
<string>zh-cn</string>
<string>zh-sg</string>
<string>zh-tw</string>
<string>ja</string>
<string>ko</string>
</test>

<test compare="more_eq" name="pixelsize" qual="any" >
<double>8</double>
</test>
<test compare="less_eq" name="pixelsize" qual="any" >
<double>17</double>
</test>
<edit mode="assign" name="antialias" >
<bool>false</bool>
</edit>
</match>

<!-- the space between English fonts is too wide,solve this problem -->
<match target="font">

<test name="lang" compare="contains" qual="any">
<string>zh-tw</string>
<string>zh-sg</string>
<string>zh-cn</string>
<string>ja</string>
<string>ko</string>
</test>
<edit name="spacing">
<const>proportional</const>
</edit>
<edit name="globaladvance">
<bool>false</bool>
</edit>
</match>

<!--
define the smallest size of Chinese fonts
-->
<match target="font" >
<test name="family" qual="any" >
<string>SimSun</string>
<string>NSimSun</string>
<string>SimHei</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL ZenKai Uni</string>
<string>AR PL New Sung</string>
</test>
<test compare="more_eq" name="pixelsize" >
<int>8</int>
</test>
<test compare="less_eq" name="pixelsize" >
<int>12</int>
</test>
<edit compare="eq" name="pixelsize" >
<int>12</int>
</edit>
</match>
<!--
sort the family of "serif ,sans,monospace",make it fit to Chinese people
-->
<alias>
<family>serif</family>
<prefer>
<family>Times New Roman</family>
<family>Liberation Serif</family>
<family>Nimbus Roman No9 L</family>
<family>Luxi Serif</family>
<family>Times</family>
<family>Bitstream Vera Serif</family>
<family>DejaVu Serif</family>
<family>Simsun</family>
<family>MingLiu</family>
<family>WenQuanYi Bitmap Song</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
<family>AR PL New Sung</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Arial</family>
<family>Verdana</family>
<family>Tahoma</family>
<family>Helvetica</family>
<family>Liberation Sans</family>
<family>Bitstream Vera Sans</family>
<family>DejaVu Sans</family>
<family>SimSun</family>
<family>WenQuanYi Bitmap Song</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Courier New</family>
<family>Liberation Mono</family>
<family>Luxi Mono</family>
<family>Andale Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>Nimbus Mono L</family>
<family>NSimSun</family>
<family>PMingLiu</family>
<family>WenQuanYi Bitmap Song</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
<alias>
<family>Courier New</family>
<prefer>
<family>Courier New</family>
<family>Liberation Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>Nimbus Mono L</family>
<family>Courier</family>
<family>Luxi Mono</family>
<family>Andale Mono</family>
<family>NSimSun</family>
<family>PMingLiu</family>
<family>WenQuanYi Bitmap Song</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
</fontconfig>

Sunday, August 5, 2007

Enabling DRI for Intel 945G/GMA950

Update for Slackware 12.1
In Slackware 12.1, don't have to do all the changes in xorg.conf, except setting the driver to the right one (mine is "intel").

However, I observed some slowness in firefox in 12.1. After setting the following option for the intel driver, the problem goes away. Seems it is caused by the new acceleration method EXA, which is the default.

Option "AccelMethod" "XAA"

xorg的i810(或者新的intel)驱动支持945G/GMA950. 实际上,i810驱动支持所有这些intel chipset:
i810, i810-DC100, i810e, i815, 830M, 845G, 852GM, 855GM, 865G, 915G, 915GM, 945G, 945GM
虽然man page里只提到915G和915GM。可以man i810看具体情况.

关键就是打开DRI. 我参照了以下文章。
http://dri.freedesktop.org/wiki/DriTroubleshooting

这篇文章很有帮助,告诉你如何一步一步确定DRI的问题的原因。建议有需要的看一看。

1. 我确定了我的内核(Slackware 12.0缺省huge smp内核)有Intel i810及以后芯片组的AGPGART和DRM的支持。

2. 我发现要在X里打开DRI.

编辑 xorg.conf
...
Section "Module"
...
# This loads the DRI module 载入DRI模块
Load "dri"

# This loads the GLX module 载入GLX模块
Load "glx"
...
EndSection
...
# 建一个用i810驱动的设备
Section "Device"
Identifier "i810"
Driver "i810"
# Alternative to Load "dri" 这个Option与Load "dri"等效
# Option "DRI" "true"
EndSection
...
# 使用i810设备
Section "Screen"
Identifier "Screen 1"
Device "i810"
Monitor "Samsung 710N"
...

# 让普通用户也可以使用DRI. 如果没有这个,只有root可以用。
Section "DRI"
Mode 0666
EndSection

之前:
x@slackx:~$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: No
server glx vendor string: SGI

x@slackx:~$ glxgears
4246 frames in 5.1 seconds = 840.647 FPS
4200 frames in 5.0 seconds = 835.972 FPS
4605 frames in 5.1 seconds = 901.136 FPS
4920 frames in 5.1 seconds = 961.904 FPS
5160 frames in 5.0 seconds = 1027.514 FPS
5160 frames in 5.0 seconds = 1027.391 FPS
5160 frames in 5.0 seconds = 1028.289 FPS
5160 frames in 5.0 seconds = 1028.484 FPS
5160 frames in 5.0 seconds = 1027.678 FPS
5173 frames in 5.0 seconds = 1027.146 FPS
...

重起X之后:
x@slackx:~$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI

x@slackx:~$ glxgears
7591 frames in 5.0 seconds = 1518.076 FPS
7774 frames in 5.0 seconds = 1554.788 FPS
17984 frames in 5.0 seconds = 3596.714 FPS
17536 frames in 5.0 seconds = 3507.012 FPS
17372 frames in 5.0 seconds = 3474.314 FPS
18021 frames in 5.0 seconds = 3604.041 FPS

Saturday, August 4, 2007

转载:让 xterm 与其它程序间复制粘贴更灵活

在 TERM 中选中文字“甲”,需鼠标中键贴入其它程序(如 firefox ),而此时在 firefox 里选中文字“乙”并不 Ctrl-c ,再用鼠标中键贴出,发现贴出“乙”,而“甲”不见了。

需要效果:在 TERM 中选中即可 Ctrl-v 贴入 firefox 一类的程序中,无需鼠标中键。而在 firefox 一类的程序中 Ctrl-c 复制后,鼠标不论再选中什么,在 TERM 中 Shift-Insert 出的依然是 Ctrl-c 的内容

在 Xwindow 里有一个选中缓冲(PRIMARY)和一个剪贴板(CLIPBOARD)
几乎除了 TERM 程序以外,没有还在用选中缓冲的程序
造成 TERM 中选中的,需要鼠标中键才能贴到其它程序里。在贴之前,在其它程序中还不能选中任何东西,一旦选中,选中缓冲就被刷新

a) xterm 功能强大,本身就带剪贴板功能,如下配置即可
在 $HOME/.Xresources 里如下写,可让 xterm 的复制进入剪贴板,不再过选中缓中

*VT100*translations: #override \n\
Shift Insert:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
~Shift~Ctrl: insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
~Shift: select-end(CLIPBOARD, CUT_BUFFER1)

前两句是说当 Shift-Insert 与鼠标中键(Btn2UP)效果是贴出剪贴板内容
第三句是说当 鼠标左键(BtnUP)效果是复制给剪贴板

这样一来,在 firefox 中任意选中的文字(不 Ctrl-c ),不管是 Shift-Insert 还是鼠标中键都复制不出来了

*VT100*translations: #override \n\
Shift Insert:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
~Shift~Ctrl: insert-selection(PRIMARY, CUT_BUFFER0) \n\
~Shift: select-end(CLIPBOARD, CUT_BUFFER1) \n\
~Shift: select-end(PRIMARY, CUT_BUFFER0)

这样就让在 firefox 里随意选中的文字,鼠标中键可贴在 TERM 中,而 Ctrl-c 的内容由 Shift-Insert 贴出
当然配置是灵活的,随自己喜欢了。

b) rxvt, aterm, mrxvt, rxvt-unicode 系列,需要一点小修改
这一系列都是基于 rxvt 的,代码相近,下面以 rxvt-unicode 为例:
(无需会编程,不过是替换游戏,把选中缓冲替换为剪贴板)

原理:把选中缓冲(XA_PRIMARY)换成剪贴板(xa[XA_CLIPBOARD])即可
vi rxvt-unicode-8.1/src/screen.C
2895 行:
if (selnum == Sel_Primary)
sel = xa[XA_CLIPBOARD];
else if (selnum == Sel_Secondary)
sel = XA_SECONDARY;
else
sel = XA_PRIMARY;

3066行:
XSetSelectionOwner (dpy, xa[XA_CLIPBOARD], vt, tm);
if (XGetSelectionOwner (dpy, xa[XA_CLIPBOARD]) == vt)

From: http://bbs.linuxsir.org/showthread.php?t=290883

Setting up Chinese in Slackware 12

Update: With Slackware 12.1, Chinese display works out-of-the-box with 文泉驿 (WenQuanYi) 正黑 font. IME packages like scim, skim and a lot more are included in 12.1, Chinese (and other language) input can be enabled easily by following instructions in CHANGES_AND_HINTS.TXT in the distribution.

Objective
- Allow displaying of Chinese characters in UTF-8 encoding while still having the normal English user interface.
- Allow inputing of Chinese characters using SCIM.

Environment
Slackware 12.0 full installation, default 2.6.21.5 huge smp kernel.
文泉驿 (WenQuanYi) Bitmap Song font 0.8.1
scim 1.4.7, scim-pinyin-0.5.91, skim-1.4.5

Display
Get 文泉驿 (WenQuanYi) Bitmap Song font from http://wqy.sourceforge.net/. I use the PCF format of current version 0.8.1. Follow the instructions included in the downloaded file (run mkfontdir, vc-cache, etc). I copied all the pcf files into /usr/share/fonts/ folder, so that no change to /etc/X11/xorg.conf and /etc/fonts/fonts.conf is required. You can also copy the file 85-wqy-bitmapsong.conf into /etc/fonts/conf.avail/ and created a link in /etc/fonts/conf.d/, as suggested by the installation instructions but with slight variation in directory names. However, this config file will force WenQuanYi to be the chosen for all kinds of font requests, and make your English contents ugly. So if you want beautiful English fonts, don't use this one, and do your own font config instead.

As I still want to use English as my primary desktop language, I leave the LC_* environment variables untouched, and only changed LC_CTYPE=zh_CN.UTF-8 in my ~/.profile. (Note: I tried en_US.utf8 but it does not work, as all KDE applications will show squares for Chinese characters. This means fontconfig does not pick WenQuanYi font. I guess the reason is because WenQuanYi Bitmap Song font's lang attribute does not have "en" in the list so it does not get matched. )

After that restart X.

Input
Download and compile scim, scim-pinyin, and skim, using root.
scim 1.4.7
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make -j3
make instal DESTDIR=/your/dest
makepkg scim-1.4.7-i686-1xc.tgz
installpkg
scim-1.4.7-i686-1xc.tgz

scim-pinyin 0.5.91
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make -j3
make instal DESTDIR=/your/dest
makepkg scim-pinyin-0.5.91-i686-1xc.tgz
installpkg scim-pinyin-0.5.91-i686-1xc.tgz

skim 1.4.5
scons configure prefix=/usr
scons -j3
mkdir -p /usr/lib/pkgconfig
cp skim.pc /usr/lib/pkgconfig/
scons install DESTDIR=/your/dest
makepkg skim-1.4.5-i686-1xc.tgz
installpkg
skim-1.4.5-i686-1xc.tgz

I also added the following lines to .profile:
export XMODIFIERS=@im=SCIM
export XIM=SCIM
export XIM_PROGRAM=SCIM

After that restart X.

Friday, August 3, 2007

Sample .bashrc

# Set the following to make all x terminals have proper PS1 and PS2
# \033[0;30m - Black
# \033[0;31m - Red
# \033[0;32m - Green
# \033[0;33m - Orange
# \033[0;34m - Blue
# \033[0;35m - Cyan
# \033[0;36m - Light Blue
# \033[0;37m - Grey
# \033[0;39m - White
export PS1='\u@\h:\w\$'
export PS2='> '

# Below sets the titlebar of the terminal windows
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

# Display fortune for each new terminal session, and enable colors in ls output
for profile_script in '/etc/profile.d/bsd-games-login-fortune.sh' '/etc/profile.d/coreutils-dircolors.sh' ; do
if [ -x $profile_script ]; then
. $profile_script
fi
done
unset profile_script

Saturday, July 28, 2007

Installing Slackware 12 on Linux Software RAID and LVM2

This article describes how I installed Slackware 12 onto Linux Software RAID partitions and LVM logical volumes. It is the first time I played with Software RAID and LVM.

In my case, the root filesystem is installed on a RAID-1 partition (non-LVM), and other filesystems (like /home, /tmp, and swap) are on LVM logical volumes on top of RAID-1 or RAID-0 arrays. I read from somewhere (and I concur) that it is not necessary and not good to put root partition into LVM, because if anything screws up, it is easier to get into root partition and do recovery if you don't have to deal with LVM. If you run into space problems with root filesystem later, you can always move some directories to another filesystem and change the mount points easily. I still want the root filesystem to be on RAID because I want the redundancy and speed gain on reads.

Hardware Installation
I have a PC with:
- Pentium D 930 CPU
- Gigabyte GA-8i945GMH-RH motherboard
- Seagate 80GB IDE harddisk.
The motherboard supports up to 2 IDE and 4 SATA devices. I bought 2 more Seagate 7200.10 320GB SATA2 harddisks (at S$126 each, from Best Bargin, Sim Lim Square).
What to take note here is that you need SATA cable and SATA power cable to connect the harddisks to your PC. If they don't come with the harddisk or motherboard, you have to buy separately. I paid S$2 for one SATA cable, and S$3 for one SATA power cable.

Installing the harddisks is straightforward if you follow your motherboard manual, or you have basic PC assembling knowledge.

After that, make appropriate setting changes in the BIOS. I don't plan to use the on-board RAID chipset, because it cannot create RAID arrays out of partitions. So I did not enable the RAID mode in BIOS. Instead I just enabled the SATA controller so that the SATA disks can be detected by the BIOS.

Space Allocation Strategy
I partitioned the 2 harddisks as follows:
sda:
sda1 (30GB) : Windows XP (yeah, still need it for photo processing, video chatting and gaming)
sda2 (30GB) : Reserved
sda5 (80GB) : Device 0 of RAID-1 array (md0)
sda6 (40GB) : Device 1 of RAID-0 array (md1)
sda7 (10GB) : Device 0 of RAID-1 array (md2)
The rest is free space for future expansion.

sdb:
sdb1 (30GB) : Windows Data Partition (FAT)
The rest follows sda

Note: Originally I plan to install Windows on some logical partition, but I encountered some problems. Seems like Windows cannot be installed onto logical partitions, but I am not sure.

Installing Slackware
Get ready the following things:
-Slackware 12 Installation CDs (I only burned CD1)
- Slackware 12 installation files (I downloaded selected directories from a mirror site using wget) in one of your harddisk partition (I put them into my USB harddisk), because I plan to use the option to copy files from a harddisk partition.
- Grub 0.97 package from extra directory (I plan to use Grub instead of Lilo).

Boot up using Installation CD1, using the default image (huge.s) to have mdadm and LVM available.

Use fdisk/cfdisk to partition the two harddisks. In my PC they are under /dev/sda and /dev/sdb respectively. I want identical partitions in the two, so I can use the following command to duplicate sda's partitions to sdb.

sfdisk -d /dev/sda | sfdisk /dev/sdb (will wipe out existing partitions in sdb)

Below is the output from "sfdisk -d" after the partitioning:
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start= 63, size= 58588992, Id= c, bootable
/dev/sda2 : start= 58589055, size= 58589055, Id= c
/dev/sda3 : start=117178110, size=253907325, Id= 5
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=117178173, size=156248127, Id=fd
/dev/sda6 : start=273426363, size= 78124032, Id=fd
/dev/sda7 : start=351550458, size= 19534977, Id=fd

# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start= 63, size= 58588992, Id= c, bootable
/dev/sdb2 : start= 58589055, size= 58589055, Id= c
/dev/sdb3 : start=117178110, size=253907325, Id= 5
/dev/sdb4 : start= 0, size= 0, Id= 0
/dev/sdb5 : start=117178173, size=156248127, Id=fd
/dev/sdb6 : start=273426363, size= 78124032, Id=fd
/dev/sdb7 : start=351550458, size= 19534977, Id=fd

Note setting Id=FD (Linux Raid Autodetect) allows kernel to automatically start the array when the system boots. If you don't want auto-detection, use Id=83 (Linux) instead.

After that, create the RAID arrays using mdadm (using default chunk size of 64KB):
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]5
mdadm --create /dev/md1 --level=0 --raid-devices=2 /dev/sd[ab]6
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sd[ab]7

Create LVM PVs, VGs and LVs. I want an 8G RAID-1 LV for /home, a 4G RAID-0 LV for /tmp, and a 512M RAID-0 LV for swap. So:
pvcreate /dev/md0
pvcreate /dev/md1
vgcreate raid1_vg0 /dev/md0
vgcreate raid0_vg0 /dev/md1
lvcreate -L8G -nslackware_home raid1_vg0
lvcreate -L512M -nswap /raid0_vg0
lvcreate -L4G -nslackware_tmp raid0_vg0
vgchange -a y raid1_vg0
vgchange -a y raid0_vg0

Set up swap filesystem (do this manually because Slackware Setup program cannot detect swap filesystems on LVM):
mkswap /dev/raid0_vg0/swap
swapon /dev/raid0_vg0/swap

Run Setup:
setup

Skip the ADDSWAP step because I want the swap filesystem on LV but it will not look inside the LVs.

At TARGET step, I choose /dev/md2 for root (/) (ext3), /dev/raid1_vg0/slackware_home as /home (reiserfs), /dev/raid0_vg0/slackware_tmp as /tmp (reiserfs). Here what filesystem you want to use is up to individual test. Do take note that since Slackware 12, the default filesystem is changed from reiserfs to ext3, probably because of the uncertain future of reiserfs...
I also specify /dev/sda1 to be mounted as /mnt/windows-xp, and /dev/sdb1 as /mnt/windows-data.

At SOURCE step, I choose Install from a hard drive partition, then specify the partition (dev/sdc5) and path of the installation files in my USB harddisk.

After that, select the packages and install them to the selected partitions. (I choose all since I don't want to spend too much time picking through the packages)
I then go through the CONFIGURE step as per normal, but skip LILO installation. I did not create a USB boot stick because I don't have a spare one.

After that, exit the Setup program, but do not reboot first. Still need to do a couple of things:

- Install grub. By now the root filesystem of the installed system is mounted to /mnt, so:
chroot /mnt
installpkg /grub-0.97-i486-3.tgz
mkdir /boot/grub; cp /usr/lib/grub/i386-pc/* /boot/grub

Exit chroot.

- Create menu.lst under /boot/grub (better prepare it in advance in case you forgot the syntax). My grub entry for Slackware:

title Slackware 12 SMP (on /dev/md2)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/md2 ro vga=773
boot

- Install grub to MBR of both sda and sdb:
grub
grub>device (hd0) /dev/sda (and sdb)
grub>root (hd0, 6)
grub>setup (hd0)
grub>quit

- Create mdadm.conf (It is not required by mdadm to work, but is useful for keeping track of arrays and member disks.).
mdadm --detail --scan >> /mnt/etc/mdadm.conf

- Add swap mount point to /mnt/etc/fstab:
/dev/raid0_vg0/swap swap swap defaults 0 0

- Run vgscan to create /etc/lvm/backup, which is checked by the init scripts in order to enable LVM (for details see /etc/rc.d/rc.S).
chroot /mnt
vgscan -v

Exit chroot.

Now reboot. After rebooting, you should see the login prompt. Go in and check if everything is started and mounted correctly.

Points to Note
- The Generic Slackware kernels cannot boot from root partitions on RAID, so the Huge kernel should be used. (It probably can with some initrd, but I didn't try that.)
- Be careful when you change your harddisk partitions. Because there is RAID arrays and PV/VG/LVs created on top of the partitions, deleting existing partitions may screw up those. Always make sure there is no existing RAID arrays or PVs using them first. See if you really need to change the partitions - after all with LVM it may not be necessary to change partitions directly. Try changing the LVs instead.

To remove the PV/LVs, use lvremove, vgreduce, and pvremove commands. To remove a partition or harddisk from a RAID array, use mdadm --zero-superblock to erase the RAID superblock from the device. The superblock is a 4K block of data written near the end of the device. It contains information for the array and the member devices. It allows the kernel to automatically start arrays when the system boots.

- If you did not manage to complete the installation process after you have created the RAID arrays and LVM stuff, you can do the following:
mdadm --assemble /dev/md0 /dev/sd[ab]5 # manually specify the RAID array and it member devices
OR mdadm --assemble --scan /dev/md[0-2] # just specify the RAID array
OR mdadm --assemble --scan --config= # assemble all MD devices using mdadm.conf
vgscan # detect all VGs

Listings
/etc/fstab:
/dev/md2 / ext3 defaults 1 1
/dev/raid0_vg0/slackware_tmp /tmp reiserfs defaults 1 2
/dev/raid1_vg0/slackware_home /home reiserfs defaults 1 2
/dev/raid0_vg0/swap swap swap defaults 0 0
/dev/sda1 /mnt/windows-xp vfat defaults 1 0
/dev/sdb1 /mnt/windows-data vfat defaults 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

/proc/mdstat:
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md1 : active raid0 sdb6[1] sda6[0] 78123904 blocks 64k chunks
md2 : active raid1 sdb7[1] sda7[0] 9767424 blocks [2/2] [UU]
md0 : active raid1 sdb5[1] sda5[0] 78123968 blocks [2/2] [UU]
unused devices:

PVs:
--- Physical volume ---
PV Name /dev/md1
VG Name raid0_vg0
PV Size 74.50 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 19073
Free PE 17921
Allocated PE 1152
PV UUID 0DaWBK-Mw3A-MnoW-ZZNT-DeKr-kbEX-LTrbX3

--- Physical volume ---
PV Name /dev/md0
VG Name raid1_vg0
PV Size 74.50 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 19073
Free PE 17025
Allocated PE 2048
PV UUID yab1wC-so2Y-XR8L-K3NM-9pYX-CBfD-iqdrqH

VGs:
--- Volume group ---
VG Name raid0_vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 74.50 GB
PE Size 4.00 MB
Total PE 19073
Alloc PE / Size 1152 / 4.50 GB
Free PE / Size 17921 / 70.00 GB
VG UUID sTV1RZ-AShv-Rbb3-J84Y-WZcF-s4Hu-1OQQT1

--- Volume group ---
VG Name raid1_vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 74.50 GB
PE Size 4.00 MB
Total PE 19073
Alloc PE / Size 2048 / 8.00 GB
Free PE / Size 17025 / 66.50 GB
VG UUID jatY6C-g1hq-Xexs-rGzb-2qcF-KOgG-xkv64E


LVs:
--- Logical volume ---
LV Name /dev/raid0_vg0/swap
VG Name raid0_vg0
LV UUID vQhFg9-U0uW-U2eT-njKp-cEyb-jmwx-7gFqkR

LV Write Access read/write
LV Status available
# open 1
LV Size 512.00 MB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/raid0_vg0/slackware_tmp
VG Name raid0_vg0
LV UUID fp2bGy-1mIw-V79A-BCdX-EGWp-NCLq-Hu90Bb
LV Write Access read/write
LV Status available
# open 2
LV Size 4.00 GB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

--- Logical volume ---
LV Name /dev/raid1_vg0/slackware_home
VG Name raid1_vg0
LV UUID czyWXU-YYHc-zaVE-eFVh-x9h6-712k-HSEIps
LV Write Access read/write
LV Status available
# open 2
LV Size 8.00 GB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2


References:

LVM and mdadm man pages
Managing RAID on LINUX by Derek Vadala, O'Reilly 2003
http://tldp.org/HOWTO/LVM-HOWTO
http://tldp.org/HOWTO/Software-RAID-HOWTO.html
http://slacksite.com/slackware/raid.html
http://wiki.linuxquestions.org/wiki/Slackware-Guides#How_do_I_install_Slackware_on_a_with_LVM-partitions.3F
http://bbs.linuxsir.org/showthread.php?t=308297