Sponsored Content
Top Forums Shell Programming and Scripting sudo dd if=/dev/sdb1 of="disk-image" Post 302438313 by dr.house on Monday 19th of July 2010 10:09:38 AM
Old 07-19-2010
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

2. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies

5. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

6. AIX

"Please mount volume 2 on /dev/rmt0.1" message during mksysb restore

Dear all First of all, my English not so good. We have p52a (production server) and p52a (test server). Tape drives are VXA2. When both servers were AIX 5.3, mksysb on production server and restoring to test server was OK. The production server was AIX 5.3 and recently upgraded to... (3 Replies)
Discussion started by: fifa15pc
3 Replies

7. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

8. Shell Programming and Scripting

Explaining behaviour of sudo bash "$0" "$@";

I've found this script part on the stackoverflow: if ; then sudo bash "$0" "$@"; exit "$?"; fi I realized that sudo bash "$0" "$@"; is the only needed for me. But the strange thing happens when I move this line outside the IF statement: sudo bash "$0" "$@"; stops the... (9 Replies)
Discussion started by: boqsc
9 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
PVMOVE(8)						      System Manager's Manual							 PVMOVE(8)

NAME
pvmove - move physical extents SYNOPSIS
pvmove [--abort] [--alloc AllocationPolicy] [-b|--background] [-d|--debug] [-h|--help] [-i|--interval Seconds] [--noudevsync] [-v|--ver- bose] [-n|--name LogicalVolume] [SourcePhysicalVolume[:PE[-PE]...] [DestinationPhysicalVolume[:PE[-PE]...]...]] DESCRIPTION
pvmove allows you to move the allocated physical extents (PEs) on SourcePhysicalVolume to one or more other physical volumes (PVs). You can optionally specify a source LogicalVolume in which case only extents used by that LV will be moved to free (or specified) extents on DestinationPhysicalVolume(s). If no DestinationPhysicalVolume is specified, the normal allocation rules for the Volume Group are used. If pvmove gets interrupted for any reason (e.g. the machine crashes) then run pvmove again without any PhysicalVolume arguments to restart any moves that were in progress from the last checkpoint. Alternatively use pvmove --abort at any time to abort them at the last check- point. You can run more than one pvmove at once provided they are moving data off different SourcePhysicalVolumes, but additional pvmoves will ignore any Logical Volumes already in the process of being changed, so some data might not get moved. pvmove works as follows: 1. A temporary 'pvmove' Logical Volume is created to store details of all the data movements required. 2. Every Logical Volume in the Volume Group is searched for contiguous data that need moving according to the command line arguments. For each piece of data found, a new segment is added to the end of the pvmove LV. This segment takes the form of a temporary mirror to copy the data from the original location to a newly-allocated location. The original LV is updated to use the new temporary mirror segment in the pvmove LV instead of accessing the data directly. 3. The Volume Group metadata is updated on disk. 4. The first segment of the pvmove Logical Volume is activated and starts to mirror the first part of the data. Only one segment is mir- rored at once as this is usually more efficient. 5. A daemon repeatedly checks progress at the specified time interval. When it detects that the first temporary mirror is in-sync, it breaks that mirror so that only the new location for that data gets used and writes a checkpoint into the Volume Group metadata on disk. Then it activates the mirror for the next segment of the pvmove LV. 6. When there are no more segments left to be mirrored, the temporary Logical Volume is removed and the Volume Group metadata is updated so that the Logical Volumes reflect the new data locations. Note that this new process cannot support the original LVM1 type of on-disk metadata. Metadata can be converted using vgconvert(8). N.B. The moving of mirrors, snapshots and their origins is not yet supported. OPTIONS
--abort Abort any moves in progress. --noudevsync Disable udev synchronisation. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. You should only use this if udev is not running or has rules that ignore the devices LVM2 cre- ates. -b, --background Run the daemon in the background. -i, --interval Seconds Report progress as a percentage at regular intervals. -n, --name LogicalVolume Move only the extents belonging to LogicalVolume from SourcePhysicalVolume instead of all allocated extents to the destination phys- ical volume(s). EXAMPLES
To move all Physical Extents that are used by simple Logical Volumes on /dev/sdb1 to free Physical Extents elsewhere in the Volume Group use: pvmove /dev/sdb1 Any mirrors, snapshots and their origins are left unchanged. Additionally, a specific destination device /dev/sdc1 can be specified like this: pvmove /dev/sdb1 /dev/sdc1 To perform the action only on extents belonging to the single Logical Volume lvol1 do this: pvmove -n lvol1 /dev/sdb1 /dev/sdc1 Rather than moving the contents of the entire device, it is possible to move a range of Physical Extents - for example numbers 1000 to 1999 inclusive on /dev/sdb1 - like this: pvmove /dev/sdb1:1000-1999 To move a range of Physical Extents to a specific location (which must have sufficent free extents) use the form: pvmove /dev/sdb1:1000-1999 /dev/sdc1 or pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999 If the source and destination are on the same disk, the anywhere allocation policy would be needed, like this: pvmove --alloc anywhere /dev/sdb1:1000-1999 /dev/sdb1:0-999 The part of a specific Logical Volume present within in a range of Physical Extents can also be picked out and moved, like this: pvmove -n lvol1 /dev/sdb1:1000-1999 /dev/sdc1 SEE ALSO
lvm(8), vgconvert(8) pvs(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) PVMOVE(8)
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy