转载自: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> 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:cs@obdev.at">cs@obdev.at>, 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> 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
打完收工。
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com