文件挂载方法

序1 linux查看文件系统

df -hT

序2 windows查看文件系统

  右击盘符-》属性-》文件系统

序3 mount指令

命令格式:mount [-t vfstype] [-o options] device dir

(1)、-t vfstype 指定文件系统的类型,通常不必指定,mount 会自动选择正确的类型:

光盘或光盘镜像:iso9660 
DOS fat16文件系统:msdos 
Windows 9x fat32文件系统:vfat 
Windows NT ntfs文件系统:ntfs 
Mount Windows文件网络共享:smbfs 
UNIX(LINUX) 文件网络共享:nfs

参考网址:https://www.linuxprobe.com/mount-detail-parameters.html

1、freeBSD上挂载本地盘

NAME
     mount_smbfs -- mount a shared resource from an SMB file server

SYNOPSIS
     mount_smbfs [-E cs1:cs2] [-I host] [-L locale] [-M crights:srights] [-N]
         [-O cowner:cgroup/sowner:sgroup] [-R retrycount] [-T timeout]
         [-U username] [-W workgroup] [-c case] [-d mode] [-f mode]
         [-g gid] [-n opt] [-u uid]
         //user@server[:port1[:port2]]/share node

示例:

mount_smbfs -I server_ip -W workgroup //user_on_server@server_ip:445/share_name /mount/point

参考网址:https://www.freebsd.org/cgi/man.cgi?mount_smbfs(8)
参考网址:https://forums.freebsd.org/threads/mount_smbfs-refusing-to-mount-connection-refused.53767/
参考网址:http://www.tootoogo.org/wordpress/?p=1064

2、windows下搭建nfs挂载

1、安装haneWIN
2、打开安装目录下的nfssrv.exe->输出->编辑输出表文件
3、在弹出来的exports记事本中输入:
挂载目录 -name:别名 -public -alldirs
如:
D:\tmp -name:user -public -alldirs

4、登陆到设备端,执行
mount –t nfs –o nolock,tcp 192.168.1.44:/user /home

备注:不成功则可能需要重启nfssrv.exe,且需要执行RestartService.bat中的如下两行命令:

1、net stop nfsserver (命令行操作)
2、net stop pmapdaemon (命令行操作)
3、重启nfssrv.exe

参考网址:https://jingyan.baidu.com/article/cdddd41c8bcd4453ca00e15a.html

你可能感兴趣的:(文件挂载方法)