Re: [Xen-users] How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
I think if you do this, you are only backing up the first 512 bytes of the
logical volume, not the MBR.
Someone correct me if I am wrong.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
On Thu, Nov 12, 2009 at 9:36 AM, Geert Janssens <info(a)kobaltwit.be> wrote:
> On Thursday 12 November 2009, Mr. Teo En Ming (Zhang Enming) wrote:
> > Hi All,
> >
> > I have several Xen virtual machines within logical volumes using LVM2. I
> > did not use disk images for performance reasons.
> >
> > Conventionally, if I want to clone my virtual machines, I have to dd the
> LV
> > to an image file. But this consumes a lot of time and harddisk space.
> >
> > So, instead of doing that, I want to use losetup and kpartx with my
> logical
> > volumes, which contain operating systems of virtual machines.
> >
> > I can backup the filesystems of a virtual machine in this way:
> >
> > # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
> >
> Are you sure you need to call losetup first ?
>
> I remember I used kpartx directly on the lvm containing my vbd.
>
> Also, I think you can treat the lvm based vbd as a real disk.
>
> So
> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
>
> should backup your mbr.
>
> Anyone correct me if I'm wrong please.
>
> Geert
>
> --
> Kobalt W.I.T.
> Web & Information Technology
> Brusselsesteenweg 152
> 1850 Grimbergen
>
> Tel : +32 479 339 655
> Email: info(a)kobaltwit.be
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users(a)lists.xensource.com
> http://lists.xensource.com/xen-users
>
14 years, 7 months
Re: [Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
Hi,
I don't think I will be using the LVM snapshot method. I will simply ensure
that my domU is not running, then I proceed to do the losetup and kpartx
procedure. Subsequently I will backup the MBR of my domU by dd-ing
/dev/loopX and clone all the filesystems of the domU using fsarchiver.
I would like to use fsarchiver because it can support LZMA compression. LZMA
can compress better than bzip2 and decompress 3x faster than bzip2.
partimage only supports gzip and bzip2.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
On Thu, Nov 12, 2009 at 10:02 AM, Fajar A. Nugraha <fajar(a)fajar.net> wrote:
> On Thu, Nov 12, 2009 at 4:52 PM, Mr. Teo En Ming (Zhang Enming)
> <space.time.universe(a)gmail.com> wrote:
> > Now I can proceed with writing the
> > backup and restore script for my Fedora 11 Dom0 (all partitions using
> LVM2
> > logical volumes) and all of my Xen virtual machines (contained in logical
> > volumes).
>
> A reminder though: don't forget to create a "consistent", unchanging
> version of domU storage before doing backup. Either by shutting down
> domU, or by creating LVM snapshot first.
>
> Also, if it comes to Windows domUs, I find ntfsclone is better than
> fsarchiver. One of the reasons is that fsarchiver can not create
> compressed files during restore.
>
> --
> Fajar
>
14 years, 7 months
Re: [Fedora-xen] How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
Thank you for your advice!
Is it called LVM snapshot?
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
2009/11/12 Veli-Pekka Kestilä <fedora(a)guagua.fi>
> Mr. Teo En Ming (Zhang Enming) wrote:
>
>> Hi All,
>>
>> I have several Xen virtual machines within logical volumes using LVM2. I
>> did not use disk images for performance reasons.
>>
>> # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
>> windows7-x64 is the logical volume.
>> # kpartx -av /dev/loop1
>>
>> Then I would see the partitions of the virtual machine within a logical
>> volume, like so:
>>
>> /dev/mapper/loop1p1
>> /dev/mapper/loop1p2
>> /dev/mapper/loop1p3
>>
>> Now that I can access the partitions of the virtual machine within a
>> logical volume, I can use partimage or fsarchiver to backup the partitions
>> (provided the filesystem is supported by the archiver).
>>
>> But the problem is that I can only backup/clone the filesystems of my
>> virtual machine within a logical volume. I can't backup the Master Boot
>> Record (MBR) of the virtual machine within a logical volume. For example,
>>
>> dd if=/dev/hda of=mbr.hda bs=512 count=1
>>
>> Because /dev/hda resides in a logical volume. The logical volume is a
>> virtual harddisk for my virtual machine.
>>
> You can do dd if=/dev/dev/loop1 of=mbr.dha bs=512 count=1 to make the copy
> of the boot block.
>
>
>> I would like to know how to backup and also restore the MBR of my virtual
>> machine/guest operating system/domU within a logical volume because the
>> losetup and kpartx procedure only allows me access to the partitions, not
>> the MBR. A complete backup of a virtual machine (and also a bare metal
>> machine) includes the MBR and all filesystems.
>>
>> If there is a catastrophic failure with my logical volumes containing
>> domUs, I would like to
>>
>> 1) re-create the physical volume (PV)
>>
>> 2) re-create the volume group
>>
>> 3) assign the PV to the volume group
>>
>> 4) restore the LVM metadata, i.e. the configuration files for all the
>> logical volumes
>>
>> 5) restore the MBR of my domU
>>
>> 6) restore the filesystems of my domU
>>
>> Of these steps you can recreate 1,2,3 and 4 just by keeping records of
> their parameters and using normal fdisk, pvcreate, vgcreate and lvcreate
> commands.
>
> For the things inside of lvm you can use losetup to make the loopback
> device out of the lv where you want to install the quest operating system
> and then recreate mbr from the file. Problem probably is how to recreate the
> filesystems if your backup software cannot do it. Also with windows
> protected system files can be a problem if backup software doesn't support
> them.
>
> One thing you could of course do is to make the system restore backup
> inside of the DomU when it's running. And then boot new DomU when starting
> up and use the system backup to restore. (of course this is still more work
> that pure dd from one place to another.)
>
> Problem is that everything else than using dd can have it fair share of
> problems. If the domU can't be offline too long, you could allocate more
> space and use the lvm:s instant cloning features (can't remember the name
> just now. ) and then use dd with gzip or bzip to make the backup from this
> clone to keep the space requirements minimum for the stored copies. And have
> minimum disruption for the DomU.
>
> -vpk
>
> --
> Fedora-xen mailing list
> Fedora-xen(a)redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-xen
>
14 years, 7 months
from whence comes java method "compressReader"?
by Robert P. J. Day
i'm not sure whether to categorize this as a java problem or jboss
problem or what, but here goes. i'm trying to build a sizable java
application that i downloaded, and i'm getting the build error:
[exec] [INFO] Compilation failure
[exec] /home/rpjday/nuxeo/hg/nuxeo/nuxeo-theme/nuxeo-theme-html/src/main/java/org/nuxeo/theme/html/JSUtils.java:[55,25] cannot find symbol
[exec] symbol : method compressReader(org.mozilla.javascript.tools.shell.Global,org.mozilla.javascript.Script,java.lang.String,java.lang.String,int,<nulltype>)
[exec] location: class org.mozilla.javascript.Context
so ... the "compressReader" method can't be found. here's the
relevant bits of the java file:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextAction;
...
public Object run(final Context cx) {
try {
final Script script = Main.loadScriptFromSource(cx, source,
"compress", 1, null);
here ---> return cx.compressReader(global, script, source, "compress", 1,
null);
this is being done on f12 beta, with openjdk 1.6.0. i'm about to go
dig into that class file, but if anyone out there is a java expert and
has used that class before, is there anything obviously wrong with
that method invocation? thanks.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
14 years, 7 months
OT: can't log in to https://bugzilla.redhat.com/
by Patrick O'Callaghan
I'm attempting to report a bug but suddenly BZ won't let me in. It
claims my password's expired but won't allow me to reset it. There
doesn't appear to be any way of setting a new password without entering
the old one, and though I am certain I remember the old pw (and Firefox
agrees with me) the page won't recognize it.
In fact I can't even get to the public pages on the server. Every
attempt just brings up the "reset your password" page.
Later:
I removed all bugzilla.redhat.com cookies from FF and tried again. Now I
can get to the BZ Home page, where I see my login details and a handy "I
forgot my password" button. However clicking on this brings up another
dialogue asking for a password in order to proceed!
WTF?
poc
14 years, 7 months
Re: Executing ImageMagick
by Jim
If it's a command line tool, then "imagemagick" isn't the execute
command, because it won't execute. What would the command be ?
And the ImageMagick RPM is installed.
14 years, 7 months
Re: Simple Network Question: Part 2
by Dennis Mattingly
>> So I finally think it's a hardware issue.
>>
>> Thanks for all the input.
>Routers normally have their own static addresses (different for
>different router companies) which allows you access their configuration
>interface.
Some network-admins at my job examined the router and it looks like a
hardware issue.
Not only did they confirm the LED lights are very dim, but they couldn't
detect the router using any hardware / OS / computer / network cable.
So thanks again all for your help.
I'll go to Microcenter soon and purchase a nice new LinkSys router.
I heard someone mention NFS and static-IP addresses.
So I'll start playing in that ballpark and see how far I can go.
14 years, 7 months