preload
Jul 29

# hdparm -t /dev/sdb1

/dev/sdb1:
Timing buffered disk reads: 750 MB in 3.01 seconds = 249.58 MB/sec

Tagged with:
Jul 29

方法一 :
# echo “foo” > bar
# du -h bar

4.0K bar

方法二 :
# tune2fs -l /dev/sda1 | grep ‘Block size’

Block size: 4096

方法三 :
# dumpe2fs -h /dev/sda1 | grep ‘Block size’

dumpe2fs 1.39 (29-May-2006)
Block size: 4096

方法四 :
# blockdev –getbsz /dev/sda1

4096

Tagged with:
Jul 29

# iozone -a -i 0 -i 1 -f /xxx/xxx/iozone.test -q 64k -n 32M -g 1G > iozone.out
# Generate_Graphs iozone.out

Tagged with:
Jul 20

由於 NoMachine免費版本只能支援 2 個使用者. 在家用當然是足夠. 但是要給多人用就沒辦法了. 只好自己架設免費的 FreeNX server.

在安裝 FreeNX Server 前. 請記得安裝 expect.
# yum install expect

Loaded plugins: kernel-module
sl-base | 1.1 kB 00:00
sl-security | 1.9 kB 00:00
sl-security/primary_db | 1.8 MB 00:02
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
–> Running transaction check
—> Package expect.i386 0:5.43.0-5.1 set to be updated
—> Package expect.x86_64 0:5.43.0-5.1 set to be updated
–> Finished Dependency Resolution
Beginning Kernel Module Plugin
Finished Kernel Module Plugin

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
expect i386 5.43.0-5.1 sl-base 158 k
expect x86_64 5.43.0-5.1 sl-base 160 k

Transaction Summary
================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 318 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): expect-5.43.0-5.1.i386.rpm | 158 kB 00:01
(2/2): expect-5.43.0-5.1.x86_64.rpm | 160 kB 00:00
——————————————————————————–
Total 153 kB/s | 318 kB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : expect 1/2
Installing : expect 2/2

Installed:
expect.i386 0:5.43.0-5.1 expect.x86_64 0:5.43.0-5.1

Complete!

之後就去下載 FreeNX 和 NoMachine Client 的套件(freenx-0.7.3-4.el5.centos.x86_64.rpm, nx-3.4.0-4.el5.centos.x86_64.rpm and nxclient-3.4.0-7.x86_64.rpm)然後安裝 :
# rpm -ivh freenx-0.7.3-4.el5.centos.x86_64.rpm nx-3.4.0-4.el5.centos.x86_64.rpm nxclient-3.4.0-7.x86_64.rpm

Preparing… ########################################### [100%]
1:nx ########################################### [ 33%]
2:freenx ########################################### [ 67%]
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
Starting freenx-server: [ OK ]

3:nxclient ########################################### [100%]
Showing file: /usr/NX/share/documents/client/cups-info

CUPS Printing Backend

The NX Client set-up procedure detected that your “IPP CUPS” printing
backend doesn’t allow printing from the NX session. In order to have
printing support in your NX system, you need to set proper permissions
on the IPP backend. Please execute:

chmod 755 /usr/lib/cups/backend/ipp

設定 NX server :
# nxsetup –install –setup-nomachine-key

Setting up /etc/nxserver …done
Setting up /var/lib/nxserver/db …done
Setting up /var/log/nxserver.log …done
Adding user “nx” to group “utmp” …done
Setting up known_hosts and authorized_keys2 …done
Setting up permissions …done
Setting up cups nxipp backend …done

—-> Testing your nxserver configuration …
(omit)
<---- done

----> Testing your nxserver connection …
HELLO NXSERVER – Version 3.2.0-73 OS (GPL, using backend: not detected)
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
All users will be able to login with their normal passwords.

PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.

You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!

複製 node.conf.sample 範本檔案到 node.conf :
# cp /etc/nxserver/node.conf.sample /etc/nxserver/node.conf

檢查 FreeNX Server 是否有執行 :
# nxserver –status

NX> 100 NXSERVER – Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 110 NX Server is running
NX> 999 Bye

將 /usr/bin/nxserver –start 指令放在 /etc/rc.local 內 機器每次開機都執行 FreeNX sever

Tagged with:
Apr 21

如何更改 vmware linux 機器的 MAC 位址?

在vmware 上的mac只能改固定的位址 格式如下 00:50:56:xx:xx:xx (xx代表你可以改的位址) 可是這樣的改法並不能滿足我.我需要改 MAC 好讓原本申請的 mac address 能運作.

在改變之前先查看一下本來的MAC位址 :

# ifconfig -a | grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:11:25:CC:BB:AA

然後編輯 ifcfg-eth0 檔案. 把你要的 MAC 改好

# vi /etc/sysconfig/networking/devices/ifcfg-eth0
HWADDR=00:11:25:AA:BB:CC

改變網卡MAC位址

# service network stop
# ifconfig eth0 hw ether 00:11:25:AA:BB:CC
# service network start

如果要每次開機都改就寫到 rc.local內

vi /etc/rc.local
ifconfig eth0 hw ether 00:11:25:AA:BB:CC
service network restart

理論上這樣就沒問題了.

Tagged with:
Apr 09

rsync –delete -avl /xxx/xxx/xxx/ liho.tw:/xxx/xxx/xxx/

Tagged with:
Mar 11

make sure you already install xfs module :

# yum install -y xfs*

part it :

# parted /dev/sdb
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel
Warning: The existing disk label on /dev/sdb will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No? Yes
New disk label type? [gpt]? gpt
(parted) print

Model: IFT A16F-G2430 (scsi)
Disk /dev/sdb: 26.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags

(parted) mkpart
Partition name? []?
File system type? [ext2]? xfs
Start? 0
End? -1
(parted) print

Model: IFT A16F-G2430 (scsi)
Disk /dev/sdb: 26.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 26.0TB 26.0TB xfs

(parted) quit
Information: Don’t forget to update /etc/fstab, if necessary.

#

# mkfs -t xfs -f /dev/sdb1

mount it :

# mount -t xfs /dev/sdb1 /diskarray/
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 852M 18G 5% /
/dev/sdb1 24T 5.1M 24T 1% /diskarray

Tagged with:
Mar 01

localhost> lam user.test
test lrswipcda
localhost.localdomain> dm user.test
deletemailbox: Permission denied
localhost> sam user.test cyrus c
localhost> lam user.test
test lrswipcda
cyrus c
localhost> dm user.test

Tagged with:
Dec 31

要先安裝 minicom

# yum install -y minicom

在設定 minicom

# minicom -s

選 “Serial port setup” 由

Serial Device : /dev/modem

改為

Serial Device : /dev/ttyUSB0

記得 “Save setup as dfl” :)

如果你直接打 minicom 指令進入 minicom 也是可以設定
先按 Ctrl + A 再按 Z 在選 O

Tagged with:
Dec 07

# vos changeaddr -remove -oldaddr SERVER_NAME

Removed server SERVER_NAME from the VLDB.

Tagged with: