問題:
[root@011 ~]# mfschunkserver start
open files limit has been set to: 16384
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
setting glibc malloc arena max to 4
setting glibc malloc arena test to 4
initializing mfschunkserver modules ...
hdd space manager: can't create lock file '/mnt/sdb1/.lock': EACCES (Permission denied)
hdd space manager: no hdd space defined in /usr/local/mfs/etc/mfs/mfshdd.cfg file
init: hdd space manager failed !!!
error occurred during initialization - exiting
# 硬碟空間管理器:不能建立鎖檔案 /mnt/sdb1 (權限拒絕)
# hdd空間管理器:沒有在/usr/local/mfs/etc/mfs/mfshdd.cfg檔案中定義的hdd空間
# init:硬碟空間管理器失敗
解決辦法:
# 檢查配置檔案
[root@011 ~]# cat /usr/local/mfs/etc/mfs/mfshdd.cfg
/mnt/sdb1
# 檢視挂載點目錄的檔案使用者和屬組
[root@011 ~]# ls -ld /mnt/sdb1/
drwxr-xr-x 3 root root 4096 Sep 11 18:08 /mnt/sdb1/
# 将該目錄的歸屬設為mfs使用者群組
[root@011 ~]# chown -R mfs.mfs /mnt/sdb1/
[root@011 ~]# ls -ld /mnt/sdb1/
drwxr-xr-x 3 mfs mfs 4096 Sep 11 18:08 /mnt/sdb1/
啟動驗證:
[root@011 ~]# mfschunkserver start
open files limit has been set to: 16384
working directory: /usr/local/mfs/var/mfs
lockfile created and locked
setting glibc malloc arena max to 4
setting glibc malloc arena test to 4
initializing mfschunkserver modules ...
hdd space manager: path to scan: /mnt/sdb1/
hdd space manager: start background hdd scanning (searching for available chunks)
main server module: listen on *:9422
no charts data file - initializing empty charts
mfschunkserver daemon initialized properly