Sponsored Content
Full Discussion: lvsplit and lvmerge missing
Top Forums UNIX for Dummies Questions & Answers lvsplit and lvmerge missing Post 31697 by ncmurf00 on Tuesday 12th of November 2002 10:27:37 AM
Old 11-12-2002
Data lvsplit and lvmerge missing

I have an automated backup script that runs nightly. I already know from other posts that using the CPIO is not a good idea.
Anyway, I was running HP-UX 10.20, and had to upgrade to 11.00. I didn't have enough disk space for a clean upgrade, so I had to do a cold install.
My problem is, my lvsplit and lvmerge commands are missing, and my backup splits the volumes, backs-up the "b" side and re-merges them.
Any ideas on how to get the 2 commands back?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

what am I missing?

I have the following portion of a script Check() { echo "\n\nChecking that all constraints are Enabled" echo "..." sleep 2 CHECK_COUNT='sqlplus -s $1 <<-EOSQL4 set feed off pause off pages 0 head off; set linesize 150 echo off; select count(*) from user_constraints where... (4 Replies)
Discussion started by: Zelp
4 Replies

2. UNIX for Dummies Questions & Answers

Missing Package

Hi All, I have a server running SunOS 5.9, on this I need to install Oracle 10g; however the installer returns ERROR: Unable to convert from "UTF-8" to "646" for NLS! Did some digging around and found that I need the SUNWuiu8 package. However I'm not sure where I can download the... (1 Reply)
Discussion started by: Zak
1 Replies

3. Solaris

pfild missing!!

I wanted to enable IP filtering on a Solaris10 U4 machine. For some reason I dont find /usr/sbin/pfild. This machine was running a minimal version of S10U4 and I got to know that for pfild I need to have SUNWipfr and SUNWipfu. I installed both those packages but no sign of pfild yet. Anyone has... (0 Replies)
Discussion started by: Naanu
0 Replies

4. HP-UX

missing disk

Hi Everyone I am having hard drive problems with a C3000 Visualize workstation. The machine has two 9.1Gb disks. One dedicated to the OS 11i and the other containing one lvol /space. When I boot up the second disk can be seen in sam but nowhere else, ie cd /space freezes. I fear that on boot... (3 Replies)
Discussion started by: C3000
3 Replies

5. Shell Programming and Scripting

test: ] missing

$HOLIDAY="" if then echo "1" else echo "2" fi Getting an error --test: ] missing...could some one help on this (2 Replies)
Discussion started by: infernalhell
2 Replies

6. UNIX for Dummies Questions & Answers

libjvm.so missing?

Hi I get this error message. Error: failed /usr/openv/java/jre/lib/i386/client/libjvm.so, because libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory I tried doing the yum install libstdc but it didn't find any thing. Any of you know how to install this on... (2 Replies)
Discussion started by: samnyc
2 Replies

7. Linux

library missing

Hi, I am trying migrate webmin application from solaris to linux. But that is not working in Linux. because the library librpcsoc.so has missed in Linux box.. Could you please advice me that how to resolve this issue and also that how to install that library as well. (1 Reply)
Discussion started by: Mani_apr08
1 Replies

8. Shell Programming and Scripting

[: missing `]'

Hi, I am getting this error while running the following code. i=`awk '{print $2}' test1.txt` j=`awk '{print $4}' test1.txt` k=`awk '{print $6}' test1.txt` if ; then echo "Up." else echo "down" fi rm -f test.txt test1.txt error is this: line 12: ' Please suggest. (2 Replies)
Discussion started by: arijitsaha
2 Replies

9. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

10. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies
DBIx::Class::Schema::Versioned(3)			User Contributed Perl Documentation			 DBIx::Class::Schema::Versioned(3)

NAME
DBIx::Class::Schema::Versioned - DBIx::Class::Schema plugin for Schema upgrades SYNOPSIS
package MyApp::Schema; use base qw/DBIx::Class::Schema/; our $VERSION = 0.001; # load MyApp::Schema::CD, MyApp::Schema::Book, MyApp::Schema::DVD __PACKAGE__->load_classes(qw/CD Book DVD/); __PACKAGE__->load_components(qw/Schema::Versioned/); __PACKAGE__->upgrade_directory('/path/to/upgrades/'); DESCRIPTION
This module provides methods to apply DDL changes to your database using SQL diff files. Normally these diff files would be created using "create_ddl_dir" in DBIx::Class::Schema. A table called dbix_class_schema_versions is created and maintained by the module. This is used to determine which version your database is currently at. Similarly the $VERSION in your DBIC schema class is used to determine the current DBIC schema version. The upgrade is initiated manually by calling "upgrade" on your schema object, this will attempt to upgrade the database from its current version to the current schema version using a diff from your upgrade_directory. If a suitable diff is not found then no upgrade is possible. SEE ALSO
DBIx::Class::DeploymentHandler is a much more powerful alternative to this module. Examples of things it can do that this module cannot do include o Downgrades in addition to upgrades o Multiple sql files files per upgrade/downgrade/install o Perl scripts allowed for upgrade/downgrade/install o Just one set of files needed for upgrade, unlike this module where one might need to generate "factorial(scalar @versions)" GETTING STARTED
Firstly you need to setup your schema class as per the "SYNOPSIS", make sure you have specified an upgrade_directory and an initial $VERSION. Then you'll need two scripts, one to create DDL files and diffs and another to perform upgrades. Your creation script might look like a bit like this: use strict; use Pod::Usage; use Getopt::Long; use MyApp::Schema; my ( $preversion, $help ); GetOptions( 'p|preversion:s' => $preversion, ) or die pod2usage; my $schema = MyApp::Schema->connect( $dsn, $user, $password, ); my $sql_dir = './sql'; my $version = $schema->schema_version(); $schema->create_ddl_dir( 'MySQL', $version, $sql_dir, $preversion ); Then your upgrade script might look like so: use strict; use MyApp::Schema; my $schema = MyApp::Schema->connect( $dsn, $user, $password, ); if (!$schema->get_db_version()) { # schema is unversioned $schema->deploy(); } else { $schema->upgrade(); } The script above assumes that if the database is unversioned then it is empty and we can safely deploy the DDL to it. However things are not always so simple. if you want to initialise a pre-existing database where the DDL is not the same as the DDL for your current schema version then you will need a diff which converts the database's DDL to the current DDL. The best way to do this is to get a dump of the database schema (without data) and save that in your SQL directory as version 0.000 (the filename must be as with "ddl_filename" in DBIx::Class::Schema) then create a diff using your create DDL script given above from version 0.000 to the current version. Then hand check and if necessary edit the resulting diff to ensure that it will apply. Once you have done all that you can do this: if (!$schema->get_db_version()) { # schema is unversioned $schema->install("0.000"); } # this will now apply the 0.000 to current version diff $schema->upgrade(); In the case of an unversioned database the above code will create the dbix_class_schema_versions table and write version 0.000 to it, then upgrade will then apply the diff we talked about creating in the previous paragraph and then you're good to go. METHODS
upgrade_directory Use this to set the directory your upgrade files are stored in. backup_directory Use this to set the directory you want your backups stored in (note that backups are disabled by default). install Arguments: $db_version Call this to initialise a previously unversioned database. The table 'dbix_class_schema_versions' will be created which will be used to store the database version. Takes one argument which should be the version that the database is currently at. Defaults to the return value of "schema_version". See "getting_started" for more details. deploy Same as "deploy" in DBIx::Class::Schema but also calls "install". create_upgrade_path Arguments: { upgrade_file => $file } Virtual method that should be overridden to create an upgrade file. This is useful in the case of upgrading across multiple versions to concatenate several files to create one upgrade file. You'll probably want the db_version retrieved via $self->get_db_version and the schema_version which is retrieved via $self->schema_version ordered_schema_versions Returns: a list of version numbers, ordered from lowest to highest Virtual method that should be overridden to return an ordered list of schema versions. This is then used to produce a set of steps to upgrade through to achieve the required schema version. You may want the db_version retrieved via $self->get_db_version and the schema_version which is retrieved via $self->schema_version upgrade Call this to attempt to upgrade your database from the version it is at to the version this DBIC schema is at. If they are the same it does nothing. It will call "ordered_schema_versions" to retrieve an ordered list of schema versions (if ordered_schema_versions returns nothing then it is assumed you can do the upgrade as a single step). It then iterates through the list of versions between the current db version and the schema version applying one update at a time until all relevant updates are applied. The individual update steps are performed by using "upgrade_single_step", which will apply the update and also update the dbix_class_schema_versions table. upgrade_single_step Arguments: db_version - the version currently within the db Arguments: target_version - the version to upgrade to Call this to attempt to upgrade your database from the db_version to the target_version. If they are the same it does nothing. It requires an SQL diff file to exist in your upgrade_directory, normally you will have created this using "create_ddl_dir" in DBIx::Class::Schema. If successful the dbix_class_schema_versions table is updated with the target_version. This method may be called repeatedly by the upgrade method to upgrade through a series of updates. do_upgrade This is an overwritable method used to run your upgrade. The freeform method allows you to run your upgrade any way you please, you can call "run_upgrade" any number of times to run the actual SQL commands, and in between you can sandwich your data upgrading. For example, first run all the CREATE commands, then migrate your data from old to new tables/formats, then issue the DROP commands when you are finished. Will run the whole file as it is by default. run_upgrade $self->run_upgrade(qr/create/i); Runs a set of SQL statements matching a passed in regular expression. The idea is that this method can be called any number of times from your "do_upgrade" method, running whichever commands you specify via the regex in the parameter. Probably won't work unless called from the overridable do_upgrade method. apply_statement Takes an SQL statement and runs it. Override this if you want to handle errors differently. get_db_version Returns the version that your database is currently at. This is determined by the values in the dbix_class_schema_versions table that "upgrade" and "install" write to. schema_version Returns the current schema class' $VERSION backup This is an overwritable method which is called just before the upgrade, to allow you to make a backup of the database. Per default this method attempts to call "$self->storage->backup", to run the standard backup on each database type. This method should return the name of the backup file, if appropriate.. This method is disabled by default. Set $schema->do_backup(1) to enable it. connection Overloaded method. This checks the DBIC schema version against the DB version and warns if they are not the same or if the DB is unversioned. It also provides compatibility between the old versions table (SchemaVersions) and the new one (dbix_class_schema_versions). To avoid the checks on connect, set the environment var DBIC_NO_VERSION_CHECK or alternatively you can set the ignore_version attr in the forth argument like so: my $schema = MyApp::Schema->connect( $dsn, $user, $password, { ignore_version => 1 }, ); AUTHORS
Jess Robinson <castaway@desert-island.me.uk> Luke Saunders <luke@shadowcatsystems.co.uk> LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.16.2 2012-10-18 DBIx::Class::Schema::Versioned(3)
All times are GMT -4. The time now is 10:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy