Sponsored Content
Full Discussion: mount LVM duplication drives
Top Forums UNIX for Advanced & Expert Users mount LVM duplication drives Post 302119959 by onthetopo on Friday 1st of June 2007 09:52:49 PM
Old 06-01-2007
Power How to mount duplicated LVM harddrives resulted from cloning

Hi, I'm stuck in an awkward situation please help Smilie

I have two identical Seagate 80GB harddrives.
My objective is a bit strange.
1.I want to have a cloned disk as bootable backup
2.When booting using the master drive, I also want to mount the cloned backup disk so I can do incremental backup of certain files Smilie . and use the clone disk as free disk space.

I used "dd if=/dev/hda of=/dev/hdb" to clone the harddrive and the cloning worked fine.
Now fdisk lists partition as the following:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9729 78043770 8e Linux LVM

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 9729 78043770 8e Linux LVM

The clone works fine but I cannot mount both harddrives at the same time. LVM pvdisplay gives:
Found duplicate PV EKctcS4RyHWiw1JlI3FwWdTe8H0iLbxx: using /dev/hdb2 not /dev/hda2

Suppose hda is the master copy and hdb is the clone. Is there anyway to change the LVM fingerprint of hdb so:
1.hdb2 is mountable, say mount hdb2's home directory as /backup/home when booting using hda2
2.hdb is bootable on its own when hda is physically dead.


I'm using Fedroca Core 3. Thanks a lot!!

Last edited by onthetopo; 06-01-2007 at 11:01 PM..
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

File Duplication

hi all how to find the file duplication in a windows 2000 server as usual replies are sincerely appreciated. thanks raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies

2. Shell Programming and Scripting

how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX

hi how floppy disks, CDs and flash drives (pen drives) are accessed in UNIX? thanks (0 Replies)
Discussion started by: nokia1100
0 Replies

3. UNIX for Dummies Questions & Answers

How to mount lvm

Hi, I'm stuck in an awkward situation please help I have two identical Seagate 80GB harddrives. My objective is a bit strange. 1.I want to have a cloned disk as bootable backup 2.When booting using the master drive, I also want to mount the cloned backup disk so I can do incremental backup of... (2 Replies)
Discussion started by: onthetopo
2 Replies

4. Filesystems, Disks and Memory

Unable to mount/find new drives

Hi, I work offshore and we have a system that records excessive amounts of data (Terabytes), therefore we changed the 16 x 400GB drives to 16 x 1TB drives. However, since doing this, upon bootup, the system does not recognize the new drives. These drives are external drives in a chassis which is... (5 Replies)
Discussion started by: shamrocks
5 Replies

5. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

6. Shell Programming and Scripting

Mount Points vs Physical Drives

Hi there i need a way ( some sort of script maybe) to check if a mont point exist when but the physical drive does not for example if i look in / and see that user_data2 directory exist but there is no user_data2 drive. another hurdle would be that some of the machines have raided drives... (3 Replies)
Discussion started by: ab52
3 Replies

7. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

8. Linux

Create LVM of 2 Hard Drives while installing Centos 6.4.

Hello, I have install 2 HDD in my server and now installing the Centos6.4. I want create the LVM of those 2 HDD's so while i'm doing this it is not allowing me to select these 2 disk's from allowable disk list. Same problem if i tried to make Software RAID with creating LVM. Please help. (1 Reply)
Discussion started by: purushottamaher
1 Replies

9. Linux

De-Duplication Problem

Hi all, I download and install lessfs for deduplication, I copy files in /SharedFiles directory and lessfs work right and not store again copy files, but, when i delete all files in /SharedFiles , not return free space to total space, files not show in /SharedFiles , but not copy new files in... (3 Replies)
Discussion started by: saeedha
3 Replies

10. UNIX for Beginners Questions & Answers

Line duplication with awk?!

So while this seemed totally trivial it turned out to be much more difficult than I had thought. I have a file with 3 rows, and I "just" want to add each field n number of times. E.g. > cat file.txt 0.5 -0.1 0.6 for n=3 into: cat newfile.txt 0.5 0.5 0.5 -0.1 -0.1 -0.1 0.6 0.6 0.6 I... (4 Replies)
Discussion started by: Glorp
4 Replies
INSTALL-MBR(8)						   Linux Administrator's Manual 					    INSTALL-MBR(8)

NAME
install-mbr - install a Master Boot Record manager SYNOPSIS
install-mbr <target> [--force] [--install <path>] [--keep] [--list] [--no-act] [--offset <offset>] [--y2kbug[=utc|=local]] [--parameters <path>] [--reset] [--table <path>] [--verbose] [--version] [--help] [--drive <drive>] [--enable <options>] [--inter- rupt <keys>] [--partition <partition>] [--timeout <timeout>] DESCRIPTION
install-mbr installs and configures a Master Boot Record manager on a device. The behaviour of the boot manager is determined by the options given on the command line. <target> is the path specifying the device (or file) that the boot manager should be installed onto. MBR BEHAVIOUR
When the MBR is first loaded it waits for a configurable length of time (1 second by default), monitoring the keyboard for key presses. The types of key which cause the MBR to be interrupted can be configured through the -i option to install-mbr. If the MBR is interrupted, it will display its prompt. Otherwise it will load the first sector of the default partition and execute it. If a disk error occurs or the boot signature is missing, the prompt will be displayed. The boot prompt The boot prompt looks something like this: 14FA: This is the list of valid keys which may be pressed followed by a colon. Numeric keys indicate primary partitions on the disk beginning with partition 1 and 'F' indicates the floppy disk. Extended partitions cannot be booted. The 'A' means that 'advanced' mode may be entered, in which case any partition may be booted. The only other valid key which may be pressed is RETURN, which continues booting with the default partition. The prompt for advanced mode looks like this and works just the same as the normal prompt. 1234F: The list of valid partitions and the default partition can be configured through the -e and -p options to install-mbr. OPTIONS
Installation options These options change the way the installation program operates. --force, -f This option currently overrides a check to make sure the specified target is valid. --install <path>, -I <path> This option may be used to install code other than that which is built in to install-mbr. It is mainly useful for testing, but may be used to install older versions of the MBR. --keep, -k This option instructs the installer to modify the parameters stored in the MBR without updating the code. --list, -l This option may be used to view the parameters being installed in the MBR. It implies the --no-act and --keep flags unless an option other than --offset, --verbose or --list is given. This allows the contents of the MBR to be examined. --no-act, -n This option ensures that the target is not modified, as it is opened in read-only mode. --offset <offset>, -o <offset> This option may be used to install the MBR somewhere other than the start of the target. The offset specifies the number of bytes from the start of the target at which the MBR should be installed. For example, an offset of 128 may be used for DOSEMU disk images. --y2kbug[=utc|=local|=off], -y[u|l|-] This option specifies the status of the Y2K bug fix parameter. When set, an alternative MBR is installed that fixes a Y2K bug in some BIOSes that causes them to always boot up the machine with the year ranging from 94 to 99. This MBR stores the current month and year and sets the year based on this when the computer is booted. It also increases the year automatically when the current month is lower than the month of the last boot. The initial year and month are set based on the current system time converted to UTC or the local time as specified by the argument. If the argument is not specified, the default is read from /etc/default/rcS. Due to space limitations, the alternative version of the MBR does not display the word MBR as it boots. If the argument is =off or - the Y2K bug fix is disabled. WARNING: The Y2K bug fix will work fine until you want to set the date backwards. When you do want to do this, you will need to reinstall the MBR. You cannot just set the date in the BIOS (since the whole point of this option is that the year provided by the BIOS is ignored). --parameters <path>, -P <path> This option may be used to copy parameters from somewhere other than the target. The path specifies a location where a version of this MBR has been installed and parameters are read from there. It could be used to copy parameters from one disk to another disk. --reset, -r This option is used to reset the boot parameters to the state found in the code being installed (or code which would be installed if --keep were not specified). --table <path>, -T <path> The master boot record currently uses the partition table in the sector which contains it to locate boot sectors (This behaviour may change with future versions of the MBR, in which case the option may be withdrawn). The --table option is used to copy a partition table from another location to the target location. Any data stored on the target disk may be lost (as the partition table is over- written), so this option should be used with extreme caution. As the partition table is copied, any changes made to the original partition table will not be noticed. This option is only provided to make installation to floppy easy. --verbose, -v When invoked with this option, install-mbr will display some information about what it is doing. --version, -V This option will cause install-mbr to display it's version number and exit. --help, -h This option will cause install-mbr to display a help message and exit. Parameter options These options change the parameters stored within the Master Boot Record. --drive <drive>, -d <drive> This option instructs the MBR to boot a drive other than the first hard disk. It may be specified in decimal or hexadecimal if pre- fixed with 0x. Hard disks are numbered starting from 128 (0x80). --enable <option>, -e <option> This option sets the list of boot sectors which may be loaded (or advanced mode). A boot sector may be loaded from one of the first 4 partitions of the disk, or from the first floppy drive. Use --enable +<spec> to add a boot sector to the list or --enable -<spec> to remove a boot sector from the list. Use --enable =<spec> to set the list to <spec>. <spec> may contain: 1, 2, 3, 4 The specified partition number. F The first floppy disk. A Advanced mode (not a boot sector). --interrupt <mode>, -i <mode> This option sets the list of events which will cause the MBR to display it's prompt. Use -i +<event> to add an event to the list or -i -<event> to remove an event from the list. Values of <event> are: s A shift or control key is pressed. k A non shift-like key is pressed a The prompt is always displayed. n Never display the prompt (unless an error occurs). -p <partn>, --partition <partn> This specifies the default boot sector to load. Valid values of <partn> are: 1, 2, 3, 4 The specified partition number. F The first floppy disk. D The partition marked with the bootable flag in the partition table. -t <timeout>, --timeout <timeout> This option changes the time which the MBR waits for before booting the default partition to the value specified in 1/18 seconds (approx). The maximum timeout that can be specified is 65534 which is about an hour. EXAMPLES
install-mbr /dev/fd0 -T /dev/hda Install the default MBR image on /dev/fd0, taking the partition table from /dev/hda. install-mbr -kr /dev/hda Reset the parameters on /dev/hda without installing any new code. install-mbr -I my-mbr -T /dev/hda -P my-parameters /dev/fd0 Install to /dev/fd0, taking code from my-mbr, partition table from /dev/hda and parameters from my-parameters. install-mbr -l -o 128 hdimage List the parameters stored at offset 128 in hdimage (may be a DOSEMU image). install-mbr -d 0x81 -T /dev/hdb /dev/fd0 Install on /dev/fd0 to boot from BIOS drive 129 (0x81) with partition table copied from /dev/hdb. install-mbr -e 13 /dev/hda install-mbr -e 2 -e =13 /dev/hda install-mbr -e1 -e3 /dev/hda Enable booting from partitions 1 and 3 on /dev/hda. Other locations are disabled. install-mbr -e +f-a -i sk /dev/hda Enabled booting from the floppy drive, and disable advanced mode. Display the prompt if any shift, control or non shift-like key is pressed. Other settings are untouched. DIAGNOSTICS
Cannot handle MBR version n (backwards compatible to n) This error means that the version of MBR which is being installed is not known about by this installer. Such files cannot have their parameters read or written. If such a newer version is installed, it can be downgraded by specifying the --reset option (without specifying --keep). SEE ALSO
grub(8), lilo(8) BUGS
The operation of --list may be confusing. AUTHOR
install-mbr was written for the Debian project by Neil Turton <neilt+mbr@chiark.greenend.org.uk>. Linux 16 April 2006 INSTALL-MBR(8)
All times are GMT -4. The time now is 12:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy