Sponsored Content
Operating Systems Linux LVM (volume manager) and virtual disks Post 302316536 by otheus on Friday 15th of May 2009 11:08:07 AM
Old 05-15-2009
LVM (volume manager) and virtual disks

Smilie
Hi guys,

I'm pulling my hair out over this one. I am trying to set up a virtual server environment. ( I am using VirtualBox, but I think this is irrelevant to this problem.) I have downloaded a pre-packaged Linux virtual disk, with which I have successfully started a virtual instance of a Linux server. Now, my goal is (nevermind why for now) to use one virtual machine to modify the root disk of another (which is turned off during this process). Here are the steps I take:
  1. Create and test a virtual linux server (as noted above), called vs-A
  2. Clone the disk used by vs-A (while vs-A is stopped). Let's call the first disk vhd-A1 and the new clone, vhd-A2.
  3. Create a new virtual linux server, vs-B which uses vhd-A2. This works. Power it off.
  4. Now tell vs-A to use vhd-A1 at /dev/hda (as usual) and to use vhd-A2 as /dev/hdb.
  5. Start vs-A
So now, vs-A is running with /dev/hda and /dev/hdb. But trying to do anything with hdb doesn't seem to work. I'd like to know why and to try to remedy that.

Code:
# dumpe2fs /dev/hdb2
dumpe2fs 1.39 (29-May-2006)
dumpe2fs: Bad magic number in super-block while trying to open /dev/hdb2
[expected -- it's "encapsulated" in an LVM]

# pvs -a
  Found duplicate PV pLPlWtPxq1A8JBAfSqrDWdhYZM2PpVr0: using /dev/hdb2 not /dev/hda2
  PV                       VG         Fmt  Attr PSize  PFree
  /dev/VolGroup00/LogVol01                 --       0     0
  /dev/hda1                                --       0     0
  /dev/hdb1                                --       0     0
  /dev/hdb2                VolGroup00 lvm2 a-   19.88G    0
  /dev/hdb2                VolGroup00 lvm2 a-   19.88G    0
<other output>

# lvscan
  Found duplicate PV pLPlWtPxq1A8JBAfSqrDWdhYZM2PpVr0: using /dev/hdb2 not /dev/hda2
  ACTIVE            '/dev/VolGroup00/LogVol00' [18.88 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [1.00 GB] inherit


# pvscan
  Found duplicate PV pLPlWtPxq1A8JBAfSqrDWdhYZM2PpVr0: using /dev/hdb2 not /dev/hda2
  PV /dev/hdb2   VG VolGroup00   lvm2 [19.88 GB / 0    free]
  Total: 1 [19.88 GB] / in use: 1 [19.88 GB] / in no VG: 0 [0   ]

# pvs
  Found duplicate PV pLPlWtPxq1A8JBAfSqrDWdhYZM2PpVr0: using /dev/hdb2 not /dev/hda2
  PV         VG         Fmt  Attr PSize  PFree
  /dev/hdb2  VolGroup00 lvm2 a-   19.88G    0

# :Fine, I'll just overwrite the thing!
#  mke2fs -b 4096 -O dir_index,spare_super /dev/hdb2
mke2fs 1.39 (29-May-2006)
/dev/hdb2 is apparently in use by the system; will not make a filesystem here!


Is there a tool or a technique to deal with this situation? Is there a way to rename the uuid? If so, how do I specify that I want the uuid of /dev/hdb changed? Is there a way to associate an existing physical partition to a new group? How do admins do disaster recovery with LVM in these kinds of situations?
 

9 More Discussions You Might Find Interesting

1. Linux

Problem for restoring lvm on different disks

Hi all, I have a server running in RH ES4, the SCSI HD are running in RAID 1. I backup the LVM config by using 'vgcfgbackup' and then remove all the HD. I insert another HD (same size & branch but different model) into the machine and run linux rescue to recreate the... (0 Replies)
Discussion started by: donaldfung
0 Replies

2. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies

3. Solaris

How to resize mirror volume in veritas volume manager 3.5 on Solaris 9 OE

Hi all, I have a problem with vxvm volume which is mirror with two disks. when i am try to increase file system, it is throwing an ERROR: can not allocate 5083938 blocks, ERROR: can not able to run vxassist on this volume. Please find a sutable solutions. Thanks and Regards B. Nageswar... (0 Replies)
Discussion started by: nageswarb
0 Replies

4. SuSE

Remove disks from VGs in LVM

Hi, I have following set up on Open suse 11 vgdisplay pvdisplay lvdisplay I would like to remove these disks /dev/sdb and /dev/sdc from LVM and do not use them for anything.. Can anyone please help me with this ? (1 Reply)
Discussion started by: upengan78
1 Replies

5. Solaris

RAID manager or veritas volume manager

Can somebody kindly help me to determine which one i should choose to better manipulate OS volume. RAID manager or veritas volume manager? Any critical differences between those two? Thanks in advance. (5 Replies)
Discussion started by: beginningDBA
5 Replies

6. UNIX for Dummies Questions & Answers

VERITAS Volume Manager - mirror a disk/volume

I have a machine (5.10 Generic_142900-03 sun4u sparc SUNW,Sun-Fire-V210) that we are upgrading the storage and my task is to mirror what is already on the machine to the new disk. I have the disk, it is labeled and ready but I am not sure of the next steps to mirror the existing diskgroup and... (1 Reply)
Discussion started by: rookieuxixsa
1 Replies

7. Red Hat

Create volume using LVM over 2 physical disks

I wanted to know how we can combine volumes over 2 physical drives. # fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 ... (16 Replies)
Discussion started by: ikn3
16 Replies

8. Red Hat

Configure LVM to gain access to the data on disks

Hello friends, We had to upgrade RHEL 4.x to 5.7 so we took complete backup. Since DIRECT UPGRADE not possible, we rebuilt 5.7 from scratch. We had lvm configuration on DATA disks in previous OS and now we need to configure such that we should be able to have same old LVM configuration (like... (1 Reply)
Discussion started by: prvnrk
1 Replies

9. Solaris

Disks are not visible in Veritas Volume manager

Hi I have created a new setup for VCS for doing some testing on virtual box. After creating 3 Solaris 10 machine (147148-26) with VCS. Here I have used one machine as ISCSI Storage. VCS Version is bash-3.2# /opt/VRTS/bin/haclus -value EngineVersion 6.0.10.0 bash-3.2# bash-3.2# pkginfo... (4 Replies)
Discussion started by: hb00
4 Replies
FDFORMAT(8)						       System Administration						       FDFORMAT(8)

NAME
fdformat - low-level format a floppy disk SYNOPSIS
fdformat [options] device DESCRIPTION
fdformat does a low-level format on a floppy disk. device is usually one of the following (for floppy devices the major = 2, and the minor is shown for informational purposes only): /dev/fd0d360 (minor = 4) /dev/fd0h1200 (minor = 8) /dev/fd0D360 (minor = 12) /dev/fd0H360 (minor = 12) /dev/fd0D720 (minor = 16) /dev/fd0H720 (minor = 16) /dev/fd0h360 (minor = 20) /dev/fd0h720 (minor = 24) /dev/fd0H1440 (minor = 28) /dev/fd1d360 (minor = 5) /dev/fd1h1200 (minor = 9) /dev/fd1D360 (minor = 13) /dev/fd1H360 (minor = 13) /dev/fd1D720 (minor = 17) /dev/fd1H720 (minor = 17) /dev/fd1h360 (minor = 21) /dev/fd1h720 (minor = 25) /dev/fd1H1440 (minor = 29) The generic floppy devices, /dev/fd0 and /dev/fd1, will fail to work with fdformat when a non-standard format is being used, or if the for- mat has not been autodetected earlier. In this case, use setfdprm(8) to load the disk parameters. OPTIONS
-n, --no-verify Skip the verification that is normally performed after the formatting. -V, --version Output version information and exit. -h, --help Display help and exit. SEE ALSO
fd(4), setfdprm(8), mkfs(8), emkfs(8) AUTHOR
Werner Almesberger (almesber@nessie.cs.id.ethz.ch) AVAILABILITY
The fdformat command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux July 2011 FDFORMAT(8)
All times are GMT -4. The time now is 10:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy