Re: [SLUG] upgrading my harddisk and filesystem

From: Russell Hires (rhires@earthlink.net)
Date: Wed Mar 17 2004 - 04:34:20 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello! Thanks Rob! The procedures listed below worked, pretty much. I've got a
few gotchas. First, make sure that one of the excludes is /mnt; if you don't,
then you'll get a copy of the copy of everything you're trying to copy. (A
little lesson in recursion, there :-)

Don't forget to change the fstab entries, either. For me, it was one for the
new drive/mount points, and the other for the filesystem.

At this point, my only glitch is convincing / to mount as rw, but it won't,
since the program to check the filesystem is e2fsck...I've tried tracing it
down the line, but it hasn't worked so far. What do I change to have my xfs
filesystem checked, instead of ext2?

Russell

> > So...pointers? Answers? Help?
> >
> > Russell
>
> As root of coarse ;-)
>
> # Make mount point
> mkdir /mnt/new_hd
>
> # Mount all the partitions together... replace ROOT, HOME etc. with the
> # proper device (e.g. /dev/hda1).
> mount -t xfs /dev/ROOT /mnt/new_hd
> mount -t xfs /dev/HOME /mnt/new_hd/home
> mount -t xfs /dev/USR /mnt/new_hd/usr
> mount -t xfs /dev/TMP /mnt/new_hd/tmp
> mount -t xfs /dev/VAR /mnt/new_hd/var
>
> # Use rsync to archive all the files onto the new HD. Add more
> # --exclude=/DIRif needed, one for each /DIR you want to exclude.
> # Use --dry-run to see what will be copied and remove it to do the actual
> # sync.
> rsync -av --progress --exclude=/proc --dry-run / /mnt/new_hd
>
> # Make the new /proc directory
> mkdir /mnt/new_hd/proc
>
> # OPTIONAL
> # If you want to copy the master boot record over to the new HD. Replace
> # OLD_HD and NEW_HD with the proper /dev (e.g. /dev/hda)
> dd if=/dev/OLD_HD of=/dev/NEW_HD bs=512 count=1
>
> # Unmount the new partitions
> umount /mnt/new_hd/var /mnt/new_hd/tmp /mnt/new_hd/usr \
> /mnt/new_hd/home /mnt/new_hd
>
> That should get you going.
>
> The optional master boot record copying above assumes that the /boot dir is
> on the same partition on both the old and new HD's and it looks like its in
> / so as long as / is on the same partition on both HD's you should be fine.
> (e.g. / == /dev/hda1 on both).
>
> The /etc/mtab will be rebuilt when you reboot. Only currently mounted file
> systems are listed in mtab.
>
> Hope that helps. Good luck.
>
> -- Rob
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS). Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.

- --
Linux -- the OS for the Renaissance Man
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAWBufAqKGrvVshJQRAk9UAJ9TI3kbCCh6HYMzLJmCuZgqm2a3cwCfVJzn
/nRH85vlZL+1/4E+RCmodeU=
=8aem
-----END PGP SIGNATURE-----

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:22:22 EDT