Currently browsing category

Linux, Page 2

lustre – 顯示 drive 掛載資訊

# for d in {c..g} ; do echo “/dev/sd`echo $d`1” ; tunefs.lustre –writeconf –dryrun /dev/sd`echo $d`1 |grep “lustre=”;done /dev/sdc1 Target: lustre=OST0002 /dev/sdd1 …

CentOS7 NAT server

# echo “net.ipv4.ip_forward = 1” >> /etc/sysctl.d/ip_forward.conf # sysctl -w net.ipv4.ip_forward=1 #### em1 is internal. em2 is public. # firewall-cmd –permanent –add-rule …

Using expect script to power on IBM blades

#!/usr/bin/expect -f spawn ssh root@bcmm.liho.tw expect “password:” send “PASSWORD\r” expect “system>” send “power -on -T system:blade\[1\]\r” expect “system>” send “power -on -T …

Linux – 檔案分割

偶爾遇到大檔案需要切割. linux 提供不錯的 split 指令. 可以按照檔案大小切割 也可以按照行數切 下面範例,每 100MB 切割檔案: $ split -b 100M data.ORI data.new 下面範例,每 10 萬行切割檔案 $ split -l …

lustre – quota notes

setup 5TB quota for each user (softlimit) : # ls /home -l|awk ‘{print $9}’| xargs -i lfs setquota -u ‘{}’ -b 5368709120 …