/var/sadm/pkg

Is there a way to migrate the '/var/sadm/pkg' directory safely so that the related 'pkg*' commands are still reporting proper information?
For example, if i have a bigger partition/filesystem created for it as a new destination, and the '/var/sadm/pkg' is just running out of space,
- can i simply 'tar/cpio' the '/var/sadm/pkg' directory, and move it to the new partition, and create a symbolic link from '/var/sadm/'? and, can i do it online?
Thanks, and any help will be appreciated.

user5534036 wrote:
- can i simply 'tar/cpio' the '/var/sadm/pkg' directory, and move it to the new partition, and create a symbolic link from '/var/sadm/'? and, can i do it online?Yes, you can move the contents of /var/sadm to another directory or filesystem, but you must not use a symbolic link to point at it: The next pkgadd/pkgrm or patchadd/patchrm command will remove the link and re-create a (then empty) /var/sadm/ directory.
Use a loopback mount (man lofs, mount -F lofs ...) instead to mount e.g. /new/sadm to /var/sadm.
Newer versions of Solaris run a "pkgserv" service (svcs -l pkgserv). Maybe it's safer to stop this before the move and restart it afterwards.
Martin.

Similar Messages

  • Package question - what are the uses for  /var/sadm/pkg ?

    I'm writing packages and noticed once a packages is installed using pkgadd, that files and dirs are created in the /var/sadm/pkg directory. I'm specificly intereseted in the pkginfo file - it contains all the variables from my request script and their values. My question is what are all the uses for this file?
    I've noticed that pkginfo reads from it but would there be any problem deleting certain lines from that file (lines not used by pkginfo - just variables used in the request script that I'd really rather not have floating around in a publicly accessable file).
    thanks!
    Bob

    I'm refering specificly to the file "/var/sadm/pkg/<pkgName>/pkginfo" - it's created during pkgadd and contains all the variable-value pairs from the packages pkginfo file as well as any variables used in the request script and copied to it's temporary response file. I'm not refering to the pkginfo file that you create as a package infofile component.
    I want to remove, from the /var/sadm/pkg/<pkgName>/pkginfo file, certain var-value pairs that were used in my request scripts (not part of the InfoFile/pkginfo component). Otherwise, any user can look at this file or run 'pkgparam <pkgName>' and get that sensative info.
    To the best of my knowledge, this file is only used by the commands pkgparam and pkginfo. Are there other uses?
    My worries are:
    -is it OK to remove lines manually during the postinstall script?
    -will doing this cause problems with any admin or package maintenance functions?
    Thanks-
    Bob

  • I carelessly remove the contents of /var/sadm/pkg

    I carelessly remove the contents of /var/sadm/pkg. I do not have any backup of the folder. What can I do ? Thanks a lot.

    Backup anything you care about.
    Reinstall the server from scratch.
    Restore your backups..

  • Cannot provision agent - Cannot open /var/sadm/pkg/SUNWesado

    Hi All,
    I have discovered a system. When I go to the unmanaged asset tab, highlight the host and select manage asset the job fails provisioning the agent. The error is can't open /var/sadm/pkg/SUNWesado.
    If I cd to the above directory all I see is an install and a save directory. Both of these directories are empty. I have removed the agent manually and deleted the asset in opscenter. I then tryied the process again and receive the same error.
    Any suggestions how to correct this?

    Sounds like some of the packages (maybe not just this one) are corrupt? Do you have access to the Solaris media where this pkg came from? If so can you re-install the package and see if that helps?
    What does "pkginfo -p" show?

  • Pkginfo of /var/sadm/pkg/SUNWcsr missing

    Dear All,
    we have experienced following problem. On Sun Enterprise 450 machine running Solaris 8 we have installed latest Recommened patch cluster. After that we have found out that "pkginfo" file is missing inside the /var/sadm/pkg/SUNWcsr. Unfortunately this system is not backed-up at all. Is there any way how to renew this file? (roll back some patch, copy some template?). Thank you for your responses.

    Backup anything you care about.
    Reinstall the server from scratch.
    Restore your backups..

  • Patch Manager 2.0 vs. /var/sadm installation problem.

    Hello -
    uname -a (minus the host name):
    SunOS 5.8 Generic_117350-34 sun4u sparc SUNW,Ultra-5_10
    Due to space restrictions, /var/sadm has been moved to another drive and a
    soft link in /var created so that /var/sadm --> /void/sadm
    Here starts the fun:
    ================== <-- More text at the matching string of equal-signs.
    # ./pmsetup
    Installing Patch Manager 2.0 ...
    Processing package instance <SUNWppror> from
    </void/home/mbecker/Patches/Patch_Manager_2.0/2.8/packages/sparc>
    PatchPro core functionality (Root)
    (sparc) 5.0,REV=2004.06.10.04.44
    Copyright 2001 Sun Microsystems, Inc. All rights reserved.
    Using <> as the package base directory.
    ## Processing package information.
    ## Processing system information.
    3 package pathnames are already properly installed.
    ## Verifying package dependencies.
    Installing PatchPro core functionality (Root) as <SUNWppror>
    ## Installing part 1 of 1.
    pkgadd: ERROR: unable to create lock file </var/sadm/install/.pkg.lock>.
    pkgadd: ERROR: Database lock failed.
    Installation of <SUNWppror> failed (internal error) - package
    partially installed.
    There are 2 more packages to be installed.
    Do you want to continue with installation [y,n,?] n
    2 packages were not processed!
    ==================
    And now /var contains a partially-populated /sadm directory. The soft-link to
    the second drive has been removed. So I remove /var/sadm, recreate the soft
    link, and <whew> everything is back to ..normal.
    Must the install remove the soft link to /var/sadm --> /void/sadm ?
    Must everything be shifted around to put /void/sadm back into /var/sadm? There
    have been a lot of patches installed.. and there's a lot of stuff in those
    folders.
    Your time is appreciated.
    Mark

    Hello -
    I ..found your response while searching for the solution to another problem.
    The problem was ..fixed.. by moving the contents of /var/sadm to a free partition on a second drive then mounting that partition to /var/sadm.
    By "free" ... I spent an evening backing up the second disk then doing a repartition. Brute force.. but it worked.
    Regards,
    Mark

  • Solaris 9, /var/sadm/install/contents and fix-modes issues

    I'm in the middle of patching a bunch of systems right now using Martin Paul's PCA and Casper Dik's fix-modes and I'm getting some rather odd error messages from fix-modes after installing the Recommended and Security patches from 06 August 2007.
    I'm seeing this on better than a dozen machines right now, and it doesn't seem to be consistent on which entries have the problems.
    Here's a snippet of the fix-modes output:
    WARNING: Unparseble mode "?" at /var/sadm/install/contents:107
    WARNING: Unparseble mode "?" at /var/sadm/install/contents:1238
    WARNING: Unparseble mode "?" at /var/sadm/install/contents:2348
    WARNING: Unparseble mode "?" at /var/sadm/install/contents:2359
    secure-modes: WARNING: Incomplete entry at /var/sadm/install/contents:2377
    secure-modes: WARNING: Incomplete entry at /var/sadm/install/contents:2380
    And here's the lines referenced in the snippet above:
    107: /etc/VRTSvcs/conf/config d none ? ? ? VRTSweb
    1238: /etc/opt/SUNWsrspx d none ? ? ? SUNWsrspx
    2348: /kernel/drv/vxapm d none ? ? ? VRTSvxvm
    2359: /kernel/drv/vxapm/sparcv9 d none ? ? ? VRTSvxvm
    2377: /kernel/drv/vxdmp.conf ? none VRTSvxvm
    2380: /kernel/drv/vxio.conf ? none VRTSvxvm
    Has anyone seen this behavior before? Does anyone have any suggestions on how to remedy this?
    fpsm

    IMHO the only thing that should modify the contents of /var/sadm/install/contents is a system utility. There is work currently underway to update the way that this file is modified.
    http://mail.opensolaris.org/pipermail/opensolaris-arc/2009-March/014675.html
    alan

  • Solaris10 install logs are not found at /var/sadm/install/logs -Kindly help

    I installed Solaris 10 on a sparc machine using custom jumpstart.... i wanted to check the install logs which i am unable to find at /var/sadm/install/logs.
    Which script is generating this log or why its missing ?
    Thanks in advance
    Harish

    How about under the */var/sadm/system/logs/* directory? There should be install_log in that directory.
    --gibb                                                                                                                                                                                                                               

  • Smpatch does not add 108993-49 to /var/sadm/spool/disallowed_patch_list

    Dear Patch folks,
    we use smpatch to analyze and patch Solaris 8/SPARC systems. While running 'smpatch update' in MultiUser-mode a list of prohibited patches is generated in file /var/sadm/spool/disallowed_patch_list. We then use 'smpatch add -x idlist=/var/sadm/spool/disallowed_patch_list' to install these remaining patches in SingleUser-mode. However, Patch 108993-49 is disallowed with 'smpatch update' but also not added to /var/sadm/spool/disallowed_patch_list. We then have to do a 'smpatch add -i 108993-49' by hand/script.
    My question:
    Is this behaviour by design or is something going wrong with 108993-49 ?
    greetings
    Martin

    Dear Martin,
    This forum doesnt actually support the patches and is instead for support of the Sun Update Connection software which is only for use with Solaris 10 at present. As such I believe that you are more likely to get a response to your question if you contact the appropriate patch teams or perhaps try posting your query in one of the other forums.

  • Differential flars for install & Population of /var/sadm/install/contents

    We are using differential flars to speed up installation, and have noticed that the /var/sadm/install/contents file is not being updated with the files coming from the packages in the differential flars on installation. Is this something that should be done automatically? Or is there something that we must do at flar create time or installation time to enable this? Thanks.
    Kevin

    IMHO the only thing that should modify the contents of /var/sadm/install/contents is a system utility. There is work currently underway to update the way that this file is modified.
    http://mail.opensolaris.org/pipermail/opensolaris-arc/2009-March/014675.html
    alan

  • Luupgrade to install new OS uses corrupted /var/sadm/install/contents file

    The /var/sadm/install/contents file on a system got corrupted, big time. I figure my best course of action is to reinstall the OS, because the server is currently out of service, waiting to be deployed to a new application.
    Because I'm still learning about luupgrade, I decided to use that route to re-install Soloris9. I have done the following:
    metadetach d0 d20
    metadetach d3 d23
    metaclear d20 d23
    lucreate -A 'Solaris9' -n 'Solaris9' -m /:/dev/dsk/c1t1d0s0:ufs,preserve -m /var:/dev/dsk/c1t1d0s3:ufs,preserve
    then,
    luupgrade -u -n Solaris9 -s /cdrom/cdrom0/s0
    This ran fine, almost... Output from luupgrade included a notice that 19 packages failed to install properly. I found the list of the 19 packages, and the output from their pkgadd. These messages indicated that there were problems with the /var/sadm/install/contents file, preventing these from being added.
    Is it possible to run luupgrade to install a brand new OS, without using the current/active BE's 'contents' file, but still using other system configuration info like vfstab, dfstab, passwd, shadow, ...
    Thanks in advance for help.

    Your friend with a Mac first downloads it onto his Mac using your Apple ID. Then for Mavericks, see the following for creating a bootable installer on a flash drive.
    http://www.macworld.com/article/2056561/how-to-make-a-bootable-mavericks-install -drive.html
    Scroll down to the section  Create the Mavericks install drive: The options
    For Yosemite, 10.10, I don't know if anyone knows yet how to make a bootable flash installer for that. When it's released I'm sure there will be ways of doing that published in the usual places.
    And if you want to get 10.10, I would strongly suggest not getting it right away. You should wait for at least several point updates until most of the very well known bugs are gone.

  • Unable to find the servicetag directory under /var/sadm

    Hello,
    I built couple of Ldom's using the FLAR, and i logged into the Ldom and trying to delete the servicetag.xml file, but i was unable to find the "servicetag" directory it self, any ideas what went wrong?
    Thanks,
    SA.

    Hi Priya,
    There are some articles on SDN to show images/attachments in laptop application. You can check them out.
    http://wiki.sdn.sap.com/wiki/display/mobile/UploadingAttachments-NetweaverMobile7.1
    http://wiki.sdn.sap.com/wiki/display/mobile/CreateapplicationsusingBinaryMemoandTextMemoinNetweaverMobile+7.1
    Also the path is for NWDS, at client you need to go thry program files path & then mobile apps & then the DC -> component.....
    Reg,
    Nipun
    Edited by: Nipun Dev on Sep 22, 2010 11:12 AM

  • Pkginfo and pkg list

    On Solaris 11, I analyzed the output returned by 'pkginfo' and 'pkg list' command. The packages listed looked different.
    For example i tried to list GNU related packages with both these commands and got following output -
    pkginfo | grep GNU
    system      SUNWa2psr               a2ps - GNU Any to PostScript filter (root)
    system      SUNWa2psu               a2ps - GNU Any to PostScript filter (usr)
    system      SUNWbash                GNU Bourne-Again shell (bash)
    system      SUNWbashr               GNU Bourne-Again shell (bash) (root)
    system      SUNWgawk                gawk - GNU implementation of awk
    system      SUNWgcmn                gcmn - Common GNU package
    system      SUNWggrp                ggrep - GNU grep utilities
    system      SUNWgmake               gmake - GNU make
    system      SUNWgnu-coreutils       coreutils - GNU core utilities
    system      SUNWgnu-dbm             GNU Database Manager
    system      SUNWgnu-diffutils       GNU diffutils
    GNOME2      SUNWgnu-findutils       GNU utilities find and xargs
    GNOME2      SUNWgnu-findutils-l10n  GNU utilities find and xargs - l10n files
    system      SUNWgnu-mp              The GNU Multiple Precision (Bignum) Library (4.3.2)
    system      SUNWgnu-nano            GNU nano
    system      SUNWgnu-readline        GNU readline
    system      SUNWgnu-which           GNU which
    system      SUNWgpch                The GNU Patch utility
    GNOME2      SUNWgroff               GNU roff Text Formatting
    system      SUNWgrub                GNU GRUB - GNU GRand Unified Bootloader
    system      SUNWgsed                gsed - GNU implementation of sed, the Unix stream editor
    system      SUNWgtar                gtar - GNU tar
    system      SUNWgzip                The GNU Zip (gzip) compression utility
    system      SUNWless                The GNU pager (less)
    system      SUNWpppg                GNU utilities for PPP
    system      SUNWscreen              GNU Screen
    system      SUNWtexi                GNU texinfo - Texinfo utilities (texinfo)
    system      SUNWwget                wget - GNU wget
    pkg list -s | grep GNU
    archiver/gnu-tar                                        GNU version of the tar archiving utility
    developer/build/gnu-make                                A utility for directing compilation.
    file/gnu-coreutils                                      GNU Core Utilities
    file/gnu-findutils                                      GNU utilities find and xargs
    system/prerequisite/gnu                                 gcmn - Common GNU package
    text/gnu-diffutils                                      GNU diffutils
    text/gnu-grep                                           GNU grep utilities
    text/gnu-patch                                          The GNU Patch utility
    text/gnu-sed                                            gsed - GNU implementation of sed, the Unix stream editor
    The output could be mean same information, but I am not sure if that is case.
    Thanks in advance.

    Packages beginning by SUNW are for a very old Solaris release, before Solaris 11, but with some packages we still provide the pkginfo file in /var/sadm/pkg directory for backward compatibility.
    Normally, you should use only the pkg command to list installed packages, excepted if you installed yourself SVR4 packages.

  • Accessing pkg info from C/C++

    The Solaris package database contains important per-package information which is rather useful to access from within an application. Is there any API to do this? The guide at http://docs.sun.com, "Application Packaging Developer's Guide" does not discuss one.
    As an example, consider an application suite which needs to refer to its install location for config info or storing logs. Using pkginfo(1) and pkgparam(1) one can see where the package's base install dir is (ex: 'pkgparam SUNWvts BASEDIR' returns '/opt' on my system) located. But can I do the same within my application? What are the perferred mechanisms for my applications to otherwise know where their 'BASDEDIR' is? It would seem that the /var/sadm/pkg repository is a good place to start.
    Perhaps a more general question: In providing an application suite, does the pkgadd family of commands remain the preferred method of packaging and delivering s/w? Is this true for Solaris9 and whatever lies beyond? To my understanding, the answer would be 'yes'. Are there other good alternatives recommended by Sun and/or the UNIX community in general? (as in, yes I could write my own hack at one, but would prefer not to!) I don't know, but would like to.

    Just out of curiosity, what would you do with it if you had it?
    The set of ones and zeroes has little or no meaning without knowing the starting rowid that the particular index entry points to. In a bit mapped index, there will almost certainly be multiple index entries for a single value (e.g 'M') in the bitmap, since it is unlikely that a single index entry could hold enough bits to reflect all the rows in a table big enough to be worth creating a bitmapped index on.
    John

  • Unable to install a zone: Copying 0 files to the zone.

    Hi forum users,
    I really hope someone has any idea what could be wrong here.
    First of all, the server is patched with security and recommended patches, except for 118344-13 -> R-- SunOS 5.10_x86: Fault Manager Patch which I will install on the next maintenance day. It already has 4 zones running without problem.
    However when I try to install a new zone now it always fails.
    # zoneadm -z blah install
    Preparing to install zone <blah>.
    Creating list of files to copy from the global zone.
    Copying <0> files to the zone.
    Initializing zone product registry.
    Determining zone package initialization order.
    ERROR: package <SUNWcsu> is not complete: skipping installation of package
    ERROR: package <SUNWcsr> is not complete: skipping installation of package
    ERROR: package <SUNWcsl> is not complete: skipping installation of package
    ERROR: package <SMCreadl> is not complete: skipping installation of package
    ERROR: cannot determine dependency ordered package list from package repository </var/sadm/pkg>
    ERROR: cannot generate dependency ordered list of packages from global zone </var/sadm/pkg>
    ERROR: failed to initialize packages from global zone </> to zone </zones/blah/root>
    ERROR: cannot copy and initialize packages from global zone to local zone <blah> path </zones/blah/root>
    ERROR: cannot create zone boot environment <blah>
    zoneadm: zone 'blah': '/usr/lib/lu/lucreatezone' failed with exit code 74.
    To me it seems obvious that the problem lies in the fact that it doesnt even copy a single file to the configured zone, therefor it can't install any packages and all the rest fails too. The big question of course is, why does it think it only needs to copy 0 files? Has anyone encountered such a problem before? I havent found anything yet on patches breaking zoneadm install but might have missed it.
    Does it looks like a HD corruption?Might be since the Sun Management Console agent does seem to freeze on that server too once in a while.

    All the packages are fine in the global zone, pkginfo -l tells me the packages are complete.
    I did try the truss wrap but it gives me so much info it is hard for me to figure out if something is wrong. The only error i think that returns often and that is not resolved is:
    ioctl(4, TCGETA, 0x080471E4) Err#25 ENOTTY
    ioctl(4, TCGETA, 0x08047294) Err#22 EINVAL
    The part where it seems to compile a list of files to copy however is very empty of truss entries:
    Preparing to install zone <gal2en-survey>.
    Creating list of files to copy from the global zone.
    Copying <0> files to the zone.
    Initializing zone product registry.
    Determining zone package initialization order.
    read(4, 0x0806DD3C, 5120) (sleeping...)
    ERROR: package <SUNWcsu> is not complete: skipping installation of package
    This issue is still unresolved for me. For now the only way to create a new zone on that server is to manually copy all files from another zone, editing the zonecfg entry and net config files for the zone, then i can boot and run it.

Maybe you are looking for

  • How to find open SO Items with tax code for a particular day?

    Dear all If i want to see all open SOs(items), with tax code for a particular day, how to find using table VBAP in SE16? Please guide me Edited by: Julius Bussche on Mar 3, 2009 11:10 PM Please use descriptive subject titles and the search

  • Blackberry 10 OS software upgrade issues (10.3.1.1565)

    I've upgraded my OS to 10.3.1.1565 and I've somehow lost the 'Speed Dial' function? The keypresses don't work for the previuous speed dial contact and 'Spped Dial' no longer appears in my 'Settings' The speed dial 'star' appears in the centre of the

  • BEX Formula with IF

    Hello BI experts, I try to calculate a formula using boolean operators (IF, AND). When I execute the query, I had a message like this but I only use amount in EUR  So I've added NODIM in my formula but the result is displayed without EUR If I don't u

  • Portal session auto logoff

    Hi friends I have requirement let say the user is login to EP and he is idle for some time say eg 10 min i have to get 2 things 1. The screen will give a message that the session have expired and that the user needs to logon again; or 2. The screen w

  • Batch export stlls from sequence

    Hi all Does anybody know how i can export multiple stills from a sequence without manually exporting each seperate still? I have 200+ stlls to export. fun. thanks aaron g5   Mac OS X (10.4.8)