Friday, January 23, 2015

Linux : mount.nfs: Input/output error

Problem:

Red Hat 5

# mount /u00
mount.nfs: Input/output error

Solution :
service portmap start
chkconfig portmap on
chkconfig nfs on
chkconfig netfs on

Linux : mount.nfs: rpc.statd is not running but is required for remote locking

Problem:

# mount -t nfs 10.10.100.20:/vol/test1/NFSDS01 /mnt
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

But rpc.statd is running
$ ps -ef | grep rpc.statd
rpcuser 2578 1 0 16:18 ? 00:00:00 rpc.statd
rpcuser 4824 1 0 16:21 ? 00:00:00 rpc.statd --no-notify
rpcuser 4867 1 0 16:22 ? 00:00:00 rpc.statd --no-notify
rpcuser 9287 1 0 17:05 ? 00:00:00 rpc.statd --no-notify
rpcuser 10235 1 0 17:15 ? 00:00:00 rpc.statd --no-notify

Solution:

vi /etc/hosts.allow

rpcbind portmap nfsd statd mountd lockd: 127.0.0.1 10.10.100.20 : ALLOW

Oracle VM Manager : OVMRU_002024E Cannot perform operation

Error message : OVMRU_002024E Cannot perform operation


Solution :
As specified in the error message:

File Server: NAS_NFSDS01, has invalid exports. Export: /vol/vol0, is contained in export: /vol/vol0/home. Remove one of those exports on the file server, and then refresh the file server to clear the error

This is described in the release notes - http://docs.oracle.com/cd/E50245_01/E50246/html/vmrns-storage.html#vmrns-refreshing-nas-invalid and the workaround generally is:

"do not export top level file systems in the NAS-based file server's exports file"

The error in this case explicitly tells you that the export /vol/vol0 is contained in the export /vol/vol0/home and you need to remove one of those exports and then refresh the file serv.

Thursday, January 22, 2015

Linux : Create a 1G empty file

# dd if=/dev/zero of=1g.img bs=1G count=1
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB) copied, 54.018 s, 19.9 MB/s

# ll 1g.img
-rw-r----- 1 root root 1073741824 Jan 22 14:03 1g.img

# stat 1g.img
  File: `1g.img'
  Size: 1073741824      Blocks: 2105424    IO Block: 65536  regular file
Device: 13h/19d Inode: 97          Links: 1
Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-01-22 14:03:05.231563000 -0500
Modify: 2015-01-22 14:03:59.115150000 -0500
Change: 2015-01-22 14:03:59.115150000 -0500