Mandriva

Return to the main archive index.

Custom Search

Mandriva Linux Archives: expert@mandrivalinux.org

Mandriva Linux: expert@mandrivalinux.org


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]


Le Lundi 31 Juillet 2006 02:39, Bill Mullen a écrit :
> On Sun, 30 Jul 2006 14:40:06 -0600, D. R. Evans wrote:
> > I am getting SMART errors from a drive, so I want to do the following:
> >
> > 1. Install a larger drive as hdb
> > 2. Duplicate hda (which is running Mandrake 9.2) on to hdb
> > 3. Take out hda (and throw it away) and move the drive that was hdb
> > into the hda slot.
> > 4. Boot and have *everything* work as if I had done nothing.
> >
> > Is there a way to do step 2?
> >
> > And for bonus points: what is that way? :-)
> >
> > As you can probably imagine, there's some urgency to this. Installing
> > brand new (more recent) OS on this machine is not very feasible,
> > because duplicating the behaviour (configuration, etc.) of all the
> > software would cause a lot more downtime; so I can do that only if
> > there is no way to perform the steps described above.
>
> Sure, it's doable; all you'll need, besides the new drive, is whichever
> LiveCD version of Linux is your favorite and will boot on that box. You
> could even do it with a MDK/V Install CD #1 booted to the rescue system,
> if that's all you have handy - even the 9.2 one would be fine for this.
> If it were me doing it, a MDK/V rescue system is exactly what I'd use;
> boots fast, no bloat, has what few commands we need for that stage.
>
> Okay, let's take this from the top.
>
> 0) Ignore paul's advice about using dd - you're right, it's not that
> easy. If the two drives were of identical sizes *and* you did it from a
> LiveCD, it'd probably work ... but they're not, so that way's out.
>
----------sniped-----------
> HTH!

Hum; I beg to differ; the dd command is working pretty well for that, even if 
the drives are of different size (provided the target drive is bigger); I did 
that several times without any problem.
The only glitches are 1/ you have some spare space at the end of the new 
drive; and 2/ if you boot with both drives in the machine you have a harmless 
warning about something like "duplicate disk ID".

Usually with MDV auto-partinionning /home is the last filesystem on the disk 
so it very easy to log in as root, tar the /home filesystem, unmount it then 
suppress the partition, recreate it with a bigger size mount and untar.

Nota: dd perform a physical copy (sectors) and even empty sectors are copyied 
so it may take a long time to do the copy.
I would change D.R.Evans command by adding a big bs size otherwise it may take 
forever to finish.
dd if=/dev/hda of=/dev/hdb conv=noerror,sync bs=1M
I have to admit I did that several times without the conv= parameter; will 
look at the man for that.


FWIW

JPB



Date Index | Thread Index

Looking for a job?



Advertisement (via La Vignette)