2007年6月29日金曜日

centos インストール ログイン root

centos4.5で、何を間違えたのか、デフォルトのランレベルが5だったので、
rootでlogin出来ないという事態に遭遇。
とりあえず、linuxまとめwikiに書いてあった「一時的にコンソールログインを利用するには」
で、難を逃れる。

一時的にコンソールログインを利用する場合は Ctrl+Alt キーと F1~F6 キーのどれかを押してください。
コンソールログイン画面に切り替えられます。(GUI ログインの画面への復帰は Alt+F7 キー)



http://linux2ch.is.land.to/index.php?X11AndGraphicsFAQs

2007年6月28日木曜日

RAID BOARD 3ware 9650SEのBIOS起動ボタン(ショートカット)、ストライプサイズ。

最速RAIDカードの名が高い3ware 9650のBIOS。
3BMと呼ばれるそれを立ち上げるには、pcが起動してから「ALT+3」を押す。
一番困ったのがストライプサイズ。
ストライプサイズとは、RAID0に代表される並列データ転送のサイズのこと。
http://www.runser.jp/doc/sata-raid-stripe-1.html
を参考にすると、

これまでRAID0(ストライピング)は、動画編集のような用途で大容量とシーケンシャル アクセス性能の向上を目的にした技術と思っていましたが、たまたまインテルが掲載した記事を見ていると、ストライプ サイズを大きくすると非シーケンシャル I/O の性能が向上するという記述がありました。
「非シーケンシャル I/O」というのはランダム アクセスになりますが、よくよく考えたらそうなることも理解できます。

動画編集などでシーケンシャル アクセスを重視するならストライプ サイズは8K/16K、OSやアプリケーション等を使用するランダム アクセスを重視するなら64K/128Kバイト、両者のバランスを取るなら32Kでもいいかと思います。
さらにランダム アクセスを重視するならストライプ サイズ256Kとか512Kとか大きな設定ができるRAIDを使う方法もあるでしょう。


とりあえずデフォルトは64KBになっている。
ファイルを入れておくためだけのサーバなので、どっちつかずなデフォルト値でいくことにした。

全ての設定を終え、保存するために「F8」を押すと、アレイのbuildが始まる。死ぬほど長いので気を付けること。

2007年6月25日月曜日

ネットワークドライブの共有時間を伸ばす

ネットワーク関係のTIPS2つめ。

共有フォルダの設定を変更して、必要なリソースを特定のネットワークドライブからアクセスできるように変更しました。が、しかし、Windows 2000以降では、約15分ほどネットワークドライブにアクセスがないと自動的に接続切断するようになっています。

セキュリティ上必要な仕様なのは理解できますが、利便性が下がるのは見てのとおり。そこで今週は自動切断を無効にせず共有時間を15分から伸ばすTipsを紹介しましょう。

1.<スタート>メニュー→<ファイル名を指定して実行>と選択。
2.「名前」に半角で「regedit」と入力し、<OK>ボタンをクリック。
3.レジストリエディタが起動したら、HKEY_LOCAL_MACHINE →System →CurrentControlSet →Services →LanmanServer →Parametersとキーをたどって開く。
4.<編集>メニュー→<新規>→<DWORD値>と選択。
5.「新しい値 #1」を「Autodisconnect」に変更する。
6.「Autodisconnect」をダブルクリックで開く。
7.「10進」をチェックした状態で、値のデータ欄に半角で「360」と入力し<OK>ボタンをクリックする。
8.レジストリエディタを終了させ、Windows XPに再ログオンする。

これで共有時間が6時間(360分)に延長されました。ちなみに設定できる最大値は「4294967295」と約71582788時間です。ここまで延長するぐらいなら、最初から値を「0」にして自動切断を無効にすることをお薦めいたします。


これを逆に利用して、一つ前のエントリ(最大共有数の問題をクリアする)にも使うことが出来る。

要は、接続時間を極端に短くしてやればいい。

引用http://journal.mycom.co.jp/column/winxp/069/


windowsで最大共有数の問題をクリアする

Windows(XP、2k等)は、最大共有数が制限されている。
Windows XPで同時アクセスできるユーザー数は5~10台(home=5、pro=10)。
これは、xpや2kをサーバ用途として使うことをライセンスで否定しているため。
但し、サーバ製品群なら問題ない(win 2k server等)。
CALを買えと云ってくるかも知れないけれども。
ただ、プリンタサーバとしてエンドユーザ用OSの入ったマシンを使うことはざらだし、
そもそも簡単な共有でファイルをシェアすることは当たり前のようにある。
そこで、最大共有数は変えられないので、出来るだけ早いタイミングで切断するように設定する。

net config serverコマンドの「autodisconnect」により設定。
Timeに「-1」を設定することで自動切断されない。

Timeは 1 から 65535 までの数値を設定可能。


net config server /autodisconnect:TIME


例:net config server /autodisconnect:10
10分間接続がなかった場合、接続を切断する。

2007年6月5日火曜日

ADVC-100のコピーガードキャンセラ

ADVC-110を持っているのだけれども、ADVC-100には強力なコピーガードキャンセラが付属しているとのこと。

Locked Audio機能のあるカノープス製品を購入。ADVC-100は、うんこノイズが出るとかで、RaptorとかEZ-DV用の対策用ベータドライバが上 がっている状態。音声レベルが低いなんて言う報告も聞く。今一つ不安も残る。しかし、環境に敏感なようで、サウンドカードのドライバ変えたら直ったとか、 RAIDを使うのやめたら直ったとか、問題がない環境では良好みたい。おまけに、テストモードに入ると強力なコピーガードスルー機能が働くみたい。テスト モードは、INPUT SELECTボタンをずーっと押してると3秒でカラーバーになって、15秒でバーが消えるとそのモードに入るよう。
ADVC-110で試せたらまた書こう。

参考サイト

2007年6月4日月曜日

3dm2 SETTINGS

3ware 9590SE-8LPMLのインストール。
ドライバは組み込みなので必要なし(CENTOS5)。
PCI-eの4x以上のポートに差せば認識される。

3ware Software Download Center
http://www.3ware.com/support/download.asp
より、3dm2をダウンロード。
3dm2にはcliも含まれている。

productを指定し、モデルを選択、3DM2_CLI Management Utilitiesを選択、
Linux - 64 bitを選択。
画面遷移後、ライセンス認証画面になるので、Agreeのリンク先を
wget等で、該当物をダウンロード。

wget http://www.3ware.com/download/Escalade9650SE-Series/9.4.1.1/3DM2_CLI-Linux_x86_64-9.4.1.1.tgz

解凍。
tar zxvf 3DM2_CLI-Linux_x86_64-9.4.1.1.tgz

(zxvf以降はその時の最新を指定)。

コンソールオプションを付けて実行
sh setupLinux_x64.bin -console

--------------------------------
iptablesなどでポートをがちがちに固めていると、たまに起動に失敗する(何故・・・)。
なので、僕はiptablesをstopさせてからやりました。
最終的にブラウザでhttps://192.168.X.XX:888などにアクセスする際も気を付けること。

パスワードが分からない
3wareのパスワードは、付属CDのUsrGuide.pdfに書いてある。が、見つけにくい。


以下はこんなの出ましたよ。適当に応えましたよの図。
ここの前にライセンスがでる。

You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]


You must approve to continue.

[ ] 1 - I accept the terms of the license agreement.
[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0] 1


[X] 1 - I accept the terms of the license agreement.
[ ] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0] 0



Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1

-------------------------------------------------------------------------------
3ware Disk Management Tools - InstallShield Wizard

3ware Disk Management Tools Install Location

Please specify a directory or press Enter to accept the default directory.

Destination Directory [/opt/AMCC]

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1

-------------------------------------------------------------------------------
3ware Disk Management Tools - InstallShield Wizard

Select the features for "3ware Disk Management Tools" you would like to
install:

3ware Disk Management Tools

To select/deselect a feature or to view its children, type its number:

1. [x] 3ware Disk Manager 2 ( 3DM2 )
2. [x] Command Line Interface ( tw_cli )
3. [x] Firmware Upgrade Utility ( tw_update )
4. [x] 3ware Documentation ( HTML Bookshelf )

Other options:

0. Continue installing

Enter command [0] 0


Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1

-------------------------------------------------------------------------------
3DM2 Email Configuration


Would You To Enable Email Notification?

[X] 1 - Yes
[ ] 2 - No

To select an item enter its number, or 0 when you are finished: [0] 0



Email(SMTP) Server Name.

Enter email server name: [] foobar.com


Sender Email Address.

Enter sender email address: [] info@foobar.com


Recipient Email Address.

Enter recipient email address: [] info@foobar.com
Enter recipient email address: [info@foobar.com]


Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1
3DM2 has a feature that will log commands performed.

Would you like to enable Command Logging?

[X] 1 - Yes
[ ] 2 - No

To select an item enter its number, or 0 when you are finished: [0] 0



-------------------------------------------------------------------------------
3DM2 Security Configuration


Would you like to limit 3dm2 connections to localhost only?

[X] 1 - Yes
[ ] 2 - No

To select an item enter its number, or 0 when you are finished: [0] 2


[ ] 1 - Yes
[X] 2 - No

To select an item enter its number, or 0 when you are finished: [0] 0


3dm2 listening port.

Enter port for web management: [888]


Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1

-------------------------------------------------------------------------------
3ware Disk Management Tools - InstallShield Wizard

3ware Disk Management Tools will be installed in the following location:

/opt/AMCC

with the following features:

3ware Disk Manager 2 ( 3DM2 )
Command Line Interface ( tw_cli )
Firmware Upgrade Utility ( tw_update )
3ware Documentation ( HTML Bookshelf )

for a total size:

124.2 MB

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] 1

-------------------------------------------------------------------------------
3ware Disk Management Tools - InstallShield Wizard


Installing 3ware Disk Management Tools. Please wait...


|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
|||||||||||||||||||||||||||||||||||||||||||||||||
-------------------------------------------------------------------------------
3ware Disk Management Tools - InstallShield Wizard

The InstallShield Wizard has successfully installed 3ware Disk Management
Tools. Choose Finish to exit the wizard.

Press 3 to Finish or 5 to Redisplay [3] 3

Please wait while 3dm2 is started...

参考サイト
http://www.takajun.net/pc/storyp061214.htm

2007/06/30追記
元からRAIDにシステムを突っ込もうとする場合、CENTOS5インストーラだとRAIDを認識してくれない。
CENTOS4.5インストーラは認識するので、こちらからバージョンアップが適当。

swapファイルの追加作成について

メモリの増設でswapを追加作成しなければならなくなったので、
その時のTIPS。

現状の確認
  • freeコマンド
  • less /proc/meminfo
  • topコマンド
等で、使用量を確認する。

相当数のメモリを積んでいれば、この時点で全くswapを使っていないか、
わずかなswapが発生しているだけの筈。
ただ、慣習的に「実装メモリの二倍」swapを、というのがあるので、
swapファイルを増やすことにする。

スワップ領域をパーティションで用意するのではなく、今回はスワップファイルを作成し、
それをswap領域として使用する。

コマンドはdd。

dd if=/dev/zero of=/swap/swap0 bs=1024 count=65536
"of="に続く場所に、swapファイルが作成される。
上記例の場合、/swapにswap0というswapファイルが作成される。

bsでバイト単位(ここでは1024バイト単位)を指定する。
countの数値は、幾らswap領域として新たに確保するのかに依る。
たとえば上記count=65536では、64MBのswapファイルを作成している。
計算式はbs値×用意MB(ここでは1024x64=65536)。

パーミッションの変更
chmod 600 /swap/swap0
と、確認
ls -l /swap/swap0

swapファイルを初期化する。
mkswap /swap/swap0 65536

swap領域を有効にする
swapon /swap/swap0

無効にするには
swapoff /swap/swap0

起動時に自動的に有効にする場合は、
/etc/fstab に以下の行を追加。
/swap/swap0 swap swap defaults 0 0


以上。

参考サイト
http://www.redout.net/data/swap.html