美文网首页
nfs-ganesha 编译运行

nfs-ganesha 编译运行

作者: 帆子_8c3a | 来源:发表于2021-03-01 00:32 被阅读0次

    nfs-ganesha dep

    apt install gcc g++ gdb cmake libkrb5-dev
    apt install bison flex doxygen
    apt install lsb-release
    apt install uuid-dev
    apt install doxygen
    apt install libcap-dev libblkid-dev
    apt install git
    apt install nfs-common 
    

    compile

    git clone https://github.com/nfs-ganesha/nfs-ganesha
    git checkout V2.7.6
    git submodule update --init --recursive
    
    cmake .. -DUSE_9P=OFF -DUSE_NLM=OFF
    make
    

    ganesha.conf(for NFS4.1)

    EXPORT
    {
        Export_Id = 77;
        Path = /opt;
        Pseudo = /;
    
        FSAL {
            Name = VFS;
        }
        Access_Type = RW;
        Disable_ACL = true;
        Squash = No_Root_Squash;
        Protocols = 4;
    }
    EXPORT_DEFAULTS{
        Transports = UDP, TCP;
        SecType = sys;
    }
    

    ganesha.conf(for NFS3)

    EXPORT_DEFAULTS
    {
        SecType = sys;
        Protocols = 3;
    }
    NFS_CORE_PARAM
    {
        Enable_NLM = false;
        Enable_RQUOTA = false;
        Protocols = 3;
        mount_path_pseudo = true;
    }
    EXPORT
    {
        Export_ID=100;
        Protocols = 3;
        Transports = TCP,UDP;
        Path = /opt;
        Pseudo = /opt;
        Tag = ceph;
        Access_Type = RW;
        Attr_Expiration_Time = 0;
        Squash = None;
        FSAL {
            Name = VFS;
        }
    }
    

    run

    /usr/bin/ganesha.nfsd -F -L /dev/stdout -f ~/ganesha.conf -N NIV_EVENT
    /usr/bin/ganesha.nfsd -f ~/ganesha.conf
    
    mount -t nfs -o nfsvers=3 localhost:/ /mnt/test
    mount -t nfs4 -ominorversion=1 localhost:/ /mnt/test
    mount -t nfs4 -ominorversion=1 -onoac localhost:/ /mnt/test
    

    nfs内核属性

    cat /proc/self/mountinfo
    cat /proc/self/mounts
    cat /proc/self/mountstats
    

    相关文章

      网友评论

          本文标题:nfs-ganesha 编译运行

          本文链接:https://www.haomeiwen.com/subject/gnlofltx.html