note: Slackware

2009092719:18
# cat /etc/fstab
/dev/sda7 swap swap defaults 0 0
/dev/sda1 / reiserfs defaults 1 1
/dev/sda2 /var reiserfs defaults 1 2
/dev/sda5 /usr reiserfs defaults 1 2
/dev/sda6 /home reiserfs noatime,nodiratime 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

加上 noatime,nodiratime 可讓系統存取檔案、目錄時
避免系統更新檔案、目錄的最後存取時間(access time,包括read、write、及execution),
可減少不必要的硬碟 I/O

若是用 mount 外掛的話:
# mount /dev/sdb1 /mnt -o noatime,nodiratime



另外,root crontab:
有個 slocate 會每日 4:40 執行
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null

/etc/cron.daily/slocate 會製作 whereis 所需用到的資料庫
建議在裝好 Slackware 以及額外程式後,讓他跑一遍即可刪掉這個程式
避免每天都跑一次



syslogd 接收來自其它主機、設備的 log 資料

1.
/etc/syslog.conf 加上
local0.*                -/var/log/local0
local1.*                -/var/log/local1
local2.*                -/var/log/local2
local3.*                -/var/log/local3
local4.*                -/var/log/local4
local5.*                -/var/log/local5
local6.*                -/var/log/local6
local7.*                -/var/log/local7

2.
改檔案 /etc/rc.d/rc.syslog


/usr/sbin/syslogd

改成

/usr/sbin/syslogd  -r

restart syslod 後,確認看看 port 514

netstat -lunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:512                        0.0.0.0:*                                  3192/inetd
udp        0      0 0.0.0.0:514                        0.0.0.0:*                                  4034/syslogd
udp        0      0 0.0.0.0:37                          0.0.0.0:*                                  3192/inetd
udp        0      0 192.168.1.101:53               0.0.0.0:*                                  3208/named
udp        0      0 202.153.194.44:53             0.0.0.0:*                                  3208/named
udp        0      0 127.0.0.1:53                      0.0.0.0:*                                  3208/named


** syslogd 成 client 端設定
範例
#mail.*                                                 -/var/log/maillog
mail.*                                                  @對方IP


** 避免被來源不明的log 灌
要在 firewall 或 /etc/hosts.allow 設定允許的 來源 IP


遇到的狀況

裝上 Fiber 界面後
開機當掉:
VFS: mounted root (jfs filesystem) readonly on device 8:1.
Freeing unsed kernel memory: 456k freed
Waring: unable to open an initial console.
Kernel panic - no syncing: No init found. Try init= option to kernel.

若開機時下命令 boot=linux root=/dev/sda
GFS2: gfs2 mount does not exist
VFS: Cannot open root device "sda" or unknown-block(8,0)
Please append a correct "root=" boot option; here are the available partitions:
0800    1951449088 sda driver: sd 
  0801    1951447648 sda1              <---  光纖端的硬碟 sda
0810      71288832 sdb driver: sd  
  0811     71288406 sdb1                  <--- local SCSI 硬碟跑到 sdb
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,0)

找到 Red Hat AS 4 的資料:
Red Hat Enterprise Linux AS 4 Release Notes
http://www.centos.org/docs/4/html/release-notes/as-x86/

Installation-Related Notes

This section outlines those issues that are related to Anaconda (the Red Hat Enterprise Linux installation program) and installing Red Hat Enterprise Linux 4 in general.
 
  • If you are copying the contents of the Red Hat Enterprise Linux 4 CD-ROMs (in preparation for a network-based installation, for example) be sure you copy the CD-ROMs for the operating system only. Do not copy the Extras CD-ROM, or any of the layered product CD-ROMs, as this will overwrite files necessary for Anaconda's proper operation.

    These CD-ROMs must be installed after Red Hat Enterprise Linux has been installed.

  • During the Red Hat Enterprise Linux 4 installation, it can be challenging to identify individual storage devices in system configurations that include multiple storage adapters. This is particulary true for systems containing Fibre Channel adapters, because in many instances it is desirable to install Red Hat Enterprise Linux on local storage.

The Red Hat Enterprise Linux 4 installation program addresses this issue by delaying the loading of the following modules until after all other SCSI devices have been loaded:

  • lpfc

  • qla2100

  • qla2200

  • qla2300

  • qla2322

  • qla6312

  • qla6322

This results in any locally-attached SCSI device names starting with /dev/sda, /dev/sdb, and so on, with the FC-attached storage following.


 

OS 裝在 local 硬碟 (/dev/sda)
當 linux 開機時
driver 會先載入光纖界面 (如 qlogic)
然後再載入 SCSI driver
造成光纖界面端的硬碟排在前面 ( /dev/sda)
local 的硬碟被擠到後面 (/dev/sdb)
然後就開不了機,就出現上述狀況

--

我說老大阿
我們換cent os 或是 suse 好不好~~
slackware 有些硬體、軟體都不支援阿...