Warnings about read-only filesystems while installing a Solaris package

I have two test machines having solaris 10. I have shared a location which have a package on machine1 and mounted that location onto machine2 as below.

machine1:  share -F nfs -o rw /home1/pkg/test
machine2:  mount -F nfs -o rw machine2:/home1/pkg/test /tmp/test

Now, when i am trying to install that package which is in /tmp/test on machine2 by providing installation directory as /tmp/test, the following warning message is being displayed.

WARNING: /tmp/test/<pkg_file1> <not present on Read Only file system> (for each file of the package)

But at the last it is showing, instllation of pkg was successful. And that package is added to installed package list.

please tell me why these error messages are coming. and how can i abort my package installation by changing "request" script.

---------- Post updated 12-27-12 at 11:47 AM ---------- Previous update was 12-26-12 at 05:53 PM ----------

please anybody help me in this context:confused:

Are you trying to install the package in a zone?
What package are you trying to install?
Did you try to install it from a local filesystem not from nfs?
Maybe

truss

can help to find what is the problem?

I am not trying to install the package in zones.

While installing the package it asks for "installation directory". If you provided any directory in local file system, there is no problem with the installation.
If you entered a directory which is a mount point of a shared location on another machine, it is giving that error.

Is it related to zones(using mount point as installation directory)? I have no idea about Solaris zones.

Try to use "-o root=hostB IP"

hostA: # share -o root=<hostB IP> /home1/pkg/test
hostB: # mount -F nfs <hostA IP>:/home1/pkg/test /tmp/test
hostB: # cd /tmp/test
hostB: # ls
common-1.4.5-SunOS5.8-sparc-CSW.pkg
hostB: # pkgadd -d com* -R /tmp/test


The following packages are available:
  1  CSWcommon     common - common files and dirs for CSW packages
                   (sparc) 1.4.5

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <CSWcommon> from </tmp/test/common-1.4.5-SunOS5.8-sparc-CSW.pkg>

common - common files and dirs for CSW packages(sparc) 1.4.5
## Software contents file initialized
http://www.blastwave.org/ packaged for CSW by Philip Brown
## Executing checkinstall script.
Using </tmp/test> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing common - common files and dirs for CSW packages as <CSWcommon>

## Installing part 1 of 1.
/tmp/test/opt/csw/bin/sparc <symbolic link>
/tmp/test/opt/csw/doc <symbolic link>
/tmp/test/opt/csw/info <symbolic link>
/tmp/test/opt/csw/lib/32 <symbolic link>
/tmp/test/opt/csw/lib/64 <symbolic link>
/tmp/test/opt/csw/lib/locale <symbolic link>
/tmp/test/opt/csw/lib/sparc <symbolic link>
/tmp/test/opt/csw/lib/sparcv8 <symbolic link>
/tmp/test/opt/csw/man <symbolic link>
/tmp/test/opt/csw/share/locale/bg/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/cs/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/da/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/de/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/el/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/es/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/fr/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/gl/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/it/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/ja/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/ko/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/locale.alias
/tmp/test/opt/csw/share/locale/nl/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/no/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/pl/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/pt/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/pt_BR/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/ru/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/sk/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/sl/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/sv/LC_TIME <symbolic link>
/tmp/test/opt/csw/share/locale/zh/LC_TIME <symbolic link>
[ verifying class <none> ]

Installation of <CSWcommon> was successful.
hostB: # ls -l
total 50
-rw-r--r--   1 root     root       23552 gr 28 16:20 common-1.4.5-SunOS5.8-sparc-CSW.pkg
drwxr-xr-x   3 root     root         512 gr 28 16:27 opt
drwxr-xr-x   3 root     root         512 gr 28 16:27 var

hostA # pwd
/home1/pkg/test
hostA # ls -la
total 54
drwxr-xr-x   4 root     root         512 gr 28 16:27 .
drwxr-xr-x   3 root     root         512 gr 28 16:19 ..
-rw-r--r--   1 root     root       23552 gr 28 16:20 common-1.4.5-SunOS5.8-sparc-CSW.pkg
drwxr-xr-x   3 root     root         512 gr 28 16:27 opt
drwxr-xr-x   3 root     root         512 gr 28 16:27 var
hostA: # pkginfo -l -R /home1/pkg/test CSWcommon
   PKGINST:  CSWcommon
      NAME:  common - common files and dirs for CSW packages
  CATEGORY:  system
      ARCH:  sparc
   VERSION:  1.4.5
   BASEDIR:  /
    VENDOR:  http://www.blastwave.org/ packaged for CSW by Philip Brown
      DESC:  Installs some useful standard CSW filesystem symlinks and files
    PSTAMP:  ra20070504125250
  INSTDATE:  gr 28 2012 16:31
   HOTLINE:  http://www.opencsw.org/bugtrack/
     EMAIL:  phil@opencsw.org
    STATUS:  completely installed
     FILES:      144 installed pathnames
                 113 directories
                   6 blocks used (approx)

try to do in this way:

machine1: share -F nfs -o rwx /home1/pkg/test
machine2: mount -F nfs -o rwx machine2:/home1/pkg/test /tmp/test

Hi GP81,
Thanks for your explanation by taking an example.
I have shared and mounted the directory as you done in the above. But still I am getting that error

"WARNING : <not present on Read Only file system>"

please observe the below output.

hostB#cd /tmp/test
hostB#touch temp.txt
touch: temp.txt cannot create

I am unable to create a temporary file in that mount point. May be because of this, am i still getting that error?

I have small doubt regarding installation of <CSWcommon>.
you have installed CSWcommon on hostB by specifying the mountpoint /tmp/test as installation directory. But why CSWcommon was added to installed package list on hostA instead of hostB.
Could you please clarify me on this? I think, we are using that location for only storage of files like DVD or CD-ROM.

Hi vamshigvk475,

There is no "rwx" option for share command.

What is the output of

hostA: # ls -ld /home1/pkg/test
hostA: # share | grep test
hostB: # mount | grep test

In my exampe I use 'pkginfo -R', so the path of packages install directory is redefined.
If I would uninstall package, I can use 'pkgrm -R' on both sides and it will work. As you can see, after installation there is 'var' directory in /hime1/pkg/test, which stores information about CSWcommon. When I use

# pkginfo | grep CSWcommon

the output is empty.

Please find the output below.

hostA# ls -ld /home1/pkg/test
drwxr-xr-x   3 root     root         512 Jun  2 14:25 /home1/pkg/test
hostA# share | grep test
-               /home1/pkg/test   root=hostB   ""

hostB# mount | grep test
/tmp/test on hostA:/home1/pkg/test remote/read/write/setuid/devices/xattr/dev=46c000a on Thu Jan  3 14:12:02 2013

I assume that you execute touch command as a root on hostB.
Try change permission on /home1/pkg/test to 777 and then execute touch command on hostB.
If this allow you to create file, then check the UID and GID of this file. I think it will be 'nobody'.

You can use option anon with share, but this is insecure solution.

share -o anon=0 /home1/pkg/test

If user can't be authenticated, then files are created with UID 0. It should work even if directory has 755 rights.

If above didn't help, then maybe there are some problems with authentication in version 4.
Try remount on hostB with this option:

hostB: # mount -F nfs -o vers=3 hostA:/home1/pkg/test /tmp/test