1. Mount HDFs, close the Linux comes with a few and hdfs need to start conflicting services
Reference: (1) service NFS stop and service Rpcbind stop
(2) Hadoop portmap or hadoop-daemon.sh start Portmap
[[Email protected] mnt]$ service Portmap stop
[[email protected] mnt]$ sudo service rpcbind stop
[email protected] mnt]$ sudo hdfs portmap &
[[email protected] mnt]$ jobsVerifying Background run tasks
[1]+ Running sudo hdfs portmap &
[[Email protected] mnt]$ PS aux | grep Portmap
Root 224585 0.0 0.0 148020 2068 pts/0 S 14:09 0:00 sudo hdfs portmap
[Email protected]/]$ ls-la/sbin/mount.*View Mount
-rwxr-xr-x. 1 root root 40592 Apr 2012/sbin/mount.cifs
-rwxr-xr-x. 1 root root 11616 Nov 3 2011/sbin/mount.fuse
-rwsr-xr-x. 1 root root 122880 may 2012/sbin/mount.nfs
lrwxrwxrwx. 1 root root 9 Jul 2 18:22/sbin/mount.nfs4-Mount.nfs
-rwxr-xr-x. 1 root root 1338 APR 6 2012/sbin/mount.tmpfs
2, hanging in NFS3
Reference: Hadoop nfs3 OR hadoop-daemon.sh start NFS3
[Email protected] mnt]$ sudo-u HDFs hdfs NFS3 &Background Run NFS3
[[email protected] mnt]$ jobsVerifying background tasks
[1]-Running sudo hdfs portmap &
[2]+ Running sudo-u HDFs hdfs NFS3 &
[[Email protected] mnt]$ PS aux | grep NFS3
Root 225450 0.0 0.0 148020 2064 pts/0 S 14:14 0:00 sudo-u HDFs HDFs NFS3
3. Execute the following command to verify if all the services is up and running
[Email protected] mnt]$ rpcinfo-p Server01
Program vers Proto Port service
100005 2 TCP 4242 MOUNTD
100000 2 UDP 111 Portmapper
100000 2 TCP 111 Portmapper
100005 1 TCP 4242 Mountd
100003 3 TCP 2049 NFS
100005 1 UDP 4242 Mountd
100005 3 UDP 4242 Mountd
100005 3 TCP 4242 Mountd
100005 2 UDP 4242 Mountd
4. Verify If the HDFS namespace is exported and can be mounted
[Email protected] mnt]$ showmount-e Server01
Export list for Server01:
/ *
5, Mount-t nfs-o vers=3,proto=tcp,nolock $server:/$mount _point
[Email protected]/]$ Hdfs-help | Egrep ' PORTMAP|NFS3 '
Portmap Run a Portmap service
NFS3 Run an NFS version 3 gateway
[[email protected]/]$ sudo mount-t nfs-o vers=3,proto=tcp,nolock server01://mnt/hdfs mounted successfully!
[email protected]/]$ Mount | grep HDFs
server01:/On/mnt/hdfs type NFS (rw,vers=3,proto=tcp,nolock,addr=135.33.5.53)
Issue 1: When viewing the file, it will be displayed: 14/12/30 14:23:55 INFO nfs3. Idusergroup:can ' t map group SuperGroup. Use of its string hashcode:-1710818332
Java.io.IOException:No such group:supergroup.
Cause 1:nfsserver Linux does not have supergroup this group locally? Cat/etc/group | grep supergroup
Resolution 1:
[[email protected]/]$ sudo umount/mnt/hdfs un-mount
[email protected]/]$ sudo which groupadd
/usr/sbin/groupadd
[Email protected]/]$ sudo/usr/sbin/groupadd supergroup
[[email protected]/]$ sudo cat/etc/group | grep supergroup
SUPERGROUP:X:1005:
[[email protected]/]$ sudo mount-t nfs-o vers=3,proto=tcp,nolock server01://mnt/hdfsMount again
14/12/30 15:07:35 INFO Mount. Rpcprogrammountd:giving handle (fileid:16385) to Client for export/
14/12/30 15:07:35 WARN Oncrpc. Rpcprogram:invalid RPC Call Program 100227
14/12/30 15:07:35 INFO nfs3. Idusergroup:update Cache Now
14/12/30 15:07:35 INFO nfs3. Idusergroup:not doing static uid/gid mapping because '/etc/nfs.map ' does not exist.
14/12/30 15:07:35 INFO nfs3. idusergroup:updated User Map size:63
14/12/30 15:07:35 INFO nfs3. Idusergroup:updated Group Map size:89
[Email protected]/]$ showmount-e Server01
Export list for Server01:
/ *
[Email protected]/]$ ls/mnt/hdfs/
HBase System tmp User Zeus
6. Stop Service
(1) hadoop-daemon.sh stop NFS3
(2) hadoop-daemon.sh stop Portmap
7. Reference working parameters
Http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html
Big Data discussion groups: 288396468
HDFS NFS Gateway