Kcopyd provides the ability to copy a range of sectors from one block-device to one or more other block-devices, with an asynchronous completion notification. It is used by dm-snapshot and dm-mirror.
Monthly Archives: November 2015
lvmcache
The cache logical volume type uses a small and fast LV to improve the performance of a large and slow LV. It does this by storing the frequently used blocks on the faster LV. LVM refers to the small fast LV as a cache pool LV. The large slow LV is called the origin LV. Due to requirements from dm-cache (the kernel driver), LVM further splits the cache pool LV into two devices – the cache data LV and cache metadata LV. The cache data LV is where copies of data blocks are kept from the origin LV to crease speed. The cache metadata LV holds the accounting information that specifies where data blocks are stored (e.g. on the origin LV or on the cache data LV). Users should be familiar with these LVs if they wish to create the best and most robust cached logical volumes. All of these associated LVs must be in the same VG.
centos install web2py
yum install git
git clone --recursive https://github.com/web2py/web2py.git ~/myapp
cd ~/myapp
openssl req -x509 -new -newkey rsa:4096 -days 3652 -nodes -keyout myapp.key -out myapp.crt
python web2py.py -k myapp.key -c myapp.crt -i 0.0.0.0 -p 8000
megacli delete logical drive
Warning, these commands are very dangerous, because you will lose all your data:
megacli -CfgLdDel -Lall -aAll
Clear everything:
megacli -CfgClr -aAll
check disks state under raid controler
./MegaCli64 -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"
check disk status under raid controller
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0| grep 'Device Id'
Device Id: 7
Device Id: 6
Device Id: 5
Device Id: 4
smartctl -a -d sat+megaraid,4 /dev/sda
and etc.
linux remove all extended attributes
recursive change extended attributes:
find /path -exec chattr -ais "{}" \;< /code>
linux find sticky bit recursive
find . \! -perm -01000 -perm -00100 -perm -00010 -perm -00001 \! -type l \! -type d -print
bash cat read with new lines
readarray a < /path/to/filename echo ${a[@]}
cron every 2 weeks
* * * * 0/2 /some/script
or
0 0 8-14,22-28 * * test $(date +%u) -eq 1 && sh /some/script
cat show files names
tail -n +1 /path/to/files/*
linux show folder permissions recursive
namei -l /absolute/path/to/file
PWOpen: No such file or directory
rpm -e cracklib-dicts --nodeps && yum install cracklib-dicts -y
yum remove exact version of package
yum list installed | grep kernel
yum remove vzkernel-2.6.32-042stabXXX.X
yum update exclude package
yum update --exclude=vzkernel*