Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3903462
  • 博文数量: 534
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4800
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(534)

文章存档

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(253)

2006年(73)

分类: LINUX

2011-10-26 13:26:48

下载了一个fuse-2.8.6.tar.gz这个版本的fuse,没有使用明白. find也没有找到*.ko文件,哎。还得继续学习。
好像是说从2.8以后fuse就不再提供kernel部分源码了,所以找不到*.ko文件也是正常。

如是再找了个老一些的版本:fuse-2.7.0.tar.gz
./configure;make
一切OK.

完成后在kernel下面有fuse.ko

  1. [root@asm kernel]# id
  2. uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
  3. [root@asm kernel]# pwd
  4. /home/oracle/c/kc/fuse-2.7.0/kernel
  5. [root@asm kernel]# modinfo fuse.ko
  6. filename: fuse.ko
  7. alias: char-major-10-229
  8. author: Miklos Szeredi <miklos@szeredi.hu>
  9. description: Filesystem in Userspace
  10. license: GPL
  11. vermagic: 2.6.9-22.EL 686 REGPARM 4KSTACKS gcc-3.4
  12. depends:
  13. [root@asm kernel]# insmod fuse.ko
  14. [root@asm kernel]# lsmod |grep fuse
  15. fuse 51220 0
  16. [root@asm kernel]# ls -l /dev/fuse
  17. crw------- 1 root root 10, 229 10月 26 20:06 /dev/fuse
  18. [root@asm kernel]# cd ../example/
  19. [root@asm example]# ls
  20. fu***mp fu***mp_fh fu***mp_fh.o hello hello_ll hello_ll.o Makefile Makefile.in null.c
  21. fu***mp.c fu***mp_fh.c fu***mp.o hello.c hello_ll.c hello.o Makefile.am null null.o
  22. [root@asm example]# ls -l /mnt/fuse
  23. 总用量 0
  24. [root@asm example]# ./fu***mp -d /mnt/fuse
  25. unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
  26. INIT: 7.8
  27. flags=0x00000003
  28. max_readahead=0x00020000
  29.    INIT: 7.8
  30.    flags=0x00000001
  31.    max_readahead=0x00020000
  32.    max_write=0x00020000
  33.    unique: 1, error: 0 (Success), outsize: 40
  34. 这个时候fu***mp应该是成功了,在输出debug日志中。。。。

  35. 另外再开一个窗口:
  36. [root@asm ~]# id
  37. uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
  38. [root@asm ~]# lsmod |grep fuse
  39. fuse 51220 2
  40. [root@asm ~]# df -lh
  41. Filesystem 容量 已用 可用 已用% 挂载点
  42. /dev/sda2 8.8G 7.7G 713M 92% /
  43. /dev/sda1 92M 8.5M 78M 10% /boot
  44. none 431M 0 431M 0% /dev/shm
  45. /dev/sdf1 7.9G 6.8G 690M 91% /bak
  46. fuse 8.8G 7.7G 713M 92% /mnt/fuse #应该是mount没什么问题了。

  47. 退出就比较简单了:Ctrl+C结束fu***mp, umount /mnt/fuse就可以了。

阅读(1989) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

g_hk2011-10-26 13:31:48

气死,CU把 “S”E"X" 给变成 ***了