内に含ま
その他のドキュメント
サポート リソース
| PDF 文書ファイルをダウンロードする
Installation and Setup
2
- This chapter provides the information necessary to perform the basic Solstice DiskSuite 4.0 installation.
- It is assumed that you have a CD-ROM drive already installed on a machine. For a full description of the Solaris 2.4 system software installation, refer to Installing Solaris Software.
- The basic steps to install software from CD-ROM include:
-
- Making sure you have enough space for the packages
- Adding the software packages
- Setting the system path variables
- Use the following table to locate specific information in this chapter.
-
-
Converting to Solstice DiskSuite 4.0
- The format of the metadevice state database replicas in Solstice DiskSuite 4.0 is incompatible with that of Online: DiskSuite 3.0 (or earlier DiskSuite versions). Because of this, Solstice DiskSuite 4.0 will not recognize or read database replicas created by Online: DiskSuite 3.0. This means that you must completely de-install any previous version of Online: DiskSuite before installing Solstice DiskSuite 4.0. The procedures provided in the following sections will guide you in this process.
- If no version of DiskSuite has not been previously installed on this system, skip ahead to "Preparing for Installation" on page 11.
Before You Begin the Installation
- Complete the following procedure before you start the installation procedures for Solstice DiskSuite 4.0.
-
-
Back up all filesystems that currently reside on metadevices.
Note that this is only to ensure that no data is lost during the installation process. You will most likely not have to restore your filesystems from these backups.
-
Save the existing state information.
You'll need to create a new /etc/opt/SUNWmd/md.tab file from the state information displayed by the metastat command. Use the metastat command with the -p option to create an md.tab file. You must examine the metastat output to discover which, if any, devices are currently in "Needs Maintenance" state. This initial md.tab file will need to be edited, depending on the state of your metadevices.
-
Edit the md.tab file.
You'll need to make the following changes to the initial md.tab file:
-
- Use the metastat command with no arguments to determine which (if any) metadevices are in the "Needs Maintenance" state.
-
- Remove any submirrors that are in the "Needs Maintenance" state. These should be fixed and then attached (using metattach) after Solstice DiskSuite 4.0 is installed, and after the initial mirror is created.
-
Note - If both submirrors in a mirror are in the "Needs Maintenance" state, you will not be able to use this mirror with Solstice DiskSuite 4.0 until at least one of the submirrors is repaired.
-
- Delete all but the first submirror in the "OK" state from any remaining mirror lines. All mirror lines in the md.tab file should be in the form:
-
name -m submirror [ pass_number ]
|
- Note that all mirrors are one-way mirrors. These will be created, and other submirrors attached, after the installation is complete.
-
-
Record the location of all existing metadevice state database replicas in the md.tab file
The individual lines should be of the form:
-
mddb<nnn> slice1 [ slice2 slice3 ... ]
|
- You can determine the location of all existing state database replicas by using the command metadb -i. Be careful to note the possible existence of multiple database replicas per device. Please refer to the md.tab(4) man page for the correct syntax of the mddb lines.
-
-
Save the resulting md.tab file under a different name so it is not overwritten when you install DiskSuite 4.0.
You may want to copy the md.tab file to a floppy or another machine to be absolutely certain that no data is lost.
-
Detach the log from all metatrans devices
You can use the metadetach command to detach the log. This flushes all data from the log onto the master device. Clearing the metatrans device with metaclear will accomplish this also, but the metatrans device will have to be unmounted before it can be cleared.
-
-
Unmount all of the file systems that are currently mounted on metadevices, and comment entries for metadevices out of /etc/vfstab. If /, swap, or /usr are mirrored, you will need to un-mirror those devices and reboot onto physical devices before proceeding. For more information on performing these procedures, see Chapter 5, "Mirroring." Similarly, if /usr is logged (is a metatrans device), you will need to "unlog" it by detaching the log and rebooting onto a physical device before proceeding.
-
Delete all metadevice state database replicas using the metadb command with the -df options.
-
Remove the product by typing:
-
- Note that you must be superuser to run this command.
-
-
Reboot the machine.
You have now completed the process for removing the previous version of Online: DiskSuite.
-
-
Install Solstice DiskSuite 4.0 according to the instructions under the sections for local or remote installation.
After the installation is complete, reboot the machine and proceed with the post-installation instructions given below.
After the Installation
- When you are finished installing Solstice DiskSuite 4.0, complete the following procedure to reinstate your former DiskSuite configuration.
-
-
Copy the md.tab file you saved in the previous section to /etc/opt/SUNWmd/md.tab.
You may wish to run metainit -n to check the syntax of your md.tab file.
-
-
Re-create all of your state database replicas using the metadb command with the -a option for each of the mddb<nnn> entries in your md.tab file as follows.
Note that, for the first replica, you will also need to add the -f option:
-
- Note that if you want multiple database replicas per device, you must use the -c option to metadb.
-
-
Re-create the metadevices using metainit -a.
-
Un-comment the entries in /etc/vfstab for metadevices that you commented out in step 6 above. Use the mount -a command to remount these file systems.
-
Reboot.
You should now be running the same metadevice configuration as you were before beginning the installation, except that you will have only one-way mirrors.
-
Use metattach to attach the submirrors to all mirrors that previously had two (or more) submirrors.
If you have lots of these, it may be more convenient to prepare a shell script to perform the metattach operations.
Preparing for Installation
- The following sections describe how to get ready for a local or remote DiskSuite installation.
Local Installation
- To prepare for a local installation:
-
-
Insert the CD containing the software into a caddy. Then put the caddy into the CD-ROM drive.
-
-
Change directories to /cdrom/cdrom0 as follows:
-
- You are now ready to install the software on your local machine. Skip to the section "Adding Packages" on page 13 and follow the instructions provided.
Remote Installation
- To prepare for a remote installation:
-
-
On the remote machine, insert the CD containing the software into a caddy. Then put the caddy into the CD-ROM drive.
-
Put a line similar to the following into the file /etc/dfs/dfstab:
-
share -F nfs -o ro -d "CD-ROM Directory" /cdrom/cdrom0
|
- This line may be different, depending on how your system is networked.
-
-
Export the /cdrom/cdrom0 directory with the shareall command:
-
-
-
On the local machine, log in as root and create the directory
/cdrom/cdrom0 (if it doesn't already exist):
-
local% su
Password: root-password
local# mkdir -p /cdrom/cdrom0
|
- You may choose another directory besides /cdrom/cdrom0.
-
-
Mount the CD-ROM as follows:
-
local# mount remote_machinename:/cdrom/cdrom0 /cdrom/cdrom0
|
- You're now ready to install the software onto your local machine. Skip to the section "Adding Packages" on page 13 and follow the instructions provided.
Adding Packages
-
-
Become root (if you haven't already).
-
local% su
Password: root-password
|
-
-
Change to the directory on which the CD-ROM is mounted.
(The section, "Mounting the CD-ROM," called this directory /cdrom/cdrom0. You may have chosen a different name.)
-
-
-
Run pkgadd to install packages.
-
-
Note - If the pkgadd command is not in your current path, you must specify the full path to the command (/usr/sbin/pkgadd).
-
-
Choose the package you want to install.
pkgadd displays the available packages and prompts you to enter the number associated with a package. Select 1 to install the AnswerBook(R) online documentation only (see "Viewing AnswerBook Online Documentation" on page 22 for details on how to proceed), select 2 to install the DiskSuite package only, or select 'all' (as illustrated in the following example) to install both packages. The program loops until you press q to quit.
-
Note - Do not be concerned if the screens displayed when you install this product do not appear exactly as shown in the following example.
-
-
# pkgadd -d .
The following packages are available:
1 SUNWabmd Solstice DiskSuite 4.0 Administration Guide AnswerBook
(all) 24.2.7
2 SUNWmd Solstice DiskSuite
(all) 4.0,REV=1.0
3 SUNWmdg Solstice DiskSuite Tool
(all) 4.0,REV=1.0
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SUNWabmd> from </cdrom>
Solstice DiskSuite 4.0 Administration Guide AnswerBook
(all) 24.2.7
Copyright 1994 Sun Microsystems, Inc. All Rights Reserved
Printed in the United States of America
2550 Garcia Avenue, Mountain View, California, 94043-1100 U.S.A.
... (miscellaneous copyright information)...
Using </opt> as the package base directory.
The installation options are as follows:
Option: Description:
--------------------------------------------
1. nil: less than 1 Megabyte disk space required [slowest
performance].
2. heavy: 1.88 Megabytes disk space required [best performance].
Note: If the install option which you choose fails
due to lack of space, try another location, or
choose a lower install option number.
Enter the number of an installation option from the list above (1 or
2):
Select an installation option: 2
Installation option: heavy selected.
-
(continued on following page)
-
Specify the parent of the AnswerBook home directory:
For the heavy option all files will be placed under /opt/SUNWabmd.
## Processing package information.
## Processing system information.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of this package [y,n,?] y
Installing Solstice DiskSuite 4.0 Administration Guide AnswerBook as
<SUNWabmd>
## Installing part 1 of 1.
/opt/SUNWabmd/spot-help/README
[ verifying class <HelpFiles> ]
/opt/SUNWabmd/_data/DISKSUITEADMIN/01.Introduction
/opt/SUNWabmd/_data/DISKSUITEADMIN/02.Getting_Started
/opt/SUNWabmd/_data/DISKSUITEADMIN/03.Overview_of_Sun_OnlineDiskSuite
/opt/SUNWabmd/_data/DISKSUITEADMIN/04.Concatenating_and_Striping
/opt/SUNWabmd/_data/DISKSUITEADMIN/05.Mirroring
/opt/SUNWabmd/_data/DISKSUITEADMIN/06.UFS_Logging
/opt/SUNWabmd/_data/DISKSUITEADMIN/07.Hot_Spares
/opt/SUNWabmd/_data/DISKSUITEADMIN/08.Disksets
/opt/SUNWabmd/_data/DISKSUITEADMIN/09.RAID_Devices
/opt/SUNWabmd/_data/DISKSUITEADMIN/10.State_Database_Replicas
/opt/SUNWabmd/_data/DISKSUITEADMIN/11.Expanding_a_File_System
/opt/SUNWabmd/_data/DISKSUITEADMIN/12.Configuration_Guidelines
/opt/SUNWabmd/_data/DISKSUITEADMIN/A.Sun_Online_DiskSuite_Files
/opt/SUNWabmd/_data/DISKSUITEADMIN/B.Sun_Online_DiskSuite_...
/opt/SUNWabmd/_data/DISKSUITEADMIN/C.Recovery_From_Failed_Boots
/opt/SUNWabmd/_data/DISKSUITEADMIN/Contents
/opt/SUNWabmd/_data/DISKSUITEADMIN/Cover
/opt/SUNWabmd/_data/DISKSUITEADMIN/Credits
/opt/SUNWabmd/_data/DISKSUITEADMIN/D.Upgrading_to_Other_...
/opt/SUNWabmd/_data/DISKSUITEADMIN/E.Using_Solstice_DiskSuite...
/opt/SUNWabmd/_data/DISKSUITEADMIN/F.Man_Pages
(continued on following page)
|
-
/opt/SUNWabmd/_data/DISKSUITEADMIN/Preface
/opt/SUNWabmd/_data/DISKSUITEADMIN/files_to_print
/opt/SUNWabmd/_data/SUNWab_24_1.xtoc
/opt/SUNWabmd/_data/SUNWab_24_1/ManPagesEntryPoint
/opt/SUNWabmd/_data/SUNWab_24_1/SUNWab_24_1.titlepage
/opt/SUNWabmd/_data/SUNWab_24_1/SystemLink.SUNWab_24_1
/opt/SUNWabmd/_data/SUNWab_24_1/abmerge
/opt/SUNWabmd/_data/SUNWab_24_1/abunmerge
/opt/SUNWabmd/_data/SUNWab_24_1/dbgen
/opt/SUNWabmd/_data/SUNWab_24_1/domerge
/opt/SUNWabmd/_data/SUNWab_24_1/initial.page
/opt/SUNWabmd/_data/SUNWab_24_1/make_ab_script
/opt/SUNWabmd/_data/SUNWab_24_1/xtocmerge
/opt/SUNWabmd/_data/list_of_books
/opt/SUNWabmd/_data/sr_index/Keys
/opt/SUNWabmd/_data/sr_index/SUNW24_1.cat
/opt/SUNWabmd/_data/sr_index/SUNW24_1.cfg
/opt/SUNWabmd/_data/sr_index/SUNW24_1.cix
/opt/SUNWabmd/_data/sr_index/SUNW24_1.dct
/opt/SUNWabmd/_data/sr_index/SUNW24_1.log
/opt/SUNWabmd/_data/sr_index/SUNW24_1.ref
/opt/SUNWabmd/_data/sr_index/ascii.xtoc
[ verifying class <PostScript> ]
## Executing postinstall script.
----- Installing 2 Book Contents databases -----
The destination for the Book Contents databases is
/opt/SUNWabmd/_data
After installation, use /opt/SUNWabmd/answerbook to start the AB.
Installation of <SUNWabmd> was successful.
Processing package instance <SUNWmd> from </cdrom>
Solstice Disksuite
(sparc i386) OLDS_4.0
Solstice DiskSuite 4.0 SUNBIN
CD-ROM (HSFS Format)
Part Number 258-3523-10
Copyright 1994 Sun Microsystems, Inc.
2550 Garcia Avenue, Mountain View, California, 94043-1100 U.S.A.
(continued on following page)
|
-
All rights reserved... (miscellaneous copyright information)...
Using </> as the package base directory.
## Processing package information.
## Processing system information.
4 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-
user permission during the process of installing this package.
Do you want to continue with the installation of this package
[y,n,?] y
Installing Solstice DiskSuite as <SUNWmd>
##Executing preinstall script.
## Installing part 1 of 1.
/etc/init.d/SUNWmd.init
/etc/init.d/SUNWmd.sync
/etc/rc2.d/S95SUNWmd.sync <symbolic link>
/etc/rcS.d/S35SUNWmd.init <symbolic link>
/kernel/drv/md
/kernel/drv/md.conf
/kernel/misc/md_hotspares
/kernel/misc/md_mirror
/kernel/misc/md_stripe
/usr/lib/drv/preen_md.so.1
/usr/opt/SUNWmd/etc <symbolic link>
/usr/opt/SUNWmd/locale/C/LC_MESSAGES/SUNWmd.po
/usr/opt/SUNWmd/man/man1m/growfs.1m
/usr/opt/SUNWmd/man/man1m/metaclear.1m
/usr/opt/SUNWmd/man/man1m/metadb.1m
/usr/opt/SUNWmd/man/man1m/metadetach.1m
/usr/opt/SUNWmd/man/man1m/metahs.1m
/usr/opt/SUNWmd/man/man1m/metainit.1m
/usr/opt/SUNWmd/man/man1m/metaoffline.1m
/usr/opt/SUNWmd/man/man1m/metaonline.1m
/usr/opt/SUNWmd/man/man1m/metaparam.1m
(continued on following page)
|
-
/usr/opt/SUNWmd/man/man1m/metareplace.1m
/usr/opt/SUNWmd/man/man1m/metaroot.1m
/usr/opt/SUNWmd/man/man1m/metastat.1m
/usr/opt/SUNWmd/man/man1m/metasync.1m
/usr/opt/SUNWmd/man/man1m/metattach.1m
/usr/opt/SUNWmd/man/man4/md.cf.4
/usr/opt/SUNWmd/man/man4/md.tab.4
/usr/opt/SUNWmd/man/man4/mddb.cf.4
/usr/opt/SUNWmd/man/man7/md.7
/usr/opt/SUNWmd/sbin/growfs
[verifying class <none>]
cp /cdrom/SUNWmd/reloc/etc/opt/SUNWmd/md.cf
/etc/opt/SUNWmd/md.cf
cp /cdrom/SUNWmd/reloc/etc/opt/SUNWmd/md.tab
/etc/opt/SUNWmd/md.tab
cp /cdrom/SUNWmd/reloc/etc/opt/SUNWmd/mddb.cf
/etc/opt/SUNWmd/mddb.cf
cp /cdrom/SUNWmd/reloc/kernel/drv/md.conf /kernel/drv/md.conf
[ verifying class <preserve> ]
/kernel/drv/md
/kernel/misc/md_hotspares
/kernel/misc/md_mirror
/kernel/misc/md_stripe
/kernel/misc/md_trans
/usr/lib/drv/preen_md.so.1
/usr/opt/SUNWmd/sbin/metaclear
/usr/opt/SUNWmd/sbin/metadb
/usr/opt/SUNWmd/sbin/metadetach
/usr/opt/SUNWmd/sbin/metahs
/usr/opt/SUNWmd/sbin/metainit
/usr/opt/SUNWmd/sbin/metaoffline
/usr/opt/SUNWmd/sbin/metaonline
/usr/opt/SUNWmd/sbin/metaparam
/usr/opt/SUNWmd/sbin/metareplace
/usr/opt/SUNWmd/sbin/metaroot
/usr/opt/SUNWmd/sbin/metastat
/usr/opt/SUNWmd/sbin/metasync
/usr/opt/SUNWmd/sbin/metattach
[verifying class <sparc>]
(continued on following page)
|
-
-
## Executing postinstall script.
(various other manpage, command, help, and gui files installed here)
.
.
.
Installation of <SUNWmd> was successful.
.
.
.
Installation of <SUNWmdg> was successful.
The following packages are available:
1 SUNWabmd Solstice DiskSuite 4.0 Administration Guide AnswerBook
(all) 24.2.7
2 SUNWmd Solstice DiskSuite
(all) 4.0,REV=1.0
3 SUNWmdg Solstice DiskSuite Tool
(all) 4.0,REV=1.0
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: q
*** IMPORTANT NOTICE ***
This machine must now be rebooted in order to ensure
sane operation. Execute shutdown -y -i6 -g0
and wait for the "Console Login:" prompt.
-
-
Respond with a y to any prompts about changing modes on directories. pkgadd installs the DiskSuite files in the /usr/opt/SUNWmd directory, as well as in other system directories. pkgadd does not overwrite any software included with the standard Solaris 2.4 release.
-
Reboot the system as directed to build the metadevices.
Viewing Installed Packages
- You can confirm that the DiskSuite software and AnswerBook have been installed by using the pkginfo command:
-
demo$ pkginfo
application SUNWabmd AnswerBook
SPARCompile SUNWC++ SPARCompilers 2.0 C++ 3.0
system SUNWaccr System Accounting, (Root)
system SUNWaccu System Accounting, (Usr)
SPARCompile SUNWacomp SPARCompilers 2.0 Sun C 2.0
system SUNWarc Archive Libraries
system SUNWast Automated Security Enhancement Tools
system SUNWaudio Audio applications
system SUNWbcp Binary Compatibility
system SUNWbnur Networking UUCP Utilities, (Root)
system SUNWbnuu Networking UUCP Utilities, (Usr)
system SUNWmd Solstice DiskSuite
. . .
|
- The -l option gives detailed information about packages:
-
demo$ pkginfo -l SUNWmd
PKGINST: SUNWmd
NAME: Solstice DiskSuite
CATEGORY: system
ARCH: sparc_and_i386
VERSION: SDS_4.0
BASEDIR: /
VENDOR: SunSoft, a Sun Microsystems, Inc. Business
DESC: SunSoft's Solstice DiskSuite
PSTAMP: ########
INSTDATE: Jan 10 1995 11:26
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 70 installed pathnames
10 shared pathnames
22 directories
21 executables
11 package information files
1929 blocks used (approx)
. . .
|
Removing Packages
- If you decide to remove either the DiskSuite or AnswerBook packages, simply remove the installed files using the pkgrm command. For example, to remove the AnswerBook package (as superuser), type:
-
-
Note - Do not remove DiskSuite or AnswerBook files using the rm command. Using pkgrm is the only valid way to remove these files.
Path Requirements
- After installing the software, you must set the environment variables PATH and MANPATH.
- The general requirements are as follows:
-
- Insert /usr/opt/SUNWmd/sbin either before or after PATH.
If you do not set this path, you may get other versions of the software.
- Insert /usr/opt/SUNWmd/man either before or after your MANPATH.
If you do not set this path, you could get man pages for the wrong release, or no man pages at all.
- You can set these paths by using an editor to change your $HOME/.profile or ~/.cshrc file, as follows.
- If you installed into the default directory, then:
-
- If you're using the Bourne shell, your $HOME/.profile file should have lines like this:
-
PATH=/usr/opt/SUNWmd/sbin:$PATH
MANPATH=/usr/opt/SUNWmd/man:$MANPATH
export PATH MANPATH
|
-
- If you're using the C shell (csh), the ~/.cshrc file should have lines that look something like this:
-
set path = (/usr/opt/SUNWmd/sbin $path)
setenv MANPATH /usr/opt/SUNWmd/man:$MANPATH
|
Viewing AnswerBook Online Documentation
- To view the AnswerBook online documentation:
-
-
Type /usr/openwin/bin/answerbook and press Return.
-
The AnswerBook Navigator is displayed.
Follow the online instructions to use the AnswerBook online documentation.
Creating Replicas of the Metadevice State Database
- Before you can use the DiskSuite software, you must create the metadevice state database. The metadevice state database replicas can exist on dedicated disk partitions or within a concatenated, striped, or logging metadevice.
- It is strongly recommended you make a replica on each available unused partition. There must be at least three replicas or the DiskSuite software can not be used. Read the following section for instructions on creating space for metadevice state database replicas.
Creating Space for Metadevice State Database Replicas
- Before using any DiskSuite functionality, you must create at least three replicas (copies) of the metadevice state database. The three replicas ensure the loss of any one replica will not cause a failure of DiskSuite.
- A replica is a dedicated portion of a disk, similar to a disk label. The space occupied by the replica is reserved for the exclusive use of the metadevice state database; it should not be used for any other purpose.
- State database replicas are critical to the operation of all metadevices because they provide nonvolatile storage for DiskSuite. The replicas keep track of all configuration and status information about mirrors, submirrors, concatenations, stripes, hot spares, logging devices, and master devices. The replicas also keep track of error conditions.
- The replicated state database information keeps DiskSuite operating. Without replicas of the same information for comparison, DiskSuite does not know the current running state of metadevices. Chapter 8, "Disksets," and the metadb (1M) manual page discuss how the replicas are used by the metadisk driver.
- Each replica may exist on either a dedicated disk partition or within space specifically reserved for a replica within a striped or concatenated metadevice; or within a logging or a RAID device. Multiple replicas can be stored in a single disk partition. However, placing all replicas on a single disk reduces reliability. Each replica occupies 517 kilobytes (Kbytes) or 1034 disk blocks of the partition by default.
-
Note - Before you create replicas, make sure you have a current backup of all data.
- There are three procedures you can use for creating replicas. These procedures are:
-
- Creating replicas on metadevice components. Use this procedure if you have at least three unused components on which you can create replicas.
- Creating a new disk partition. Use this procedure if you have no unused disk partitions and are forced to repartition the disk to create the space for replicas.
- Creating replicas on unused disk partitions. Use this procedure if you have only one unused disk partition on which you can create replicas.
- The first and third procedures on this list are actually the preferred methods for creating replicas. The second procedure is described in the event neither of the other two can be used at your site. The following sections detail the three procedures.
Creating Replicas on Metadevice Components
- This section describes how to create three replicas on unused components that will be used within a metadevice. Unused components are disk partitions that have no active data on them (for example, no file systems, swap, or databases reside on the partition).
- For a detailed discussion of what metadevices are and how you would use them at your site, refer to Chapter 3, "Overview of Solstice DiskSuite.''
-
Note - If you plan to use the components within a new metadevice, consider placing replicas on at least three of the physical components of the new metadevice. This will prevent the failure of a single disk from causing DiskSuite to fail.
- The following procedure describes how to create three replicas on three components that will be part of a metadevice.
-
* Determine which components will be part of a metadevice and use the
-
metadb command to create replicas on the components. For instance, if you have three components, /dev/dsk/c0t1d0s3, /dev/dsk/c1t1d0s3, and /dev/dsk/c2t1d0s3, that you plan to concatenate or use as logging devices, you would enter the following as root:
-
# /usr/opt/SUNWmd/sbin/metadb -a -f /dev/dsk/c0t1d0s3 \
/dev/dsk/c1t1d0s3 /dev/dsk/c2t1d0s3
|
- The metadb command creates one replica on each of the components, /dev/dsk/c0t1d0s3, /dev/dsk/c1t1d0s3, and /dev/dsk/c2t1d0s3.
- When you run metadb for the first time, the following message is displayed:
-
metadb: There are no existing databases
|
- You have just created the first state database replicas so you can ignore this message.
- In this case, running metadb creates empty replicas. The replicas will not contain any configuration information until other DiskSuite utilities are used to manipulate metadevices.
Allocating Space From the swap Partition for Replicas
- If there are no unused disk partitions, you can create a new partition by taking space from the end of the swap partition and assigning it to an unused partition name.
- The procedure for allocating space from the swap partition is as follows:
-
-
As root, halt the system using the halt command.
-
# halt
Oct 29 14:23:56 demo halt: halted by root
Oct 29 14:23:58 1992
demo syslogd: going down on signal 15
Halted
Program terminated
Type help for more information
|
-
-
Boot the system to single-user mode as follows:
-
<#3> ok boot -s
Resetting ...
SPARCsystem 600MP (4 X 390Z55), No Keyboard
ROM Rev. 2.8, 128 MB memory installed, Serial #4200929.
Ethernet address 8:0:20:10:cb:ee, Host ID: 714019e1.
Initializing Memory ...
Boot device: /iommu/sbus/dma@f,81000/esp@f,80000/sd@3,0 File
and args: -s
SunOS Release 5.1 Version beta_1.2 [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1992, Sun Microsystems, Inc.
Hostname: demo
INIT: SINGLE USER MODE
Type Ctrl-d to proceed with normal startup,
(or give root password for system maintenance): <root-password>
Entering System Maintenance Mode
SunOS Release 5.1 Version beta_1.2 [UNIX(R) System V Release 4.0]
#
|
-
-
Turn off swapping to the partition from which you intend to use blocks.
For example:
-
# swap -l
swapfile dev swaplo blocks free
swapfs - 0 751552 750136
/dev/dsk/c0t3d0s1 32,25 8 524952 524952
# swap -d /dev/dsk/c0t3d0s1
# swap -l
swapfile dev swaplo blocks free
swapfs - 0 226600 225176
#
|
-
-
Changing the disk partitions involves editing the disk label. Use the
format command to repartition the disk. For example:
-
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t2d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@f,80000/sd@2,0
1. c0t3d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@f,80000/sd@3,0
2. c1t1d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@0,200000/sd@1,0
3. c1t3d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@0,200000/sd@3,0
4. c2t1d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@1,200000/sd@1,0
5. c2t3d0 <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
/iommu@f,e0000000/sbus@f,e0001000/esp@1,200000/sd@3,0
Specify disk (enter its number): 1
selecting c0t3d0
[disk formatted]
Warning: Current Disk has mounted partitions.
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
quit
|
-
-
Next, use the partition command to delete the cylinders from the swap partition that you intend to use for your database.
For example, to delete six cylinders from swap partition 1 to use for a database on slice 3, you would do the following:
-
format> partition
PARTITION MENU:
0 - change '0' partition
1 - change '1' partition
2 - change '2' partition
3 - change '3' partition
4 - change '4' partition
5 - change '5' partition
6 - change '6' partition
7 - change '7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
quit
partition> print
Current partition table (original sd3):
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 150 100.27MB (151/0/0)
1 swap wu 151 - 536 256.33MB (386/0/0)
2 unassigned wm 0 0 (0/0/0)
3 unassigned wm 0 0 (0/0/0)
4 unassigned wm 0 0 (0/0/0)
5 - wm 537 - 838 200.55MB (302/0/0)
6 usr wm 839 - 1290 300.16MB (452/0/0)
7 - wm 1291 - 1964 447.58MB (674/0/0)
partition> 1
Part Tag Flag Cylinders Size Blocks
1 swap wu 151 - 536 256.33MB (386/0/0)
Enter partition id tag[swap]: <RETURN>
Enter partition permission flags[wu]: <RETURN>
Enter new starting cyl[151]: <RETURN>
Enter partition size[524960b, 386c, 256.33mb]: 380c
|
-
-
Add the cylinders to the new partition.
Continuing the example from the previous step, you would add the six cylinders to the new partition 3 as follows:
-
partition> 3
Part Tag Flag Cylinders Size Blocks
3 unassigned wm 0 0 (0/0/0)
Enter partition id tag[unassigned]: <RETURN>
Enter partition permission flags[wm]: <RETURN>
Enter new starting cyl[0]: 531
Enter partition size[0b, 0c, 0.00mb]: 6c
|
-
-
Verify the addition of the cylinders using the print command as follows:
-
partition> print
Current partition table (unnamed):
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 150 100.27MB (151/0/0)
1 swap wu 151 - 530 252.34MB (380/0/0)
2 unassigned wm 0 0 (0/0/0)
3 unassigned wm 531 - 536 3.98MB (6/0/0)
4 unassigned wm 0 0 (0/0/0)
5 - wm 537 - 838 200.55MB (302/0/0)
6 usr wm 839 - 1290 300.16MB (452/0/0)
7 - wm 1291 - 1964 447.58MB (674/0/0)
|
-
-
Write the new label to the disk.
-
partition> label
Ready to label disk, continue? y
|
-
-
Exit from the partition menu and then the format program by typing the quit command twice.
For example:
-
partition> quit
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
quit
format> quit
|
-
-
Reboot the machine.
-
# reboot
rebooting...
Resetting...
|
-
Warning - Re-allocating space for a new partition can be done only on the swap partition. Attempting this process on a file system will cause the loss of data.
-
-
Log back in to the system and check that the new partition exists.
-
demo console login: root
Password: <root-password>
Last login: Fri Oct 23 14:23:50 on console
SunOS Release 5.1 Version beta_1.2 [UNIX(R) System V Release 4.0]
you have mail
demo# prtvtoc /dev/rdsk/c0t3d0s0
* /dev/rdsk/c0t3d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 80 sectors/track
* 17 tracks/cylinder
* 1360 sectors/cylinder
* 3500 cylinders
* 1965 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount
Directory
0 2 00 0 205360 205359 /
1 3 01 205360 516800 722159
3 0 00 722160 8160 730319
5 6 00 730320 410720 1141039 /opt
6 4 00 1141040 614720 1755759 /usr
7 6 00 1755760 916640 2672399 /export
|
-
-
Create the desired number of replicas on the new partition.
For example, to create three replicas on the new slice 3:
-
demo# /usr/opt/SUNWmd/sbin/metadb -c 3 -a -f /dev/dsk/c0t3d0s3
|
- In this example, the -c 3 is used to specify that three replicas of the database are being put on the same partition.
- When you use metadb for the first time, the following message is displayed:
-
metadb: There are no existing databases
|
- You have just created the first state database replicas so you can ignore this message.
- Running metadb creates empty replicas. The replicas will not contain any configuration information until other DiskSuite utilities are used to manipulate metadevices.
-
Warning - It is strongly recommended that you do not place all replicas of the state database on the same partition. If the partition is corrupted or the device fails, all replicas will be lost and DiskSuite will lose access to all metadevices.
Creating Replicas on Unused Disk Partitions
- Most disk partitions are likely to be much larger than what is required for a replica. To prevent the waste of large amounts of disk space, you could take space from one partition and allocate it to an unused disk partition name or a new disk partition.
- However, if you plan to use this disk partition in a metadevice, you don't need to reallocate space to a new disk partition. You need only create replicas on the disk partitions, as shown in Step 4 in the following procedure.
- For a detailed discussion of what metadevices are and how you would use them at your site, refer to the "Metadevices" section in Chapter 3.
- An example of the procedure you would use for allocating disk space and creating a small disk partition (2 Mbytes) follows:
-
-
Run cat on /etc/vfstab to view the currently mounted file systems. For example:
-
# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
/dev/dsk/c0t3d0s0 /dev/rdsk/c0t3d0s0 / ufs 1 no -
/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 2 no -
/dev/dsk/c0t3d0s5 /dev/rdsk/c0t3d0s5 /opt ufs 4 yes -
/dev/dsk/c0t3d0s1 - - swap - no -
#
/proc - /proc proc - no -
fd - /dev/fd fd - no -
swap - /tmp - yes -
|
-
-
Use the prtvtoc command to find the names of available partitions on the device. For example:
-
# prtvtoc /dev/rdsk/c0t3d0s0
/dev/rdsk/c0t3d0s0 partition map
Dimensions:
512 bytes/sector
80 sectors/track
17 tracks/cylinder
1360 sectors/cylinder
3500 cylinders
1965 accessible cylinders
Flags:
1: unmountable
10: read-only
First Sector Last
Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 205360 205359 /
1 3 01 205360 524960 730319
5 6 00 730320 410720 1141039 /opt
6 4 00 1141040 614720 1755759 /usr
7 6 00 1755760 916640 2672399
|
- From the above output you can see that /dev/dsk/c0t3d0s7 has space available, and you also know from the contents of /etc/vfstab (in Step 1) that /dev/dsk/c0t3d0s7 is not in use as a file system or swap space. Partition c0t3d0s7 could be used for replicas of the metadevice state database. However, partition c0t3d0s7 is approximately 458 Mbytes (916,640 sectors at 512 bytes per sector). If you place three replicas on c0t3d0s7, you are wasting more than 450 Mbytes. This space could be reclaimed by placing a metadevice on this partition.
- Because the partition names c0t3d0s3 and c0t3d0s4 are not being used (they do not correspond to any sector range on the disk) any one of these could be used for the database. If you take 2 Mbytes of space from /dev/dsk/c0t3d0s7 and create a new partition, c0t3d0s3, containing this space, you can place the replicas there.
- On this disk, each cylinder occupies 680 Kbytes, thus you can allocate one cylinder per replica.
-
-
Next, use the format command to repartition the disk as shown in Step 4 of the previous section.
Make sure the disk space assigned to the partition you are creating for the metadevice state database is not shared with another partition. For example, a common partitioning scheme has the 3, 4, and 5 partitions overlapping the 6 partition. If you plan to put the state database on the 3 partition, make sure that the 6 partition is never used.
-
Now that the space has been taken from /dev/dsk/c0t3d0s7 and allocated to /dev/dsk/c0t3d0s3, create three replicas on the partition. To create the replicas, use the metadb command as follows:
-
# /usr/opt/SUNWmd/sbin/metadb -c 3 -a -f /dev/dsk/c0t3d0s3
|
- In the above example, the -c 3 specifies that three replicas of the database are being put on the same partition.
- When metadb is run for the first time, the following message is displayed.
-
metadb: There are no existing databases
|
- You have just created the first state database replicas so you can ignore this message.
- Running metadb creates empty replicas. The replicas will not contain any configuration information until other DiskSuite utilities are used to manipulate metadevices.
-
Warning - It is strongly recommended that you do not place all replicas of the state database on the same partition. If the partition is corrupted or the device fails, all replicas will be lost and DiskSuite will lose access to all metadevices.
What to Do Next
- Now that the DiskSuite software is set up on your system, you can begin to use the new functionality provided. DiskSuite provides considerable new functionality. Read Chapter 3, "Overview of Solstice DiskSuite," to familiarize yourself with the product.
|
|