Linux NFS 使用总结
1. 服务器nfs的配置
2. 客户端nfs的配置
3. 使用nfs
3.1 作为共享文件系统mount
3.2 作为根文件系统mount
4.备 注
nfs是Network File System,基于RPC(Remote Procedure Call Protocol远程过程调用协议)实现。
1.服务器nfs的配置
1.1 startàsystem settingànfs添加共享路径、允许访问的客户端IP以及访问方式
添加之后则存到/etc/exports文件中,如:/home/rrhudp0216 128.0.0.*(rw,sync):网络上共享/home/rrhudp0216,允许128.0.0.*网段的所有IP可以读写访问该文件夹。
1.2 services nfs restart重启nfs
1.3 services portmap restart 重启portmap
1.4 services iptables stop 关闭防火墙
1.5 services iptables status 防火墙状态查看(确认防火墙被关闭)
2.客户端nfs的配置
2.1 makemenuconfigàFile SystemsàNetwork File Systems中选上
2.2 Network Application中选择portmap项
3.使用nfs
3.1 作为共享文件系统mount
系统起来之后:
#mkdir /var/nfs
#chmod 777 nfs
#mount –t nfs –o tcp 128.0.0.7:/home/rrhudp0216 /var/nfs
# ls
Makefile fmod.c rrh_init.c~
Makefile_bk freqnum.h rrh_init.h
Makefile~ frequency.h rrh_init.o
…
3.2 作为根文件系统mount
在U-boot下设置U-boot环境变量:
U-boot->setenv bootargs ‘root=/dev/nfs rw nfsroot=128.0.0.7:/home/rrhudp0216,proto=tcp,nfsvers=3,nolock ip=128.0.0.28:128.0.0.7:128.0.0.1:255.255.0.0::eth0:off’
系统启动之后
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Complete:
device=eth0, addr=128
相关文档:
例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......
五:kmem_cache_create()分析
我们以一个例子来跟踪分析一下slab的机制:
下面是一个测试模块的代码:
#include <linux/config.h>
#include <linux/module.h>
#include <linux/slab.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("ericxiao <xgr178@163.com>");
MODULE_DESCRI ......
一、要求:
1、能够显示出Makefile的总数
2、能显示一级目录下的Makefile总数、Makefile列表及其Makefile的内容
3、能将上述内容写入相应的文件
二、实例
rm -rf ~/Desktop/linux_Makefile/*
for i in `find . -maxdepth 1 -type d`
#仅仅是当前目录,所以请将本脚本放在linux源码目录下执行。
do
e ......
/*
kmalloc can apply 128KB memory only. This func support any continous memory allocate more than 2MB.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#define KMEM_PAGES &nb ......