Sponsored Content
Operating Systems Solaris Problem with CACHEFS on Solaris 10 Post 302380505 by ccj4467 on Tuesday 15th of December 2009 11:01:57 AM
Old 12-15-2009
Problem with CACHEFS on Solaris 10

Hi,

I am having a problem with getting cachefs to work in in disconnect mode.
I have 3 load balanced web servers that access the web content on a centralized NFS server. The content does not change very often and we want the web content available at all times,i.e. the NFS server goes down.
A previous SA had set up cachefs on each of the web servers but it has never worked as far as I know. Here are the results of a little test I ran to mimic what I am trying to achieve.

Code:
nfs-server # cd /export
nfs-server # mkdir files
nfs-server # cd files
nfs-server # date > a_file
nfs-server # ls -l
total 2
-rw-r--r--   1 root     root          29 Dec 15 10:12 a_file
nfs-server # share -o rw /export/files
nfs-server # share
-               /export/files   rw   ""


nfs-client # mkdir -p /home/remote_dir
nfs-client # mount nfs-server:/export/files /home/remote_dir
nfs-client # ls -l /home/remote_dir
total 2
-rw-r--r--   1 root     root          29 Dec 15 10:12 a_file

nfs-client # umount /home/remote_dir

nfs-client # cfsadmin -c /var/cachefs/caches/cache1

nfs-client # mkdir -p /var/cachefs/backpaths/remote_dir
nfs-client # mount -o vers=3 nfs-server:/export/files /var/cachefs/backpaths/remote_dir

nfs-client # mount -F cachefs -o backfstype=nfs,\
backpath=/var/cachefs/backpaths/remote_dir,\
cachedir=/var/cachefs/caches/cache1,\
demandconst \
nfs-server:/export/files /home/remote_dir

nfs-client # tail /etc/mnttab

nfs-server:/export/files  /var/cachefs/backpaths/remote_dir       nfs     vers=3,xattr,dev=4b40006        1260891074
/var/cachefs/backpaths/remote_dir       /home/remote_dir        
cachefs backfstype=nfs,backpath=/var/cachefs/backpaths/remote_dir,cachedir=/var/cachefs/caches/cache1,demandconst,dev=4bc0004
   1260891285

nfs-client # ls -l /home/remote_dir
total 2
-rw-r--r--   1 root     root          29 Dec 15 10:12 a_file


nfs-server # unshare /export/files


nfs-client # ls -l /home/remote_dir
/home/remote_dir: Stale NFS file handle
total 2

nfs-client # ps -ef | grep cache
    root  8065  8031   0 10:40:21 pts/2       0:00 grep cache
    root  7658   356   0 12:08:32 ?           0:00 /usr/lib/fs/cachefs/cachefsd


nfs-server # cat /etc/release
                        Solaris 10 11/06 s10x_u3wos_10 X86
           Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 14 November 2006

nfs-client # cat /etc/release
                       Solaris 10 10/09 s10x_u8wos_08a X86
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 16 September 2009

Any insight would be appreciated. A solution using cachefs would be ideal.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

problem in solaris 8

hi, I have install solaris 8 7/01 in ULTRA 10,but when I type commands such like "admintool" and "swtool",there will be a error messege: warning:Missing charsets in string to fontset conversion arithmetic exception - core dumped I dont know what these mean,can anyone help me?thank... (1 Reply)
Discussion started by: fuqiang1976
1 Replies

2. UNIX for Dummies Questions & Answers

Problem with Solaris 9

I'm trying to install this on my pc at home but the thing is after I get to the option screen that ask where I want to boot solaris from: hard drive cd interface after I choose the cd option, it begins reading from the CD then it asks me if I want the installation to be interactive or... (3 Replies)
Discussion started by: TRUEST
3 Replies

3. Solaris

Solaris 10 - X Problem

I can't get a remote X session to display on my Solaris 10 box. I can get it to work if I launch X on my local machine (like /usr/openwin/bin/xclock) so I know X itself is working correctly. The problem is, when I am on a remote host, I set the variable, and run /usr/openwin/bin/xclock, and it... (5 Replies)
Discussion started by: pc9456
5 Replies

4. Solaris

Solaris 10 LU problem

I have a problem with export/home after doing the upgrade. The df -k shows /export and /export/home both being mounted on the same slice. Yes, both are in the vfstab file too. When I reformatted the disk for the upgrade, I added 10gb to the /export partition so that is the one I want to end up... (3 Replies)
Discussion started by: zeekstern
3 Replies

5. Solaris

Solaris 8 -> Solaris 10 = problem :/

Hello, I have a multithreading program (just two threads) which works on Solaris 8. I use pthread library to synchronize threads. I try to run it on Solaris 10 (on another computer). All sources was re-compiled but behaviour of my program is not the same. The thread 2 is never executed when... (3 Replies)
Discussion started by: Tinkh
3 Replies

6. Solaris

Solaris Problem

I have a SUnfire V120 solaris 10 machine I have recently added memory to. After installation of the RAM, powering back on, the machine did not come back on the network. Consoled into the machine, the routing table has been wiped out completely and I had to reconfigure the IP address. I got the IP... (12 Replies)
Discussion started by: lnxjenn
12 Replies

7. Solaris

Problem with Solaris 11.1 vm

Hi! I have the following problem: I tried to create a Solaris 11.1 virtual machine in the latest VMware Workstation (10.0.1) and despite my efforts it is impossible to make the Tools running. During the installation I receive the following messages: root@solaris:... (0 Replies)
Discussion started by: apollookc
0 Replies

8. Solaris

T3-2 and Solaris 10 Problem

Hi Guys, I got a unique (and wierd) problem with trying to install Solaris 10 off of a DVD on a T3-2. You boot cdrom, it goes through the questions and then when it comes to ask you if you want to install using nfs or dvd if you pick dvd it comes up with an error - ERROR: The disc you inserted... (8 Replies)
Discussion started by: callmebob
8 Replies

9. Solaris

Solaris 10 problem - need help

I installed Solaris 10 on UltraSparc T5120. The machine shows yellow triagle ! LED. I got endless Warnings on console connection WARNING: /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk@0,0 (sd6): Error for Command: read(10) Error Level: Fatal... (9 Replies)
Discussion started by: gping
9 Replies
nfssec(5)																 nfssec(5)

NAME
nfssec - overview of NFS security modes The mount_nfs(1M) and share_nfs(1M) commands each provide a way to specify the security mode to be used on an NFS file system through the sec=mode option. mode can be sys, dh, krb5, krb5i, krb5p, or none. These security modes can also be added to the automount maps. Note that mount_nfs(1M) and automount(1M) do not support sec=none at this time. mount_nfs(1M) allows you to specify a single security mode; share_nfs(1M) allows you to specify multiple modes (or none). With multiple modes, an NFS client can choose any of the modes in the list. The sec=mode option on the share_nfs(1M) command line establishes the security mode of NFS servers. If the NFS connection uses the NFS Ver- sion 3 protocol, the NFS clients must query the server for the appropriate mode to use. If the NFS connection uses the NFS Version 2 proto- col, then the NFS client uses the default security mode, which is currently sys. NFS clients may force the use of a specific security mode by specifying the sec=mode option on the command line. However, if the file system on the server is not shared with that security mode, the client may be denied access. If the NFS client wants to authenticate the NFS server using a particular (stronger) security mode, the client wants to specify the secu- rity mode to be used, even if the connection uses the NFS Version 3 protocol. This guarantees that an attacker masquerading as the server does not compromise the client. The NFS security modes are described below. Of these, the krb5, krb5i, krb5p modes use the Kerberos V5 protocol for authenticating and pro- tecting the shared filesystems. Before these can be used, the system must be configured to be part of a Kerberos realm. See SEAM(5). sys Use AUTH_SYS authentication. The user's UNIX user-id and group-ids are passed in the clear on the network, unauthenticated by the NFS server. This is the simplest security method and requires no additional administration. It is the default used by Solaris NFS Version 2 clients and Solaris NFS servers. dh Use a Diffie-Hellman public key system (AUTH_DES, which is referred to as AUTH_DH in the forthcoming Internet RFC). krb5 Use Kerberos V5 protocol to authenticate users before granting access to the shared filesystem. krb5i Use Kerberos V5 authentication with integrity checking (checksums) to verify that the data has not been tampered with. krb5p User Kerberos V5 authentication, integrity checksums, and privacy protection (encryption) on the shared filesystem. This provides the most secure filesystem sharing, as all traffic is encrypted. It should be noted that performance might suffer on some systems when using krb5p, depending on the computational intensity of the encryption algorithm and the amount of data being transferred. none Use null authentication (AUTH_NONE). NFS clients using AUTH_NONE have no identity and are mapped to the anonymous user nobody by NFS servers. A client using a security mode other than the one with which a Solaris NFS server shares the file system has its security mode mapped to AUTH_NONE. In this case, if the file system is shared with sec=none, users from the client are mapped to the anonymous user. The NFS security mode none is supported by share_nfs(1M), but not by mount_nfs(1M) or automount(1M). /etc/nfssec.conf NFS security service configuration file See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWnfscr | +-----------------------------+-----------------------------+ automount(1M), mount_nfs(1M), share_nfs(1M), rpc_clnt_auth(3NSL), secure_rpc(3NSL), nfssec.conf(4), attributes(5) /etc/nfssec.conf lists the NFS security services. Do not edit this file. It is not intended to be user-configurable. 13 Apr 2005 nfssec(5)
All times are GMT -4. The time now is 12:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy