Sponsored Content
Operating Systems Linux Red Hat Lvcreate snapshot - ignore files Post 302909441 by ksgnathan on Thursday 17th of July 2014 03:13:50 AM
Old 07-17-2014
RedHat Lvcreate snapshot - ignore files

Hi,

Need help for the below scenario..

Its a linux os snapshot which has been taken based on taking snapshot using lvcreate..while taking rootvg it taking an dump file of 2GB unnecessarily..

So any tricks to avoid the dump file while creating snapshot using lvcreate
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to ignore '.' files

I'm running Fedora Core 6 as an FTP server on a powerMac G4... I'm trying to create a script to remove files older than 3 days... I'm able to find all data older than 3 days but it finds hidden files such as /home/ftp/goossens/.canna /home/ftp/goossens/.kde... (4 Replies)
Discussion started by: James_UK
4 Replies

2. Shell Programming and Scripting

How to ignore incomplete files

On Solaris & AIX, suppose there is a directory 'dir'. Log files of size approx 1MB are continuously being deposited here by scp command. I have a script that scans this dir every 5 mins and moves away the log files that have been deposited so far. How do I design my script so that I pick up... (6 Replies)
Discussion started by: sentak
6 Replies

3. Solaris

How to ignore incomplete files

On Solaris, suppose there is a directory 'dir'. Log files of size approx 1MB are continuously being deposited here by scp command. I have a script that scans this dir every 5 mins and moves away the log files that have been deposited so far. How do I design my script so that I pick up *only*... (6 Replies)
Discussion started by: sentak
6 Replies

4. UNIX for Dummies Questions & Answers

LVM lvcreate don't want to format

Hello, I would like to create a Lvolume on an already written disk. Main goal is to NOT format data on this disk. Unfortunately, while trying to mount my LV , I've got this error : linux-qc44:/ # mount -a mount: wrong fs type, bad option, bad superblock on /dev/mapper/system-DB, ... (10 Replies)
Discussion started by: Ivan45
10 Replies

5. Shell Programming and Scripting

Getting ls to ignore ~ and # files

Is there a way to customize ls to ignore files ending with ~ and #? (those are Emacs backup and auto-save files). I found -B option, which only ignores ~ files (2 Replies)
Discussion started by: yaroslavvb
2 Replies

6. Fedora

Problem Executing "lvcreate" Command

Hi everyone, I use Fedora 17. I used gparted to created a dev/sdb2 partition. I then used vgextend to extend the volume group. The output of vgdisplay shows the condition of my volume group: --- Volume group --- VG Name vg_data System ID Format ... (2 Replies)
Discussion started by: mojoman
2 Replies

7. Shell Programming and Scripting

Ignore common line between 2 files in perl

I want to ignore the same line which appear in File1 and File2 and then print the final result back in file1 File1 ABC 123 XYZ File2 XYX Output ABC 123 I have to run this command on multiple servers over ssh. Below is my code that worked only on same server and not over ssh. ... (5 Replies)
Discussion started by: crypto87
5 Replies

8. Shell Programming and Scripting

How to ignore white spaces while comparing two files.?

Hello Experts, I am trying to compare two files line by line with below code. I want to ignore the spaces while comparing. Only content should be compared. hostFile="/etc/hosts" inputFile="/home/scripts/DR/hosts.eas" grep -E '^{1,3}\.{1,3}\.{1,3}\.{1,3}' $inputFile > temp1... (9 Replies)
Discussion started by: sharsour
9 Replies

9. Shell Programming and Scripting

Wget - how to ignore files in immediate directory?

i am trying to recursively save a remote FTP server but exclude the files immediately under a directory directory1 wget -r -N ftp://user:pass@hostname/directory1 I want to keep these which may have more files under them directory1/dir1/file.jpg directory1/dir2/file.jpg... (16 Replies)
Discussion started by: vanessafan99
16 Replies

10. UNIX for Dummies Questions & Answers

Does rsync check and ignore files that already exist?

Hi, We have two (2) servers named primary and standby. There is a directory named /db01/archive that we need to keep in-sync. Files get transferred from primary and standby. Sometimes when we do a failover or when there is a network issue, some files fail to get transferred. I want to use... (3 Replies)
Discussion started by: newbie_01
3 Replies
LVCREATE(8)						      System Manager's Manual						       LVCREATE(8)

NAME
lvcreate - create a logical volume in an existing volume group SYNOPSIS
lvcreate [-A|--autobackup {y|n}] [-C|--contiguous {y|n}] [-d|--debug] [-h|--help] [-i|--stripes StripesI] [-I|--stripesize StripeSizeI]] {-l|--extents LogicalExtentsNumber| -L|--size LogicalVolumeSize[kKmMgGtT]} [-n|--name LogicalVolumeName] [-p|--permission{r|rw}] [-r|--readahead ReadAheadSectors] [-v|--verbose][-Z|--zero{y|n}] VolumeGroupName [PhysicalVolumePath...] lvcreate {-l/--extents LogicalExtentsNumber | -L/--size LogicalVolumeSize[kKmMgGtT]} [-c/--chunksize ChunkSize] -s/--snapshot -n/--name SnapshotLogicalVolumeName OriginalLogicalVol- umePath [PhysicalVolumePath...] DESCRIPTION
lvcreate creates a new logical volume in a volume group ( see vgcreate(8), vgchange(8) ) by allocating logical extents from the free physi- cal extent pool of that volume group. If there are not enough free physical extents then the volume group can be extended ( see vgex- tend(8) ) with other physical volumes or by reducing existing logical volumes of this volume group in size ( see lvreduce(8), e2fsadm(8) ). The second form supports the creation of snapshot logical volumes which keep the contents of the original logical volume for backup pur- poses. OPTIONS -A, --autobackup {y|n} Controls automatic backup of VG metadata after the change ( see vgcfgbackup(8) ). Default is yes. -c, --chunksize ChunkSize Power of 2 chunk size for the snapshot logical volume between 4k and 1024k. -C, --contiguous y/n Sets or resets the contiguous allocation policy for logical volumes. Default is no contiguous allocation based on a next free prin- ciple. -d, --debug Enables additional debugging output (if compiled with DEBUG). -h, --help Print a usage message on standard output and exit successfully. -i, --stripes Stripes Gives the number of stripes. This is equal to the number of physical volumes to scatter the logical volume. -I, --stripesize StripeSize Gives the number of kilobytes for the granularity of the stripes. StripeSize must be 2^n (n = 2 to 9) -l, --extents LogicalExtentsNumber Gives the number of logical extents to allocate for the new logical volume. -L, --size LogicalVolumeSize[kKmMgGtT] Gives the size to allocate for the new logical volume. A size suffix of K for kilobytes, M for megabytes, G for gigabytes or T for terabytes is optional. Default unit is megabytes. -n, --name LogicalVolumeName The name for the new logical volume. Without this option a default names of "lvol#" will be generated where # is the LVM internal number of the logical volume. -p, --permission r/w Set access permissions to read only or read and write. Default is read and write. -r, --readahead ReadAheadSectors Set read ahead sector count of this logical volume to a value between 2 and 120. -s, --snapshot Create a snapshot logical volume (or snapshot) for an existing, so called original logical volume (or origin). Snapshots provide a 'frozen image' of the contents of the origin while the origin can still be updated. They enable consistent backups and online recov- ery of removed/overwritten data/files. The snapshot does not need the same amount of storage the origin has. In a typical scenario, 15-20% might be enough. In case the snapshot runs out of storage, use lvextend(8) to grow it. Shrinking a snapshot is supported by lvreduce(8) as well. Run lvdisplay(8) on the snapshot in order to check how much data is allocated to it. -v, --verbose Gives verbose information about lvcreate's activities. -Z, --zero y/n Controls zeroing of the first KB of data in the new logical volume. Default is yes. Warning: trying to mount an unzeroed logical volume can cause the system to hang. Examples "lvcreate -i 3 -I 8 -L 100 vg00" tries to create a striped logical volume with 3 stripes, a stripesize of 8KB and a size of 100MB in the volume group named vg00. The logical volume name will be chosen by lvcreate. "lvcreate --size 100m --snapshot --name snap /dev/vg00/lvol1" creates a snapshot logical volume named /dev/vg00/snap which has access to the contents of the original logical volume named /dev/vg00/lvol1 at snapshot logical volume creation time. If the original logical volume contains a file system, you can mount the snapshot logical volume on an arbitrary directory in order to access the contents of the filesystem to run a backup while the original filesystem is updated. DIAGNOSTICS
lvcreate returns an exit code of 0 for success or > 0 for error: 1 invalid volume group name 2 error checking existence of volume group 3 volume group inactive 4 invalid logical volume name 5 error getting status of logical volume 6 error checking existence of logical volume 7 invalid physical volume name 8 invalid number of physical volumes 9 invalid number of stripes 10 invalid stripe size 11 error getting status of volume group 12 invalid logical volume size 13 invalid number of free physical extents 14 more stripes than physical volumes requested 15 error reading VGDA 16 requested physical volume not in volume group 17 error reading physical volume 18 maximum number of logical volumes exceeded 19 not enoungh space available to create logical volume 20 error setting up VGDA for logical volume creation 21 error creating VGDA for logical volume in kernel 22 error writing VGDA to physical volume(s) 23 error creating device special for logical volume 24 error opening logical volume 25 error writing to logical volume 26 invalid read ahead sector count 27 no free logical volume manager block specials available 28 invalid snapshot logical volume name 29 error setting up snapshot copy on write exception table 30 error initializing snapshot copy on write exception table on disk 31 error getting status of logical volume from kernel 32 snapshot already exists 95 driver/module not in kernel 96 invalid I/O protocol version 97 error locking logical volume manager 98 invalid lvmtab (run vgscan(8)) 99 invalid command line ENVIRONMENT VARIABLES
LVM_AUTOBACKUP If this variable is set to "no" then the automatic backup of VG metadata is turned off. LVM_VG_MAX_BACKUPS This variable determines the backup history depth of kept VGDA copy files in /etc/lvmconf. It can be set to a positive number between 0 and 999. The higher this number is, the more changes you can restore using vgcfgrestore(8). LVM_VG_NAME The default Volume Group Name to use. Setting this variable enables you to enter just the Logical Volume Name rather than its com- plete path. See also lvm(8), vgcreate(8), lvremove(8), lvrename(8), lvextend(8), lvreduce(8), lvdisplay(8), lvscan(8), lvmsadc(8), lvmsar(8) AUTHOR
Heinz Mauelshagen <Linux-LVM@Sistina.com> Heinz Mauelshagen LVM TOOLS LVCREATE(8)
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy