Service Management Facility

Service Management Facility

All the following commands are to be run from the OBP and not the OS. They are only valid on Sparc hardware that uses the openboot rmware. The eeprom command can be used from the OS to view or set openboot rmware variables.Show the value of the auto-boot? variableprintenv auto-boot?Set the system to not auto bootsetenv auto-boot? falseRestore the system default for auto bootset-default auto-boot?Show the default boot deviceprintenv boot-deviceList the actual device path for the disk device aliasdevalias diskList all openboot variables, current, and default valuesprintenvShow devices seen by openbootshow-devsShow help on all OBP commandshelpBoot the system into single user mode from the CD ROMboot cdrom -sBoot the system into single user mode using the default deviceboot -sReset the systemreset-all Check to see if gcc is installed on systempkginfo SMCgcc /or/ pkginfo | grep gccRemove the gcc packagepkgrm SMCgccCheck the installation of the gcc (SMCgcc) packagepkgchk SMCgccShow revisions of packages on systemshowrev -pGet expected le info and source package for a lepkgchk -l -p /usr/sfw/bin/gccVerify all packages (and les) on the systempkgchkDisplay information about a packagepkgchk -l SMCgccDisplay version information about an installed packagepkginfo -x SMCgccList all patches on the systemshowrev -p /or/ patchadd -pList patches applied to the SUNWckr packagepkgparam SUNWckr PATCHLIST smpatch and updatemanager can be used to manage system patches.

Find the size of a diskiostat -En (or use the format command)Display info on dump devicedumpadmList all swap devicesswap -lShow swap usageswap -s (Includes physical memory)Show swap size (per device)swap -l|grep -v swaplo|awk ‘f print $1, $4/2048 « m »g’Show swap used (per device)swap -l|grep -v swaplo|awk ‘f print $1, ($4-$5)/2048 « m »g’ Show information about a binary (bash in this example)showrev -c /usr/bin/bashList time of most recent rebootslast reboot Mirror root lesystems (c0t0d0 to c0t1d0)/, swap, /usr, and /var are on s0, s1, s3, and s4 respectively. s5and s6 will be used for 10 meg metadb’s on each disk. The steps are shown here with multiple reboots. This is to show the dierence between each type of operation. Multiple reboots are not required. . Duplicate c0t0d0’s layout onto c0t1d0prtvtoc /dev/rdsk/c0t0d0s2 | n

metadb -a -f c0t1d0s5metadb -a c0t1d0s6metadb -a c0t0d0s5metadb -a c0t0d0s6Note: Multiple dbs can be put in a single slice using -c option. . Encapsulate / on stripe 0metainit -f d10 1 1 c0t0d0s0metainit d0 -m d10metaroot d0lockfs -fashutdown -i6 -g0 -ymetainit d20 1 1 c0t1d0s0metattach d0 d20. Encapsulate /usr on stripe 3 (repeat this step for /var) metainit -f d13 1 1 c0t0d0s3metainit d23 1 1 c0t1d0s3metainit d3 -m d13vi /etc/vfstab (Put metadevices in place of slices)shutdown -i6 -g0 -ymetattach d3 d23. Encapsulate swapmetainit -f d11 1 1 c0t0d0s1metainit d21 1 1 c0t1d0s1metainit d1 -m d11vi /etc/vfstab (Put metadevices in place of swap entry) shutdown -i6 -g0 -ymetattach d1 d21dumpadm -d /dev/md/dsk/d1. Optional: Allow quorum at only 50%vi /etc/system (Add line: set md:mirrored root flag=1). Setup \mirror » alias and boot-device setting in rmwareok nvedit

ok nvstoreok setenv use-nvramrc? trueok setenv boot-device disk mirror(This can also be done from the OS using the eeprom command.) Steps for encapsulating root is in tasks sectionList (verbose) the status of all metadevices in the systemmetastatList (tree-formatted / grep-able) the metadevices in the system metastat -cList each metadb, its status and device (with status descriptions) metadb -iCreate a soft partition (d30) on the metadevice d7metainit d30 -p d7 10GPut a lesystem on the above deviceecho y | newfs /dev/md/rdsk/d30Grow soft partition d30 by another 10 Gigmetattach d30 10gGrow the lesystem on the above device (currently mounted on /u01) growfs -M /u01 /dev/md/rdsk/d30Find the size of a metadevice called d10metastat -c d10Remove all soft partitions on meta device d7metaclear -p d7Remove the metadevice d7metaclear d7View the parameters (options) for metadevice d0metaparam d0Set disk d0 to read roundrobin, write parallel, and pass 1metaparam -r roundrobin -w parallel -p 1 d0share /srcPermanently export by putting share command in /etc/dfs/dfstab List all exported lesystems (on local system)dfshares /or/ showmount -eShare all lesystems listed in /etc/dfs/dfstabshareallStop sharing all lesystems (not just those in /etc/dfs/dfstab) unshareallList clients connected to NFS shares on this server

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *