免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 1787 | 回复: 11
打印 上一主题 下一主题

[桌面系统] 挂载问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-05-29 07:06 |只看该作者 |倒序浏览
linux装在虚拟机上   mount 显示光盘挂载在/media下  可是/etc/fstab中没有这个挂载  /etc/auto.master中光盘挂载在/misc中  这是什么情况?

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
2 [报告]
发表于 2012-05-29 16:14 |只看该作者
/etc/fstab
的cdrom的挂载是这样写的

/dev/xxx   /media/cdrom0   udf,iso9660  user,noauto  0  0

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
3 [报告]
发表于 2012-05-29 16:15 |只看该作者
一般是插入光盘后自动挂载。

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
4 [报告]
发表于 2012-05-29 16:24 |只看该作者
回复 1# wy26464

  1. 以前的笔记,供您参考!
  2. > cat nfs.txt
  3. # NFS (Network FileSystem)
  4. # NFS ==> nfs-utils
  5. RPC(Remote Procedure Call) rpc.nfsd rpc.mountd rpc.lockd rpc.statd
  6. # ===> ATTENTION: <===
  7. # Replace x with an unused port number
  8. vim /etc/sysconfig/nfs
  9. MOUNTD_PORT="x" STATD_PORT="x" LOCKD_TCPPORT="x" LOCKD_UDPPORT="x"

  10. #  To configure a firewall to allow NFS:
  11. 1.Allow TCP and UDP port 2049 for NFS.
  12. 2.Allow TCP and UDP port 111 (portmap/sunrpc).
  13. 3.Allow the TCP and UDP port specified with MOUNTD_PORT="x"
  14. 4.Allow the TCP and UDP port specified with STATD_PORT="x"
  15. 5.Allow the TCP port specified with LOCKD_TCPPORT="x"
  16. 6.Allow the UDP port specified with LOCKD_UDPPORT="x"
  17. RQUOTAD_PORT="4005"
  18. STATD_OUTGOING_PORT="4006"

  19. /etc/exports                (NFS file systems being exported (for Kernel based NFS)
  20. /usr/sbin/exportfs        (Maintain list of NFS exported file systems)
  21. /usr/sbin/showmount        (show mount information for an NFS server)
  22. /var/lib/nfs/etab        (Records the NFS shared Dir and Permission)
  23. /var/lib/nfs/xtab        (Client's connection records)
  24. /var/lib/nfs/*.tab

  25. # man exports        (Read the Specification)
  26. vim /etc/exports
  27. /tmp        192.168.0.0/24(ro)        localhost(rw,async)        *.example.com(ro,sync)
  28. /tmp        *(rw,root_squash)
  29. /home/public        192.168.0.0/24(rw)        *(ro)
  30. # all_squash ==> (Map all uids and gids to the anonymous user)
  31. cat /etc/passwd |egrep 'nobody|nfsnobody'
  32. nobody ==> 99
  33. nfsnobody ==> 65534
  34. /home/linux        *.example.com(rw,all_squash,anonuid=99,anongid=99,sync)
  35. # sample /etc/exports file
  36.        /               master(rw) trusty(rw,no_root_squash)
  37.        /projects       proj*.local.domain(rw)
  38.        /usr            *.local.domain(ro) @trusted(rw)
  39.        /home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)
  40.        /pub            (ro,insecure,all_squash)

  41. /etc/init.d/portmap restart
  42. /etc/init.d/nfs restart
  43. /etc/init.d/nfslock restart
  44. rpcinfo -p localhost
  45. cat /var/lib/nfs/etab

  46. showmount -e localhost  
  47. exportfs -arv
  48. exportfs -auv
  49. exportfs -o async django:/usr/tmp
  50. mount -t nfs -o nosuid,noexec,nodev,bg,rw,soft 192.168.0.2:/home/public /home/nfs
  51. mount -t nfs 192.168.0.2:/home/public /home/nfs
  52. #chkconfig netfs on
  53. #service netfs restart
  54. vim /etc/fstab
  55. 192.168.0.2:/home/public        /home/nfs        nfs nosuid,noexec,nodev,bg,rw,soft,rsize=32768,wsize=32768        0 0

  56. # TCP Wrappers Control
  57. vim /etc/hosts.allow
  58. mountd,portmap: 192.168.0.0/255.255.255.0
  59. mountd: 192.168.0.

  60. # AutoMounter for NFS
  61. chkconfig autofs on
  62. service autofs restart
  63. vim /etc/auto.master
  64. /home/guests        /etc/auto.guests        --timeout=60
  65. cp /etc/auto.misc /etc/auto.guests
  66. vim /etc/auto.guests
  67. * -rw,soft,intr        192.168.1.1:/home/guests/&
复制代码

论坛徽章:
0
5
发表于 2012-05-29 16:46
我的机子fstab里没有挂载光盘 应该是自动挂载的 可是/etc/auto.master 自动挂载上写的挂载到/misc中 可是实际是挂载到了/media 里 这是怎么回事回复 2# dooros


   

论坛徽章:
0
6 [报告]
发表于 2012-05-29 16:47 |只看该作者
我也知道是自动挂载 可是/etc/auto.master显示挂载到/misc中  可是实际上挂载到了/media 下了e回复 3# dooros


   

论坛徽章:
0
7 [报告]
发表于 2012-05-29 16:48 |只看该作者
大神 你弄了个nfs。。。。。能不能给我解决一些问题。。。回复 4# ulovko


   

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
8 [报告]
发表于 2012-05-29 16:49 |只看该作者
回复 7# wy26464


    说真的,我没看明白!所以给你个笔记让你自己研究!

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
9 [报告]
发表于 2012-05-29 16:53 |只看该作者
本帖最后由 ulovko 于 2012-05-29 17:03 编辑

回复 1# wy26464

    /etc/auto.master中光盘挂载在/misc中


这句话是错误的,光盘挂在哪里您并没有设置 /misc 是配置文件,在里面去配置光盘挂在到哪里!
如果想要自动挂 光盘需要这样做:
  1. > vim /etc/auto.misc
  2. cd               -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
  3. :wq
复制代码
但是,从截图看出您的光盘已经挂上了,所以您打开 /etc/auto.misc里面肯定有这句话!

论坛徽章:
0
10 [报告]
发表于 2012-05-29 17:06 |只看该作者
嗯嗯  是有这句话 可是在/etc/auto.master 开头写的是/misc 这不是表示挂载到这个目录下么  在/etc/auto.misc中也没有哪里写有/media 那他是怎么挂到/media下的???谢谢你 呵呵回复 9# ulovko


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP