9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I don't know if I am asking this correctly, but I have a hard drive with some bad sectors and it appears that some of the data is corrupt. I am having allot of trouble copying the data to a new drive. The issue is not in copying files, but that the new drive to which files are copied is not acting... (17 Replies)
Discussion started by: LMHmedchem
17 Replies
2. HP-UX
Hallo Friends,
I have application X running on hpux 11.11 and oracle 9i release 2. I recently had a hardware failure on disk /dev/dsk/c2t0d0
Below is the systemlog file :
root@a7dmc:/var/adm/syslog > /opt/resmon/bin/resdata -R 155713541 -r /storage/events/enclosures/gazemon/0_1_1_0.0.0... (11 Replies)
Discussion started by: kekanap
11 Replies
3. Solaris
Not too familiar with VxVM. We have a Device c1t0d0, disk rootdg01, group rootdg that was paired with Device c1t1d0, disk mirror_1, group rootdg.
c1t0d0 has failed.
When we get a replacement for c1t0d0 can we just run vxdiskadm and choose choice #5 to "replace a failed or removed disk" ?
... (9 Replies)
Discussion started by: pzxkys
9 Replies
4. Solaris
I need to corrupt a superblock of a mounted device in a soalris m/c and check recovery from an alternate superblock. How can this be done? (2 Replies)
Discussion started by: sujathan
2 Replies
5. Solaris
hi guys,
i was doing a fresh installation of vxvm 4.0 on solaris 8 Sun enterprise 3500 and when i ran vxinstall command it gave me option of appdg and appdg02 to be encapsulated . I wanted to encapsulate rootdg. i wrongly encapsulated appdg. is there any work around for this ?
your response... (5 Replies)
Discussion started by: ishila
5 Replies
6. UNIX for Dummies Questions & Answers
Hmm, how to ask this without sounding too malicious...
How might one go about causing a disk corruption in OS X specifically or via the command line in UNIX in general?
Doesnt matter the severity of the problem, I just want to scare the person a little, then fix the problem for them.
Any... (1 Reply)
Discussion started by: Yummator
1 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
For some reason a client has given us a Sun Netra T1 with Solaris 8 to administer for them. That's always good business. However, the other day we rebooted the machine and to our amazement, after doing the preliminary hardware tests, we got an error messgae saying that /etc/inittab was... (3 Replies)
Discussion started by: Ivo
3 Replies
8. Cybersecurity
Help!
SCO Unix 5.05.
A relatievely new system went down on me today. I got the dreaded error:
Out of Space on Device (1/42).
I was able to clear up some space in the /tmp directory, however, when I try to boot, the system prompts me to go into single user mode and I get the... (2 Replies)
Discussion started by: gseyforth
2 Replies
9. UNIX for Dummies Questions & Answers
Thank you livin Free for all your help. We removed a lot of spool files and report files. Which should have freed up some space.
But now I think a major problem we have is we have lost or corrupt files which are preventing us from coming up correctly. Can we load or can you copy us a directory... (1 Reply)
Discussion started by: NOT A CLUE
1 Replies
vxcp_lvmroot(1M) vxcp_lvmroot(1M)
NAME
vxcp_lvmroot - copy LVM root disk onto new Veritas Volume Manager root disk
SYNOPSIS
/etc/vx/bin/vxcp_lvmroot [-g diskgroup] [-m mirror_root_da_name]
[-r rootvol_size] [-s standvol_size] [-S swapvol_size]
[-R percent] [-v] [-b] [-D] [-n] new_root_da_name
/etc/vx/bin/vxcp_lvmroot [-g diskgroup] [-m mirror_root_da_name]
[-r rootvol_size] [-s standvol_size] [-S swapvol_size]
[-p Pool_1,Pool_2,Pool_3,Pool_4,...]
[-v] [-b] [-D] new_root_da_name
DESCRIPTION
The vxcp_lvmroot command copies (or "clones") the volumes associated with an LVM root volume group to volumes of equal size (unless the -R
option is specified) on a VxVM root disk group.
VxVM rootability means that VxVM controls the disk containing the root file system. The vxcp_lvmroot command provides a means of achieving
VxVM rootability when upgrading from a prior release of HP-UX without having to use Ignite_UX to perform a cold install.
In the first form of the command shown in the SYNOPSIS, the single specified disk is initialized as a VxVM disk, and the volumes in a sin-
gle physical volume LVM root volume group are copied to that disk.
The second form of the vxcp_lvmroot command copies a multiple disk LVM root volume group. This form of the command also supports striped
volumes. The -p option is used to specify a list of additional disks that are required to copy a multiple disk LVM root volume group.
Before commencing copying, vxcp_lvmroot determines the number of disks that are required. If insufficient disks are specified, vxcp_lvm-
root displays how many disks are needed, and then exits with an error.
vxcp_lvmroot performs the following additional checks on the specified disks:
o The total size used by the LVM volumes is computed for each physical volume (that is, each physical source disk).
o The size of each specified disk is determined and required VxVM overhead space is subtracted from it. The size of each source disk
that is to be copied is compared with that of the target disk assigned to the copy.
o Each specified disk is checked to make sure it is not in use as an LVM, VxVM, or raw disk with mounted file systems.
Once all the checks are satisfied, the new disks are given VxVM disk media (DM) names. The root disks (that is, the disk or disks contain-
ing the root file system), are given names of the form rootdisk##, and other disks are named rootaux##. Here ## is a number starting at 01
that creates a unique disk name.
If VxVM has not yet been enabled using vxinstall, vxcp_lvmroot enables it before initializing the new disks for VxVM use.
Volumes named rootvol, swapvol and dumpvol are generated to correspond to the root, swap and dump (if any) volumes. The names of other
volumes on the new root disk are generated by concatenating the name of the mount point below / with vol (for example, usrvol would be the
volume that corresponds to /usr).
When the VxVM root disk volumes have been made, the data from each LVM volume is copied to the equivalent VxVM volume. For volumes con-
taining file systems, the copy is performed using the cpio command. For volumes that do not contain file systems, the data is copied using
the dd command. An exception to this rule is the swap volume, which has 256KB of random data written to it to make it consistent. Note:
To distinguish this action from copying, it is termed "cloning" in the verbose message output.
To minimize disk arm movement, volume copies are performed serially in the foreground. To ensure that no data corruption has occurred dur-
ing copying, the fsck command is run on each freshly populated file system.
After all of the volumes have been copied, the vxbootsetup command is run on the new root disk to set it up as a bootable VxVM disk under
HP-UX. Once this is complete, the root and stand file systems on the new disk are temporarily mounted, and the following files updated to
reflect the new environment:
o /etc/fstab on the new root file system is updated to reflect the paths to the block device nodes that correspond to the VxVM volumes.
The old information about mounting LVM volumes is preserved at the end of the file in comment lines.
o The device nodes from /dev/vx on the original LVM root disk are regenerated on the new root file system. This is necessary because not
all of the volumes on the new root disk had been created when the root volume was copied.
o /stand/bootconf is regenerated in the new stand file system. The contents of this file define the path of the block device node cor-
responding to the new root disk, for example:
l /dev/dsk/c1t5d0
o /stand/rootconf is regenerated to reflect the starting position and length of the new VxVM root volume. This file is required during
expert recovery using HP-UX Maintenance Mode Boot (MMB) mode.
o The startup script files /sbin/pre_init_rc and /sbin/ioinitrc are checked to determine if they invoke the appropriate commands that
allow VxVM rootability to function. If there is no reference to these commands, the scripts are edited to enable this functionality.
Copies of the original files are saved as /sbin/pre_init_rc.orig and /sbin/ioinitrc.orig.
After successfully configuring the new VxVM root disk configuration, vxcp_lvmroot runs the setboot command to specify the disk,
new_root_da_name, as the primary boot device in NVRAM before exiting.
OPTIONS
-b Invokes the setboot(1M) command to change the primary and alternate boot device settings. The primary boot device is set to the
newly cloned VxVM root device. If the -m option is also specified, the alternate boot device is set to the root mirror. If the
-m option is not specified, the alternate boot device is set to the LVM root from which the VxVM root was cloned. If the -v is
also specified, information on the settings for the primary and alternate boot devices is displayed.
-D Uses the vxdump(1M) and vxrestore(1M) commands to copy VxFS file systems, and the dump(1M) and restore(1M) commands to copy HFS
file systems.
The default method of copying file systems is to use the find(1M) and cpio(1M) commands. However, if one or more of the file
systems to be copied contain files with "holes" (that is, files that appear to be very large, but which are sparse and contain
very little storage), this may exceed the capability of the target file system to copy the files using find and cpio. One symp-
tom of this condition is to receive a "file system full" indication on the target file system while copying. (Whereas the find
and cpio commands assume that a file's size correctly represents the storage required, the vxdump, vxrestore, dump and restore
commands copy a sparse file as it appears in the source file system.)
If a "file system full" condition is indicated for one of the target file systems, start vxcp_lvmroot again with the -D option
specified.
Note: the vxdump, vxrestore, dump and restore commands are not well suited for running from a shell script. If you interrupt the
script (for example, by pressing Ctrl-C), these commands prompt you to ask whether you really want to continue or abort. The out-
put from the dump commands is verbose and so is redirected to a file. As this redirection would hide any continue/abort prompt,
and make the program appear to hang, the interrupt signal is temporarily disabled while the copy is in progress (a message to
this effect is displayed if the -v option is specified).
The redirected verbose output of the Uvxdump and vxrestore commands is saved to a persistent file /etc/vx/vxdump_restore.log.
Check this file after every invocation of vxcp_lvmroot to examine the errors logged, if any. The file is overwritten with every
invocation of vxcp_lvmroot.
-g diskgroup
Specifies the boot disk group.
-m mirror_root_da_name
Creates a mirrored root disk using the specified device name (disk access name) of a physical disk. This disk must have the same
attributes as the disk specified by new_root_da_name.
-n Any LVM volumes that are spanned or striped across multiple Physical Volumes (that is, separate disks) are copied onto the single
specified output disk.
Note: There must be adequate space on the output disk for all of the spanned or striped LVM volumes.
The -n option is mutually exclusive with the -p option,
-p Pool_1,Pool_2,Pool_3,Pool_4,...
Specifies a list of disks that are to be used to satisfy requirements for extra disks when copying multiple disk LVM root volume
groups. Disks specified in this pool are used for copying contiguous volumes that do not reside on the root disk, as well as for
copying stripe columns when striped volumes exist in the LVM root volume group. If the -m option is specified, any mirrors of
the volumes are directed to disks from this pool.
The disks are specified as a comma-separated list of device names (disk access names). These disks are checked for existence,
correct size, and availability for use.
The -p option is mutually exclusive with the -n option.
-r rootvol_size
Permits the volume containing the root file system, which is required to be contiguous, to be created with the specified size in
megabytes on the target disk. The root file system is also created with this size. If the specified size is smaller than the
current LVM root volume, checks are made to ensure that the current root file system is not using more space than the specified
size. If the specified size is larger than the current LVM root volume, checks are made to ensure that the new root volume can
fit on the target root disk.
The -r option is mutually exclusive with the -R option.
-R percent
Reduces the space requirements of the target disk by the specified percentage.
If the target disk has less space than the original LVM root disk, it is not possible to create VxVM volumes with the same size
as the original LVM volumes. This option takes advantage of the fact that most file systems are nowhere near full. Each file
system on the source disk is checked for space usage and the target volume size is reduced by the specified percentage if the
resulting file system would not be more than 80% full.
Note: Only volumes containing file systems are reduced in size.
The minimum and maximum values for the percentage size reduction, percent, that may be specified are 10 and 60 respectively.
The -R option is mutually exclusive with the -r, -s and -S options.
-s standvol_size
Permits the volume containing the stand file system, which is required to be contiguous, to be created with the specified size in
megabytes on the target disk. The stand file system is also created with this size. If the specified size is smaller than the
current LVM stand volume, checks are made to ensure that the current stand file system is not using more space than the specified
size. If the specified size is larger than the current LVM stand volume, checks are made to ensure that the new stand volume can
fit on the target root disk.
The -s option is mutually exclusive with the -R option.
-S swapvol_size
Permits the initial swap volume, which is required to be contiguous, to be created with the specified size in megabytes on the
target disk. If the specified size represents an increase in size, checks are made to ensure that the new initial swap volume
can fit on the target root disk.
The -S option is mutually exclusive with the -R option.
-v Outputs verbose messages including a timestamp that indicates major operations being performed. Since copying the data on a root
disk can take a considerable amount of time, this gives an indication of the progress being made.
ARGUMENTS
new_root_da_name
Specifies the device name (disk access name) of the physical disk that is to become the VxVM root disk.
EXAMPLES
This example shows the vxcp_lvmroot command invoked in its simpliest form:
/etc/vx/bin/vxcp_lvmroot c5t1d0
The next example also creates a root mirror on disk c6t1d0:
/etc/vx/bin/vxcp_lvmroot -m c6t1d0 c5t1d0
The -R option may be used to reduce the size of volumes containing file systems on the target disk by a specified percentage. The next
example specified a size reduction of 30%. The -v option is also specified to provide a verbose listing of the changes made to the file
system sizes (edited here for clarity):
# /etc/vx/bin/vxcp_lvmroot -v -b -R 30 c5t1d0
vxcp_lvmroot 17:31:
Gathering information on the current VxVM root configuration
vxcp_lvmroot 17:31:
Checking specified disk(s) for usability
vxcp_lvmroot 17:31:
Preparing disk c5t1d0 as a VxVM disk
vxcp_lvmroot 17:31:
Adding disk c5t1d0 to rootdg as DM rootdisk01
vxcp_lvmroot 17:31:
Copying /dev/vg01/lvol1 (hfs) to /dev/vx/dsk/rootdg/standvol
vxcp_lvmroot 17:31:
standvol size of 323 MB, reduced from lvol1 size of 512
vxcp_lvmroot 17:31:
Cloning /dev/vg01/lvol2 (swap) to /dev/vx/dsk/rootdg/swapvol
vxcp_lvmroot 17:32:
Copying /dev/vg01/lvol3 (vxfs) to /dev/vx/dsk/rootdg/rootvol
vxcp_lvmroot 17:32:
rootvol size of 352 MB, reduced from lvol3 size of 512
vxcp_lvmroot 17:34:
Copying /dev/vg01/lvol4 (vxfs) to /dev/vx/dsk/rootdg/homevol
vxcp_lvmroot 17:34:
homevol size of 347 MB, reduced from lvol4 size of 512
vxcp_lvmroot 17:34:
Copying /dev/vg01/lvol5 (vxfs) to /dev/vx/dsk/rootdg/optvol
vxcp_lvmroot 17:34:
optvol size of 1391 MB, reduced from lvol5 size of 2048
vxcp_lvmroot 17:39:
Copying /dev/vg01/lvol6 (vxfs) to /dev/vx/dsk/rootdg/tmpvol
vxcp_lvmroot 17:39:
tmpvol size of 173 MB, reduced from lvol6 size of 256
vxcp_lvmroot 17:39:
Copying /dev/vg01/lvol7 (vxfs) to /dev/vx/dsk/rootdg/usrvol
vxcp_lvmroot 17:58:
Copying /dev/vg01/lvol8 (vxfs) to /dev/vx/dsk/rootdg/varvol
vxcp_lvmroot 17:58:
varvol size of 2788 MB, reduced from lvol8 size of 4096
vxcp_lvmroot 18:02:
Setting up disk c5t1d0 as a boot disk
vxcp_lvmroot 18:03:
Installing fstab and fixing dev nodes on new root FS
vxcp_lvmroot 18:03: Current setboot values:
vxcp_lvmroot 18:03: Primary: 0/4/0/0.13.0
vxcp_lvmroot 18:03: Alternate: 0/0/6/0/0.0.0
vxcp_lvmroot 18:03:
Making c5t1d0 (0/4/0/0.1.0) the primary boot disk
vxcp_lvmroot 18:03:
Making c5t13d0 (0/4/0/0.13.0) the alternate boot disk
vxcp_lvmroot 18:03:
Disk c5t1d0 is now a VxVM rootable boot disk
The following example shows how to specify a disk pool to copy volumes from an LVM root disk that contains multiple disk contiguous vol-
umes, including striped volumes, across 4 column stripes:
vxcp_lvmroot -v -p c5t5d0,c5t8d0,c5t9d0 c5t4d0
The next example demonstrates how to copy and mirror an LVM root disk that has 4 column stripes:
vxcp_lvmroot -v -p c5t5d0,c5t8d0,c5t9d0,ct11d0,c5t12d0,c5t13d0
-m c5t10d0 c5t4d0
NOTES
The use of the -v (verbose) option is encouraged. Copying the data from the LVM root volume group to VxVM volumes is a lengthy operation.
The -v option indicates progress of the operation as each volume is being copied. If the -v option is not specified, the vxcp_lvmroot com-
mand is silent for the duration of the volume copy operation, which usually takes more than 30 minutes.
If the vxcp_lvmroot command aborts for any reason, or if you interrupt the command during execution (unless this is inhibited by the -D
option), an attempt is made to clean up the VxVM objects that had been generated up to the time of the abort or interruption. All volumes
that had already been copied, or that were in the process of being copied when the interruption occurred, are removed. All Data Media (DM)
objects that were created are also removed. If a volume or a DM object cannot be removed, an explanatory message is displayed.
SEE ALSO
cpio(1), dd(1), dump(1M), fsck(1M), restore(1M), setboot(1M), vxbootsetup(1M), vxdump(1M), vxrestore(1M)
VxVM 5.0.31.1 24 Mar 2008 vxcp_lvmroot(1M)