[Gllug] moving system from one disc to another

Alain Williams addw at phcomp.co.uk
Wed Sep 1 10:19:55 UTC 2010


On Wed, Sep 01, 2010 at 10:35:10AM +0100, t.clarke wrote:

> One thing I have learned over the years I have been dealing with computers is
> that you never stoip learning !

Which is what makes it such a good field to work in.

> I was not aware of either resize2fs or dump  - most of my work being on a SCO
> Unix system.  The linux systems are mainly used as firewalls/mailservers/web-
> servers!
> 
> I use dd frequently to backup complete filesystems to spare partitions on
> another disc.  This is a great way of doing quick backups, as although dd has
> to copy the entire partition, it is vastly quicker than having to read though
> the directory heirarchy and write individual files to an archive or copy
> filesystem.  The image-copy filesystem on the other partition can then be backed
> up to tape at leisure.
> 
> With regard to resize2fs, am I correct in assuming that if a complete partition/
> filesystem is copied over to a larger partition using dd,  resize2fs can then
> be used to 'expand' the copied filesystem into the new partition?   If so,

Yes

> this would seem to be the optimum way of copying-over?

Hmmm, depends on the ratio of allocated/unallocated blocks on the disk.
I must confess that I would create a new file system and go ''cp -a''.
''dd'' will preserve inode numbers - which IIRC can be important on a SCO system,
but Linux s/ware doesn't have any 'magic' inode #s -- did not SCO use some for
licensing purposes ?

''dd'' is good for creating a snapshot of the RFS that can be restored to a new
disk and then the rest of the archives read in.

> Obviously the use of dd requires the filesystem to be unmounted  - necessitating
> a 'recovery disc' CDrom boot as already mentioned.
> 
> With regard to 'dump' it seems from the man page that one cannot restrict the
> archive to 'base' filesystem only (ie if / is the filesystem to be dumped
> anything mounted on it will also be archived).   So I guess this would also
> require a CDrom boot.

I dislike dump as a backup mechanism - the backup that it creates is dependent
on the file system that was backed up. I prefer to use something that is portable
(ie readable) on as many different machines as possible -- if you need to use it
then it is prob because the sh*t has hit the air conditioning and you may not
have a system similar to the one that you wrote it on.

> The creates everything need on the copy disc,  but is unbootable
> 
> I believe that:
> grub
> root (hd1,0)
> setup (hd1)    would create a grub MBR on the copy disc

What I do is as follows:
	# grub
	grub> device (hd0) /dev/sda
	grub> root (hd0,0)
	grub> setup (hd0)

If the /boot partition is mirrored but the whole disk is not, I repeat it with /dev/sdb (or whatever).

What I am trying to say is that if:
/dev/sda1 /dev/sdb1 go to make up /dev/md0 and /boot is mounted of /dev/md0
then the MBR will not be written.
I have not tried mirroring /dev/sda /dev/sdb to make /dev/md0 and then partitioning
that.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Past chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list