Problem with CACHEFS on Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Problem with CACHEFS on Solaris 10
# 1  
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.
# 2  
Old 12-15-2009
what was the output of cachefsstat /mount-point after you ran mount command?
Also set this, do your same steps again and post the output
$ cachefslog -f log-file-path /mount-point
# 3  
Old 12-15-2009
Quote:
Originally Posted by incredible
what was the output of cachefsstat /mount-point after you ran mount command?
Also set this, do your same steps again and post the output
$ cachefslog -f log-file-path /mount-point

Code:
nfs-client # cachefslog -f /var/log/cachefs_log /home/remote_dir
/var/log/cachefs_log: /home/remote_dir
nfs-client # cachefslog /home/remote_dir
/var/log/cachefs_log: /home/remote_dir
nfs-client # cachefsstat /home/remote_dir

    /home/remote_dir
                 cache hit rate:   100% (0 hits, 0 misses)
             consistency checks:      0 (0 pass, 0 fail)
                       modifies:      0
             garbage collection:      0
nfs-client # ssh nfs-server "unshare /export/files"
Password:
nfs-client # cachefsstat /home/remote_dir

    /home/remote_dir
                 cache hit rate:   100% (0 hits, 0 misses)
             consistency checks:      0 (0 pass, 0 fail)
                       modifies:      0
             garbage collection:      0
nfs-client # ls -l /home/remote_dir
ls: can't read ACL on /home/remote_dir: Stale NFS file handle
nfs-client # ssh nfs-server "share -o rw /export/files"
Password:
nfs-client # ls -l /home/remote_dir
total 2
-rw-r--r--   1 root     root          29 Dec 15 10:12 a_file
nfs-client # cachefsstat /home/remote_dir

    /home/remote_dir
                 cache hit rate:    50% (3 hits, 3 misses)
             consistency checks:      2 (2 pass, 0 fail)
                       modifies:      0
             garbage collection:      0

On other piece of info the mount point /home/remote_dir is in a ZFS file system, if that makes any difference.
# 4  
Old 12-15-2009
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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 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

7. 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

8. 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

9. 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
Login or Register to Ask a Question