MRSL.NONsharedDevice Package
As you know, i’m working on a solution for high availability NFS/ZFS services with non-shared storage (using AVS), and for that purposes i have wrote a Sun Cluster 3.2 agent. That agent is listed here, and i did say i would create a package for it, so.. let’s do it!
First things first… i did that just following this instructions. I will put here the procedure/commands just for my convenience, and you should really read that article to a better explanation on “howto” create a solaris package.
I did create a “files.txt” in the /tmp/mrsl directory with the agent file listing:
/usr/scnonshared
/usr/scnonshared/MRSL.NONsharedDevice.rt
/usr/scnonshared/bin
/usr/scnonshared/bin/nsd_svc_start
/usr/scnonshared/bin/nsd_svc_stop
/usr/scnonshared/bin/nsd_monitor_start
/usr/scnonshared/bin/nsd_monitor_stop
/usr/scnonshared/bin/nsd_probe
/usr/scnonshared/bin/nsd_postnet_stop
/usr/scnonshared/bin/nsd_prenet_start
/var/log/scnonshared
/var/scnonshared
/var/scnonshared/run
After that i did run the command pkgproto:
cat files.txt | pkgproto > pkgproto.txt
That command had created a file like this:
d none /usr/scnonshared 0755 root root
f none /usr/scnonshared/MRSL.NONsharedDevice.rt 0644 root root
d none /usr/scnonshared/bin 0755 root root
f none /usr/scnonshared/bin/nsd_svc_start 0755 root root
f none /usr/scnonshared/bin/nsd_svc_stop 0755 root root
f none /usr/scnonshared/bin/nsd_monitor_start 0755 root root
f none /usr/scnonshared/bin/nsd_monitor_stop 0755 root root
f none /usr/scnonshared/bin/nsd_probe 0755 root root
f none /usr/scnonshared/bin/nsd_postnet_stop 0755 root root
f none /usr/scnonshared/bin/nsd_prenet_start 0755 root root
d none /var/log/scnonshared 0755 root root
d none /var/scnonshared 0755 root root
d none /var/scnonshared/run 0755 root root
As a file describing our package (pkginfo), will be needed, we need to add one line to the top of the generated pkgproto.txt file. just add the line at the top of the file pkgproto.txt:
i pkginfo
Then we need more one file… the last one… the pkginfo:
PKG="MRSLnonshareddevice"
NAME="Sun Cluster 3.2 Perl Agent for NFS/ZFS HA using AVS"
DESC="MRSL.NONsharedDevice is a Sun Cluster 3.2 Perl Agent to provide NFS/ZFS High Availability, with Non-shared storage using Availability Suite."
VERSION="1.0"
ARCH="i386,sparc"
CLASSES="none"
CATEGORY="application"
VENDOR="MRSL"
PSTAMP="200801101530"
EMAIL="msl@eall.com.br"
ISTATES="S s 1 2 3"
RSTATES="S s 1 2 3"
BASEDIR="/"
Now, just issue the command to actually create the package in the “/tmp/” directory:
pkgmk -o -r / -d /tmp -f pkgproto.txt
So, after that, we should have a solaris package in the “/tmp” directory named: MRSLnonshareddevice, and we can install it from the “/tmp” directory issuing the command:
pkgadd -d . MRSLnonshareddevice
That’s it, here you can download the tarball. I did put one link in the NFS/ZFS AVS procedure too. See ya!