转载自:http://blog.itpub.net/16381228/viewspace-752454/
root&test#/sbin/fs/nfs/mount -F nfs -o username=tip password=erpback.200 rw,suid, 192.168.1.1:/tip /back
nfs mount: illegal file system specific option: username=tip
usage: mount [-l][-v|-p]
mount [-F FStype][-eQ] -a
mount [-F FStype][-eQrV][-o specific_options]
{ special | directory }
mount [-F FStype][-eQrV][-o specific_options]
special directory
出錯,查找使用cifsclient來配置
修改cifsclient下的參數RUN_CIFSCLIENT=1,默認為0,表示啟動cifsclient服務。
root&test#vi /etc/rc.config.d/cifsclient
"/etc/rc.config.d/cifsclient" [唯讀] 13 行, 481 個字元
#!/sbin/sh
##
## File: /etc/rc.config.d/cifsclient
## Description: Startup configuration file for HP CIFS Client
## CIFS-Client: @(#)HP CIFS Client - Version A.02.02.01
## Revision: @(#)/etc/rc.config.d/cifsclient: $Revision: 1.2 $
##
## _______if_______ _____________________then________________________
## RUN_CIFSCLIENT=1 CIFS Client starts when system enters run level 2
## RUN_CIFSCLIENT=0 CIFS Client must be started manually
##
RUN_CIFSCLIENT=1
root&test#/opt/cifsclient/bin/cifsclient start
CIFS Client started; process id: 13780
root&test</>#mkdir backup
root&test</>#cd backup
root&test#cifsmount //192.168.1.1/tip /backup
UNIX: Device busy
root&test#cd /
root&test</>#cifsmount //192.168.1.1/tip /backup
root&test</>#cd /backup
l-bash: cd: /backup: 權限不符
root&test</>#cd /backup
-bash: cd: /backup: 權限不符
root&test</>#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 978664 1109808 47% /
/dev/vg00/lvol1 2024376 42216 1779720 2% /stand
/dev/vg00/lvol8 8388608 3333360 5018496 40% /var
/dev/vg00/lvol7 4194304 1480760 2692408 35% /usr
/dev/vg00/lvol9 15728640 4835694 10552748 31% /u
/dev/vg00/lvol4 2097152 794704 1292968 38% /tmp
/dev/vg00/lvol6 8388608 3100184 5247136 37% /opt
/dev/vgidp/lvidp 104837120 9521520 94570952 9% /ipeg
/dev/vg00/lvol5 15728640 9267680 6410512 59% /home
/dev/vghist/lvhist 209666048 185176224 24298560 88% /hist
bdf: /backup: Permission denied
root&test</>#cifsumount /backup
root&test</>#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 978664 1109808 47% /
/dev/vg00/lvol1 2024376 42216 1779720 2% /stand
/dev/vg00/lvol8 8388608 3333360 5018496 40% /var
/dev/vg00/lvol7 4194304 1480760 2692408 35% /usr
/dev/vg00/lvol9 15728640 4835694 10552748 31% /u
/dev/vg00/lvol4 2097152 794704 1292968 38% /tmp
/dev/vg00/lvol6 8388608 3100184 5247136 37% /opt
/dev/vgidp/lvidp 104837120 9521520 94570952 9% /ipeg
/dev/vg00/lvol5 15728640 9267680 6410512 59% /home
/dev/vghist/lvhist 209666048 185176224 24298560 88% /hist
root&test</>#cd /backup
root&test#ls
root&test#cd ..
root&test</>#cifslogin 192.168.1.1 -U tip -D CRB -s
tip's password on 192.168.1.1:
LOC: Netbios session refused
LOC: Netbios session refused
修改配置文件cifsclient.cfg文件中smbOverTcp 的參數為yes
root&test</>#vi /etc/opt/cifsclient/cifsclient.cfg
"/etc/opt/cifsclient/cifsclient.cfg" 355 行, 13514 個字元
# Name: cifsclient.cfg
# Project: HP CIFS Client
# Author: Christian Starkjohann <<a href="mailto:[email protected]" target="_blank" rel="external nofollow" style="word-wrap: break-word; text-decoration: none; color: rgb(142, 3, 0);">[email protected]>, Hewlett-Packard Company
# $Revision: 1.32 $
# Tabsize: 4
# (c) Copyright 1998-2004 by Christian Starkjohann. All Rights Reserved.
# (c) Copyright 1999-2006 by Hewlett-Packard Company. All Rights Reserved.
# @(#)HP CIFS Client - Version A.02.02.01
# ------------------------------------------------------------------------- #
# ------------------------ Framework Configuration ------------------------ #
# ------------------------------------------------------------------------- #
smbOverTcp = yes; # if set to "yes", tcpPort parameter is ignored
root&test</>#/opt/cifsclient/bin/cifsclient restart
No CIFS filesystems to unmount.
The CIFS Client has been shut down.
CIFS Client started; process id: 13967
root&test</>#cifslogin 192.168.1.1 -U tip -D CRB -s
tip's password on 192.168.1.1:
root&test</>#cifsmount //192.168.1.1/tip /backup -s
root&test</>#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 978664 1109808 47% /
/dev/vg00/lvol1 2024376 42216 1779720 2% /stand
/dev/vg00/lvol8 8388608 3333376 5018480 40% /var
/dev/vg00/lvol7 4194304 1480760 2692408 35% /usr
/dev/vg00/lvol9 15728640 4835694 10552748 31% /u
/dev/vg00/lvol4 2097152 794704 1292968 38% /tmp
/dev/vg00/lvol6 8388608 3100184 5247136 37% /opt
/dev/vgidp/lvidp 104837120 9521520 94570952 9% /ipeg
/dev/vg00/lvol5 15728640 9267680 6410512 59% /home
/dev/vghist/lvhist 209666048 185176224 24298560 88% /hist
192.168.1.1:/tip
1351678968 471080 1351207888 0% /backup
root&test</>#cd /backup
root&test#ls
new
root&test#vi lishao
"lishao" [新檔案]
jlfdjaslfjal
~
~
"lishao" [新檔案] 1 行, 13 個字元
root&test#ls
lishao new
root&test#cifslist
Mounted Object Mountpoint State
-------------------------------------------------------------------------------
\\192.168.1.1\tip /backup MS
===============================================================================
Server Local User Remote User Domain State
-------------------------------------------------------------------------------
192.168.1.1 root tip CRB LS
转载于:https://blog.51cto.com/bsbforever/1593671