2008年7月28日 星期一

linux driver command

lsmod 
顯示目前已經載入的模組清單

insmod 
load module into kernel
ex: insmod hello.ko

rmmod:
remove module

modprobe:
like insmod,  but also install dependent modules
(the module dependency is stored in /lib/modules/x.y.z/modules.dep)

modprobe -r:
remove module

modinfo:
show module info

linux kernel version

red hat enterprise linux 4 update 4
core_2.6.9-42.EL_i686  &  core_2.6.9-42.ELsmp_i686,  core_2.6.9-42.ELsmp_x86_64,  core_2.6.9-42.EL_x86_64

red hat enterprise linux 5 update 1
core_2.6.18-53.el5_i686  &  core_2.6.18-53.el5_x86_64

red hat enterprise linux 5 update 2
core_2.6.18-92.el5_i686  &  core_2.6.18-92.el5_x86_64

suse linux enterprise server 9

core_2.6.5-7.244-smp_x86_64


suse linux enterprise server 10 

core_2.6.16.21-0.8-smp_i686  & core_2.6.16.21-0.8-smp_x86_64


suse linux enterprise server 10 sp1

core_2.6.16.46-0.12-smp_x86_64  


suse linux enterprise server 10 sp2

core_2.6.16.60-0.21-default_i686   ,core_2.6.16.60-0.21-default_x86_64

2008年7月25日 星期五

LVM

(1) 實體磁碟 --> PV( physical volume)
1. change id to 8e
ex:
   (a) fdisk  /dev/hda
   (b) p
         show information of hda
   (c)  t -->  1 --> 8e
        modify partition 1 's id to 8e
   (d) w
         alter partition table
   (e) partprobe
         let kernel read newest partition table

2. create pv  
   (a)pvscan:
        show information of pv
   (b)pvcreate