星期日, 8月 28, 2011

mdadm

50k
echo 50000 >/proc/sys/dev/raid/speed_limit_min
50M
echo 50000000 >/proc/sys/dev/raid/speed_limit_min
echo 50000000 >/proc/sys/dev/raid/speed_limit_max


Bitmap Option

Bitmaps optimize rebuild time after a crash, or after removing and re-adding a device. Turn it on by typing the following command:
# mdadm --grow --bitmap=internal /dev/md0
Once array rebuild or fully synced, disable bitmaps:
# mdadm --grow --bitmap=none /dev/md0
vi /boot/grub/menu.lst
/boot/grub/device.map
grub>root (hd0,0)
grub>setup (hd0)
 mkinitrd /boot/initrd-`uname -r`.img `uname -r` # 將 Software RAID Module 載入 initrd.img
vi /etc/fstab # 編輯 fstab 檔
 mdadm –examine –scan >> /etc/mdadm.conf # RAID的文件配置
※ 監控管理
# mdadm –monitor –scan –mail= your-email@address.com /dev/md0 -t -1 #手動測試監控發信通知
# crontab -e  # 加入 crontab 每隔一段時間監控發信通知
*/5 * * * * /sbin/mdadm –monitor –scan –mail= your-email@address.com /dev/md0 -1
./configure --prefix=/opt/usr --with-default-path=/opt/usr/bin:/usr/bin:/bin --with-mantype=man

mail postfix

#!/bin/bash
#boot: linux ks=nfs:192.168.1.22:/nfs/ks.cfg
#export inst=/opt/cvmail
export inst=/usr/local/edward


mkdir ~/src
cd ~/src
find /mnt/cifs/src/tar -name "*gz" | xargs -t -i tar zxf {}
find /mnt/cifs/src/tar -name "*bz2" | xargs -t -i tar jxf {}
cp /mnt/cifs/src/tar/Config.pm ~/src
export MAKEFLAGS="-j4"

cd ~/src/zlib-1.2.5
./configure --prefix=$inst/zlib
make
make install

cd ~/src/libmcrypt-2.5.7
./configure --prefix=$inst/libmcrypt   --enable-dynamic-loading
make
make install
 
cd  ~/src/libiconv-1.13.1
./configure --prefix=$inst/libiconv 
make
make install

cd ~/src/perl-5.12.3
./Configure  -des -Dprefix=$inst/perl -Dinstallprefix=$inst/perl 
make install
rm -f /usr/local/edward/perl/lib/5.12.3/CPAN/Config.pm
cp ~/src/Config.pm   /usr/local/edward/perl/lib/5.12.3/CPAN/Config.pm

export PATH=$inst/perl/bin:$PATH
cd $inst/perl/bin

perl -MCPAN -e 'install Net::Server'

perl -MCPAN -e 'install IO::Multiplex'

perl -MCPAN -e 'install BerkeleyDB'


cd ~/src/openssl-0.9.8r
./config --prefix=$inst/openssl shared
make
export MAKEFLAGS="-j1"
make install
echo "$inst/openssl/lib" >>/etc/ld.so.conf
ldconfig

export MAKEFLAGS="-j4"
cd ~/src/mysql-5.1.56
libtoolize --force ; aclocal;cp -p BUILD/compile-pentium-max compile ;autoreconf
./configure --prefix=$inst/mysql --with-ssl=$inst/openssl/ssl \
        --without-debug \
        --enable-shared \
        --with-mysqld-user="mysql" \
        --with-extra-charsets=all \
        --with-innodb \
        --with-berkeley-db \
        --enable-local-infile \
        --enable-largefile \
        --enable-thread-safe-client \
        --disable-dependency-tracking \
        --with-named-thread-libs="-lpthread" 
make install
cp support-files/my-medium.cnf $inst/mysql/etc/my.cnf
cd $inst/mysql
chown -R mysql:mysql
bin/mysql_install_db --user=mysql
export PATH=$inst/mysql/bin:$PATH
echo "$inst/mysql/lib/mysql" >>/etc/ld.so.conf
ldconfig

cd ~/src/dovecot-1.2.16
export CPPFLAGS="-I$inst/mysql/include/mysql"
export LDFLAGS="-L$inst/mysql/lib/mysql"
./configure --prefix=$inst/dovecot --with-ssl=openssl --with-ssldir=$inst/openssl/ssl \
 --with-mysql --with-libiconv-prefix=$inst/libiconv 
make
make install
chown dovecot:dovecot $inst/dovecot/ -R

cd ~/src
cp imap-2007e $inst/ -R
cd $inst/imap-2007e
export SSLTYPE=nopw
make slx SSLDIR=$inst/openssl

cd ~/src/httpd-2.2.17
./configure --prefix=$inst/apache2                         --enable-modules=all --enable-pie \
--enable-proxy --enable-cache --enable-mem-cache  --enable-file-cache --enable-disk-cache \
--enable-cgid --enable-so --enable-ssl --with-ssl=$inst/openssl
make 
make install

cd ~/src/php-5.3.6
export  EXTRA_LIBS="-lresolv"
export LD_LIBRARY_PATH=$inst/openssl/lib
./configure --prefix=$inst/php --with-mysql=$inst/mysql  --with-apxs2=$inst/apache2/bin/apxs \
--with-mcrypt=$inst/libmcrypt --with-imap=$inst/imap-2007e  \
--enable-mbstring --with-config-file-path=$inst/apache2/conf --with-iconv-dir=$inst/libiconv --enable-sockets --with-pear \
--with-zlib=$inst/zlib --with-imap-ssl=$inst/openssl 
make 
make install
export PATH=$inst/php/bin:$PATH
pear install  MDB2 Mail_Mime Net_SMTP Auth_SASL



cd ~/src/clamav-0.97
./configure --prefix=$inst/clamav --with-user=clamav
make
make install

cd ~/src/clamsmtp-1.10
./configure  --prefix=$inst/clamsmtp
make 
make instll

cd ~/src/fetchmail-6.3.19
./configure --prefix=$inst/fetchmail --with-ssl  --with-libiconv-prefix=$inst/libiconv/lib --with-ssl=$inst/openssl 
make 
make install

cd ~/src
cp -R postgrey-1.33 $inst/postgrey 
chown postfix:postdrop $inst/postgrey
cd ~/src/
cp -R postfixadmin-2.3rc5 $inst/apache2/htdocs/postfixadmin 
cp -R roundcubemail-0.2-stable-dep $inst/apache2/htdocs/webmail  
cp -R rcpfa-1.0.5 $inst/apache2/htdocs/webmail/ 



cd ~/src/postfix-2.8.2

make -f Makefile.init makefiles 

make tidy
make makefiles CCARGS='-DHAS_MYSQL -I/usr/local/edward/mysql/include/mysql -DUSE_TLS -I/usr/local/edward/openssl/include/openssl \
-DUSE_SSL -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" \
-DDEF_COMMAND_DIR=\"/usr/local/edward/postfix/sbin\" -DDEF_CONFIG_DIR=\"/usr/local/edward/postfix/etc\" -DDEF_DAEMON_DIR=\"/usr/local/edward/postfix/libexec\" -DDEF_DATA_DIR=\"/usr/local/edward/postfix/lib\" -DDEF_MAILQ_PATH=\"/usr/local/edward/postfix/bin/mailq\" -DDEF_NEWALIAS_PATH=\"/usr/local/edward/postfix/bin/newaliases\" -DDEF_QUEUE_DIR=\"/usr/local/edward/postfix/var/spool\" ' \
 AUXLIBS='-L/usr/local/edward/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/local/edward/openssl/lib -lssl -lcrypto -L/usr/local/edward/dovecot/lib/dovecot' 

make install

2011 tip

http://www.youtube.com/cosmicpanda?gl=TW
---------------------------------------------------------------------------------------------------

vmware-config-tools.pl -c --overwrite --clobber-kernel-modules=vmmemctl --clobber-kernel-modules=vmxnet3 -d


VBoxManage   modifyvdi vmxpd.vdi compact


mv /usr/lib/vmware/modules/binary ~
vmware-modconfig -–console -–install-all

mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
vmware-modconfig -–console -–install-all --validate-kernel-headers --validate-gcc


VMWARE E1000 NIC QUICK HOW TO:

Some users have reported problems with the Lance (default)
and VMXNet network card drivers with FreeBSD 6.x.  If these
occur, it is recommended to use the E1000 driver in their place.

1. In /etc/rc.conf, change ifconfig_lnc0 to ifconfig_em0
2. Make the same change in /usr/local/etc/conftemplates/rc.conf
3. shutdown -h now
4. (On host) Edit the /FreeBSD.vmx
5. Add a line:
    ethernet0.virtualDev = "e1000"
        ethernet0.virtualDev=vmxnet3
   Just below:
    ethernet0.present = "TRUE"
6. Boot the VM

scsi0.present = "TRUE"
scsi0.virtualDev = "pvscsi"


 


 ------------------------------------------------------------------------------------------------------
status
show database;
show databases;
q
;
show databases;
user horde;
use horde;
show tables;
status
show databases;
use mysql;
show tables;
select user from *;
status
show databases;
use mysql;
show tables;
select user from *;
select * from user;
show databases;
use horde;
status
show tables;
help show
show tables;
show tables.horde_users;
show tables horde_users;
help show
show master logs;
show master status;
status
show databases;
use horde;
status
show tables;
selece * from horde_prefs;
show tabls;
show
;
help show;
show table status;
help show;
show privileges;
show
;
help show;
status
use mysql;
status;
create database test2;
show databases;
status
show databases;
del database horde;
q
;
sh databases;
show databases;
help create
create database zabbix;
use zabbix;
show tables;
show databases;
status
show databases;
create database zabbix;
help
help shutdown
 q
quit
;
q quit;
status
create database zabbix;
use zabbix;
show tables;
select * from items
;
status
help show
 show innodb status;
status
sh databases;
show databases
;
help create
create database phplist;
help
status
help use
show databases;
use zabbix;
status
help show
 SHOW INNODB STATUS;
show master status;
help show
 show engine status;
 show engine ;
help show engine
show engine innodb status
;
use zabbix;
show engine innodb status;
help show tables
help show databases;
showdatabes
;
help
status
help create
help create database
status
show databases
;
use zabbix;
show tables;
 status
status
show databases;
use zabbix;
show table status;
show table status \G
show table ;
show tables;
select * from media;
select * from trends;
help show;
help
help contents
heep Fuctions;
help Fuctions;
 SHOW BINLOG EVENTS IN 'mysql-bin.000012' ;
 SHOW BINLOG EVENTS IN 'mysql-bin.000012' \G
use test;
show tables;
show columns from use;
show columns from users;
help show columns
help show
show columns from users;
status
use zabbix;
use mysql;
show table status;
help show
show tables ;
select * from user;
select * from user \G
select * from user where  User=root \G
select * from user where  User like 'root' \G
select * from user where  User like 'root'
;
select * from user where  User like 'root' \G
\q
status
use zabbix
show tables;
use zabbix;
show tables;
select * from history;
use zabbix;
show tables;
show test;
use test;
show tables;
show table status;
use mysql
show table status limit 1;
show table status;
show database status;
show databases;
help grant
show grants;
status;
show tables;
use test;
use zabbix;
use phplist;
show tables;
help drop
drop database zabbix;
help flush;
flush;
flush local;
show databases;
create database zabbix;
drop database zabbix;
create database zabbix;
show grants;
grant all on *.* to 'icarus'@'localhost'
;
reload
;
status;
show grants;
show grant status;
use mysql;
select * from user;
select * from user \G
help revoke
revoke all on *.* to 'icarus'@localhost'
;
'
;
revoke all on *.* to 'icarus'@localhost'
;
';
revoke all on *.* to 'icarus'@'localhost'
;
use zabbix;
sel#
;
select * from#
;
select * from\c
show grants;
show grants \G
grant all on *.* to test
\c
grant all on *.* to test
grant all on *.* to 'test'@'%';
show grants;
show grants
;
use zabbix;
help check table;
check table history fast;
help anal
help table;
help analyze table;
analyze table history;
help table;
help optimize table;
optimize table history;
select * from history;
q
\q
pager less -ieS
help show engine
show engine innodb status;
show d;
pager less -ivS
help table
help show table
help show
q
\q
pager less -ieS
help table
help check table
q
\q
pager less -ieS
show binlog events;
\q
pager less -ieS
help fulltext
help create index;
show databases;
use zabbix;
show tables;
explain hosts;
explain users;
select userid from hosts union select userid from users;
select hostid from hosts union select userid from users;
select * from hosts union select * from users;
show tables;
explain hosts;
show table hosts;
show table status;
select * from hosts;
select * from hosts where hostid= 10001;
select * from hosts;
select * from hosts where hostid= 10001 union select * from hosts where hostid=10025;
select now();
select unix_timestamp();
explain history;
select * from history where clock > unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
select unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
select unix_timestamp();
select * from history where clock > unix_timestamp() - 10 ;
\q
pager less -ieS
show databases;
use test;
show table status;
status
\q
use test;
LOAD DATA FROM MASTER;
use test;
pager less -ieS
use test;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
show slave status;
show master status;
select * from users;
show master status;
show slave status;
select * from users;
LOAD DATA FROM MASTER;
select * from users;
show slave status;
show master status;
pager less -ieS
use phplist
show tables;
select * from phplist_user_user;
delete from phplist_user_user;
LAST_INSERT_ID()
;
last_insert_id();
select last_insert_id();
delete from phplist_user_user;
help alter tables
help alter table
show table status;
explain phplist_user_user;
alter table phplist_user_user AUTO_INCREMENT =1;
delete from phplist_user_user;
alter table phplist_user_user AUTO_INCREMENT =1;
\q
use phplist;
alter table phplist_user_user AUTO_INCREMENT =1;
delete from phplist_user_user;
\q
use phplist;
select * from phplist_user_user;
select * into '/root/test.sql' from phplist_user_user ;
select * into outfile '/root/test.sql' from phplist_user_user ;
\q
use phplist;
select * into outfile '/root/test.sql' from phplist_user_user ;
\q
use phplist;
select * into outfile '/root/test.sql' from phplist_user_user ;
status;
select * into outfile '/var/test.sql' from phplist_user_user ;
show file;
help show;
help into outfile
help into;
\q
use phplist;
help show;
select * into outfile '/var/test.sql' from phplist_user_user ;
select * into outfile 'test.sql' from phplist_user_user;
\q
use phplist;
select email into outfile 'test.sql' from phplist_user_user;
\q
use phplist;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
use phplist;
select email into outfile 'test.sql' from phplist_user_user;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
load data local infile 'test.sql' into table phplist_user_user(email);
use phplist;
load data local infile 'test.sql' into table phplist_user_user(email);
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
\q
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
use phplist;
delete from phplist_user_user;alter table phplist_user_user AUTO_INCREMENT =1;
load data local infile 'email.csv' into table phplist_user_user(email);
\q
shutdown
;
\q
create database \c
\q
use mysql
help grant
grant all on phplist_db to 'fulade'@'localhost' ;
help fuld
help flush
help flush pri
help private
grant all on phplist_db.* to 'fulade'@'localhost' ;
grant all on phplist_db.* to 'fulade'@'localhost' ;\c
\q
use phplist_db;
pager less -ieS
show tables;
explain phplist_user_user;
show table status;
\q


 -------------------------------------------------------------------------------------------------
export CFLAGS="-O3 -march=core2 -mtune=core2 -mmmx -msse -msse2 -mfpmath=sse -fforce-addr -fomit-frame-pointer"

export PKG_CONFIG_PATH=/home/edward/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

export LD_LIBRARY_PATH=/home/edward/local/lib:$LD_LIBRARY_PATH

#gtkglext-1.2.0

./configure --prefix=/home/edward/local  --disable-gtk-doc --enable-debug=no

#gliv-1.9.7

./configure --prefix=/home/edward/local

 

vdpau
./configure --prefix=/home/edward/local/mplayer-vdpau --disable-x264-lavc --disable-x264   --enable-gui


smplayer
make PREFIX=/home/edward/local  QMAKE=/usr/bin/qmake-qt4 -j4 install
import ------> disable freetype


----------------------------------------------------------------------------------------------------------

java
ln -sf /usr/java/latest/jre/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so


ext3
Filesystem features:      has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file

ext4

tune2fs -O extents,uninit_bg,dir_index /dev/XXXX
 fsck -pf /dev/XXXX

To enable the ext4 features on an existing ext3 filesystem, use the command:

# tune2fs -O extents,uninit_bg,dir_index /dev/DEV
 tune4fs -O extents,uninit_bg,dir_index /dev/

WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!
After running this command (specifically, after setting the uninit_bg parameter), you MUST run fsck to fix up some on-disk structures that tune2fs has modified:

# e2fsck -fDC0 /dev/DEV
   e4fsck -fDC0 /dev/

-------------------------------------------------------------------------------
find /mnt/cifs/src/ -name "*gz" | xargs -t -i tar zxf {}
find /mnt/cifs/src/ -name "*bz2" | xargs -t -i tar jxf {}

export MAKEFLAGS="-j6"
export PS1='\@-[\u@\h \W]\$ '

http://www.google.com.tw/dictionary?langpair=en|zh-TW&hl=zh-TW

x11vnc -display :0 -ncache 10 -rfbport 5800 -clip 1440x900+0+0
metaflac --import-cuesheet-from=
rpmbuild --target=i686-redhat-linux --define 'dist .el5'  --without schroedinger --without rtmp --without theora --without speex --ba ffmpeg.spec

vmware-config-tools.pl -c --overwrite --clobber-kernel-modules=vmmemctl --clobber-kernel-modules=vmxnet3 -d

ftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/

mount -t udf,iso9660 /dev/scd0  iso/ -r

export LD_LIBRARY_PATH=/usr/lib/freetype-freeworld

find ~/cifs/*.bz2 | xargs  -t -i tar jxvf  {}
find ~/cifs/*.gz | xargs  -t -i tar zxvf  {}
find ../*.rar |  xargs -t -i unrar x -o+  {}
find *.zip | xargs -t -i  unzip  {}
find *.zip | xargs -t   file
rpmbuild -bb --with bytecode_interpreter --with subpixel_rendering
rpmbuild --with bytecode_interpreter --with subpixel_rendering --bs freetype.spec

rpmbuild --target=i686-redhat-linux --define 'dist .el5'  --with bytecode_interpreter --with subpixel_rendering -bb freetype.spec

nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1



mount -t udf,iso9660 /dev/scd0  iso/
P5Q-EM
Sensor Properties:
Sensor Type    Winbond W83627DHG (ISA 290h)

modprobe w83627ehf force_id=0x8860


ssh -R 2215:localhost:22 icarus@220.135.253.64 -N -f sleep 20
ssh edward@localhost -p 2215


mencoder -profile svi -vf scale=480:800,harddup

sysctl vm.max_writeback_pages=8192

VBoxManage   modifyvdi vmxpd.vdi compact


mv /usr/lib/vmware/modules/binary ~
vmware-modconfig -–console -–install-all


mkfs.ext3 -b 4096 -j -E stride=32 -m 1  -O dir_index,filetype  /dev/md15
mkfs.ext4 -b 4096 -j -E stride=64,stripe-width=128 -m 1  -O dir_index,filetype
#Create xfs filesystem with a 64 megabyte log
mkfs.xfs -f -s size=4096  -l size=64m /dev/hda3
#Mount filesystem with 8 log buffers, and atime and diratime disabled
mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/

rpmbuild --target=i686-redhat-linux --define 'dist .el5'   --define '_without_speex 1'  --rebuild ffmpeg-0.5-2.rf.src.rpm

find ../ -name "*rar" -print0 | xargs -0 -Iname unrar -o-  x name


mv /usr/lib/vmware/modules/binary /usr/lib/vmware/modules/binary.old
vmware-modconfig -–console -–install-all --validate-kernel-headers --validate-gcc


alias net-pf-10 off
options ipv6 disable=1
ipv6.disable=1
with 11.2: Found out that ipv6 is no longer a module, it is in the kernel, so you can administratively disable with a kernel option in
grub's menu.lst of ipv6.disable=1 but individual applications can still send out v4 and v6 queries. In my case yast2 -> software ->
online update still sends out both, until I find out how to disable.

http://wiki.centos.org/HowTos/OS_Protection

ALSA Driver
I got a simple solution for this compile problem.
Just open the ”./include/adriver.h” file in a text editor, go to line 100 and do one of the following :
Comment out the typedef : //typedef unsigned int fmode_t;
Change the kernel number : #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
(I've got the 2.6.27-xxxx so this effectively cancels the typedef without breaking compat with older kernels)
No if only I could get this laptop to make some noise … :(

VMWARE E1000 NIC QUICK HOW TO:

Some users have reported problems with the Lance (default)
and VMXNet network card drivers with FreeBSD 6.x.  If these
occur, it is recommended to use the E1000 driver in their place.

1. In /etc/rc.conf, change ifconfig_lnc0 to ifconfig_em0
2. Make the same change in /usr/local/etc/conftemplates/rc.conf
3. shutdown -h now
4. (On host) Edit the /FreeBSD.vmx
5. Add a line:
    ethernet0.virtualDev = "e1000"
        ethernet0.virtualDev=vmxnet3
   Just below:
    ethernet0.present = "TRUE"
6. Boot the VM

scsi0.present = "TRUE"
scsi0.virtualDev = "pvscsi"


ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg

把 Linux 桌面錄製為視頻。

cmake CMAKE_C_FLAGS=Release -DQTC_MODIFY_MOZILLA=true  -DQTC_DEFAULT_TO_KDE3=true ..

cmake -DQTC_DEFAULT_TO_KDE3=true  -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3 -DNDEBUG  -march=core2 -mtune=core2 -mmmx -msse -msse2 -fforce-addr -pipe" -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG  -march=core2 -mtune=core2 -mmmx -msse -msse2 -fforce-addr -pipe"  -DQT_PLUGINS_DIR=/usr/lib/qt-3.3/plugins -DQTC_BUILD_CONFIG_MODULE=true ..


[  913.765932] UDF-fs: No VRS found
[  913.765939] UDF-fs: No partition found (1)
mount -t udf,iso9660 /dev/scd0  iso/ -r


 ------------------------------------------------------------------------------------------------------

 %define with_firmware  1

rpmbuild --target=x86_64-redhat-linux  --with firmware --without debuginfo --bb kernel-uek.spec

 -----------------------------------------------------------------------------------------------------------------


 2,048 sectors make a megabyte.
2,097,152 sectors make a gigabyte
## chunk=512k=(stripe size)   512k/4k=128k ,     128*2=256K
mkfs.ext3 -K -b 4096 -j -v  -E stride=128,stripe-width=256  -m 1  -O dir_index,filetype /dev/md12
mkfs.ext4 -b 4096 -j -v  -E stride=128,stripe-width=256  -m 1  -O dir_index,filetype /dev/md15

mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=256k   -d su=512k,sw=2  -f /dev/md16meta-data=/dev/md16 


Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize

mkfs.ext3 -U b0230eac-8e63-4060-911f-4fa95c7ebe98  -K  -v -b 4096 -j -L uHome -m1 -O dir_index,extent,filetype,large_file /dev/sde5

mkfs.vfat -K -F 32  -n Transcend_8GB -S 512 -s 16  -v  /dev/sde1


mdadm -C /dev/md12 -e 0 --level=0 --chunk=512 -n 2 /dev/sda2 /dev/sdb2

## chunk=512k=(stripe size)   512k/4k=128k ,     128*2=256K
mkfs.ext3 -K -b 4096 -j -v  -E stride=128,stripe-width=256  -m 1  -O dir_index,filetype /dev/md12

mke2fs 1.41.12 (17-May-2010)
fs_types for mke2fs.conf resolution: 'ext3', 'default'
Calling BLKDISCARD from 0 to 24675090432 failed.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=128 blocks, Stripe width=256 blocks
1507328 inodes, 6024192 blocks
60241 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
184 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done



#Create xfs filesystem with a 64 megabyte log
mkfs.xfs -f -s size=4096 -l size=64m /dev/hda3
#Mount filesystem with 8 log buffers, and atime and diratime disabled
mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/

4-drive RAID5 array with a 64k stripe size
mkfs.xfs -d su=64k,sw=3

mdadm  -C /dev/md3 --level=0 --chunk=512 -n2 /dev/sda3 /dev/sdb3
mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k   -d su=512k,sw=2 -f /dev/md3
                                                                     512k /512(s)=1024
mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k   -d sunit=1024 ,swidth=2048  -f /dev/md3
mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=512k   -d su=512k ,sw=2  -f /dev/md16



mkfs.xfs -L md16-xfs -s size=4096 -l size=128m,version=2,su=256k   -d su=512k,sw=2  -f /dev/md16meta-data=/dev/md16            

isize   =256    agcount=32, agsize=10451072 blks
          =                       sectsz=4096  attr=2
data   =                       bsize=4096   blocks=334433024, imaxpct=5
           =                       sunit=128    swidth=256 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=32768, version=2
           =                       sectsz=4096  sunit=64 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0







-------------------------------------256k
mdadm -C /dev/md16 -e 0 --level=0 --chunk=256  -n 2  /dev/sda6 /dev/sdb6
mkfs.xfs -L md16-xfs -l size=128m,version=2,su=256k  -d su=256k,sw=2  -f /dev/md16

mkfs.xfs -L md16-xfs -l size=128m,version=2,su=256k  -d su=256k,sw=2  -f /dev/md16

meta-data=/dev/md16              isize=256    agcount=32, agsize=10451008 blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=334432256, imaxpct=25
         =                       sunit=64     swidth=128 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=64 blks, lazy-count=0
realtime =none                   extsz=524288 blocks=0, rtextents=0

-------------------------------------------------------------------------------------------------------------------

mkfs.xfs -L sdc1-xfs -f -s size=4096 -l size=128m /dev/sdc1
mkfs.xfs -L sdc2-xfs -s size=4096 -f -l size=64m /dev/sdc2


-l log size
-s meta data size



amd-k8:~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : active raid0 sda3[0] sdb3[1]
      24096768 blocks 512k chunks

md5 : active raid0 sda5[0] sdb5[1]
      97192960 blocks 128k chunks

md2 : active raid0 sda2[0] sdb2[1]
      24097280 blocks 128k chunks

 
  584  mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2  -d su=512k,sw=2 /dev/md3
  585  mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2  -d su=512k,sw=2 -f /dev/md3
  587  mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=512k,sw=2   -d su=512k,sw=2 -f /dev/md3
  588  mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=512k   -d su=512k,sw=2 -f /dev/md3
  589  mkfs.xfs -L md3-xfs -s size=4096 -l size=64m,version=2,su=256k   -d su=512k,sw=2 -f /dev/md3




----test----
CHUNKSIZE=  mdadm --chunk = stripe size
SUNIT=CHUNKSIZE  * 1024 / 512                   #chunksize*2
SWIDTH=RAID_DISKS(data disk number) * SUNIT

星期六, 8月 21, 2010

海綿寶寶- a motto

ㄟ! 海綿寶寶

嗯?

不知道為什麼,這段話我看了有點不高興耶

別這樣派大星,別這麼憤世嫉俗~~
你要知道,並不是每次有人提到愚蠢,都是在說你的~~

嗯...可是我並不是為了這個才不高興的...

那你究竟是怎麼啦?派大星,我最好的朋友。

為什麼裡頭沒有提到我的膨膨小褲褲?

喔~~別這樣派大星。別這麼憤世嫉俗。
你要知道,畢竟,這世界不是繞著你的小褲褲轉動的。

是嗎?我倒不覺得。
滴溜溜溜......(派大星原地轉了一圈)
你看,這世界剛剛就繞著我的小褲褲轉了一圈。

噢~~派大星。
雖然你的說法很有道理,可是我還是懷疑你可能有點走火入魔了。

星期一, 7月 05, 2010

moto milestone

GTalk Service Monitor
*#*#8255#*#*
工程模式
*#*#4636#*#*

  1. Display IMEI:
    *#06#
  2. Voice Dialer Logging Enabled
    *#*#8351#*#*
  3. Voice Dialer Logging Disabled
    *#*#8350#*#*
  4. Phone Setting
    *#*#4636#*#*
  5. FieldTest
    *#*#7262626#*#*