2018年10月9日 星期二

linux lvm

pvscan

vgscan

lvscan

lvscan
  inactive          '/dev/centos/swap' [2.00 GiB] inherit
  inactive          '/dev/centos/home' [17.80 GiB] inherit
  inactive          '/dev/centos/root' [36.46 GiB] inherit



vgchange -a y centos


https://www.tldp.org/HOWTO/LVM-HOWTO/activatevgs.html
11.3. Activating a volume group
vgchange -an centos



apt

ls /dev/centos



mount /dev/centos/root testmount

mount /dev/centos/home testmount


http://marcustsai.blogspot.com/2010/11/lvm.html
LVM實作


https://wiki.ubuntu.com/Lvm
https://help.ubuntu.com/lts/serverguide/advanced-installation.html.en

2018年9月7日 星期五

rsync linux 檔案備份 notes

原本的 abcd 目錄
tree abcd/  -a
abcd/
├── .abc
├── ddda
├── .foo
└── test
    └── gg
        └── .abcd

$ rsync -avh abcd/ test
sending incremental file list
./
.abc
ddda
.foo/
test/
test/gg/
test/gg/.abcd

sent 373 bytes  received 96 bytes  938.00 bytes/sec
total size is 20  speedup is 0.04

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

$ rsync -avh abcd test1
sending incremental file list
created directory test1
abcd/
abcd/.abc
abcd/ddda
abcd/.foo/
abcd/test/
abcd/test/gg/
abcd/test/gg/.abcd

sent 386 bytes  received 125 bytes  146.00 bytes/sec
total size is 20  speedup is 0.04

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


$ rsync -avh abcd/* test2
sending incremental file list
created directory test2
ddda
test/
test/gg/
test/gg/.abcd

sent 254 bytes  received 98 bytes  704.00 bytes/sec
total size is 14  speedup is 0.04


在source dir 用  DIRA/* 會掉 .開頭的file folder


tree -a abcd/ test test1 test2
abcd/
├── .abc
├── ddda
├── .foo
└── test
    └── gg
        └── .abcd
test
├── .abc
├── ddda
├── .foo
└── test
    └── gg
        └── .abcd
test1
└── abcd
    ├── .abc
    ├── ddda
    ├── .foo
    └── test
        └── gg
            └── .abcd
test2
├── ddda
└── test
    └── gg
        └── .abcd



參考
https://unix.stackexchange.com/questions/178078/how-to-rsync-a-directory-to-a-new-directory-with-different-name

How to rsync a directory to a new directory with different name



If you want to use rsync to recursively make the dest directory an exact copy of the src directory:

rsync -a src/ dest


linux os version
cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"



2018年8月23日 星期四

crypto aes openssl cbc gcm

kazoo it

 Edgerouter X.



ER-X Forwarding Speed
https://kazoo.ga/er-x-forwarding-speed/

Re-visit Forwarding Speed in ER-X

https://kazoo.ga/revisit-forwarding-speed-in-er-x/


Edgerouter X - IPsec Benchmarked
https://kazoo.ga/edgerouter-x-ipsec-benchmarked/


Let's focus on the 1460-byte packet size. In download direction, 377 Mbit/s is very good throughput in my opinion. It surpasses the quoted number from MediaTek and close to the 500 Mbit/s upper bound quoted by Authentec. In upload direction, relatively speaking it's a little disappointing. 128 Mbit/s is only about one third of the download throughput.





CBC
Cipher Block Chaining
Encryption parallelizable: No
Decryption parallelizable: Yes
Random read access: Yes

download is Decryption for crypto engine
upload is Encryption for crypto engine



The Crypto Engine in Edgerouter X
https://kazoo.ga/the-crypto-engine-in-edgerouter-x/




https://kazoo.ga/quick-benchmark-cbc-vs-gcm/

In my previous post, we touched OpenVPN 2.4 and its new inclusion of GCM ciphers. SFX2000 over SNBforums reminded me to check performance in current OpenSSL. Let me share my quick and dirty benchmarks.
64-bit Sandy Bridge @2.7GHz single-thread
AES-128-CBC with AES-NI



The Cortex-A9 is my RT-AC56U where I run OpenVPN server. It doesn't have any crypto acceleration in HW. CBC is faster than GCM by 145% to 185%. I thought I had to swallow my words and should not switch to GCM ciphers. Looking closer, I might get away with it.
My Conclusion..





http://cryptowiki.net/index.php?title=Output_feedback_with_a_nonlinear_function_(OFBNLF)

http://cryptowiki.net/index.php?title=Block_chaining_(BC)


http://cryptowiki.net/index.php?title=Symmetric_encryption_schemes

2018年7月8日 星期日

[2015 新聞]教師平均年齡41.21歲 10年增3歲 (2015/11/12)


https://www.mdnkids.com/news/?Serial_NO=95621



[2015 新聞]教師平均年齡41.21歲 10年增3歲 (2015/11/12)


 沈育如/臺北報導

 教育部昨天公布「中華民國師資培育統計年報」,發現幼兒園到中小學的教師平均年齡逐年上升,從九十四學年的三十八點四九歲,到一百零三學年度已增加到四十一點二一歲,十年增加近三歲;教育部分析,主要是受到少子化影響,控管教師人數,新進教師少,平均年齡自然上升。

 少子化影響下,教師人力需求也逐年降低,教育部推動「師資培育數量第二階段規畫方案」,師資生名額從九十四學年度的兩萬一千八百零五人,到一百零三學年度已降到八千零八十八人,十年內減少近六成三。

 為因應少子化、穩定校園師資量,教育部也推動「儲備教師安全量」,控管獲得教師證,卻還沒通過教師甄選的人數。七年來,儲備教師從原本八萬一千多名,目前已減少到四萬兩千多人,「少了近一半」,其中近兩萬人當代理代課教師,其他分散在各行各業。

 教育部師資培育及藝術教育司司長張明文表示,教師年齡逐年增加,一方面是因為少子化,控管教師人數,因此,新進教師人數少,缺少新血加入,平均年齡才增加;不過,目前教師退休採「七五制」,「八五制」還未上路,影響並不大。

 至於平均年齡是否持續增加,張明文說,至少等少子化穩定,教師退休人數增加,新血加入也多,新陳代謝後,平均年齡才可能變動。

 針對教師平均年齡逐年增加,全國家長團體聯盟理事長吳福濱表示,教師平均年齡四十多歲,表示具備一定的教學經驗,「沒什麼不好」;外界如果擔憂,希望能透過修法,讓教師專業評鑑上路,為教師的教學品質把關。

2018年7月5日 星期四

google map 使用參考

在Google地圖中匯入大量地點,直接在地圖上把所有地點標示出來!



一、匯入方式

1.先打開支援儲存成微軟.xlsx格式的試算表軟體,在第一列輸入標題,只能是「地名」、「地址」或「經緯度資訊」三者,例如阿正老師就輸入了「地名」及「地址」兩欄資料,如果地名不太會重複、或是不知道地址的話,也可只輸入一欄地名即可。
完成後儲存為 .xlsx格式,支援Unicode字元。

全文網址
https://pcrookie.com/?p=2026

2018年5月30日 星期三

vimdiff 展開 收起 diff sections



https://stackoverflow.com/questions/5288875/how-to-expand-collapse-a-diff-sections-in-vimdiff



Keyboard Shortcuts:

d o Get changes from other window into the current window.

d p Put the changes from current window into the other window.

] c Jump to the next change.

[ c Jump to the previous change.


CTRL+W, w - Switch to the other split window
(CTRL+W, CTRL+W does the same thing, in case you let go of the CTRL key a bit later)



:diffupdate :diffu -> recalculate the diff, useful when after making several changes vim's isn't showing minimal changes anymore. Note that it only works if the files have been modified inside vimdiff. Otherwise, use:

    :e to reload the files if they have been modified outside of vimdiff.


:set noscrollbind -> temporarily disable simultaneous scrolling on both buffers, reenable by
:set scrollbind and scrolling.



Most of what you asked for is folding: vim user manual's chapter on folding. Outside of diffs I sometime use:

    zo -> open fold. 或是按方向右鍵
    zc -> close fold.

But you'll probably be better served by:

    zr -> reducing folding level.
    zm -> one more folding level, please.

or even:

    zR -> Reduce completely the folding, I said!.
    zM -> fold Most!.

2018年3月12日 星期一

兒童安全後靠背 - 機車

駿成 新北 永和 永利路25號 02-29223523
一~六 9:00 - 19:00
2點式 + 頭枕 3500



慶昇 桃園 中正五街241號 03-3365098