I know copy or move the data right!? Well the real problem is that I have my root, boot and grub boot on the multi-disk. I am hoping there is a tried and true way to move the current build to the new disk.
The new disk is already in the box and mounted at boot.
Can anyone perhaps give me a point to the right how-to or what not!?
Thanks in advance for your help.
Not a serious problem, I'd go about it as follows:
Step 1. Partition the new disk appropriately (this means creating a swap partitions, and however many data partitions you intend to use (normally I would go for seperate /, /boot, /usr, /var, /var/log, and /home partitions on a production machine).
Step 2. Boot into single user mode (very important, you do NOT want daemons updating files while you're copying them).
Step 3. Look at your /etc/fstab file, if it's structured (as per the Redhat installer) like:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
...
Then you are going to need to insure that your new filesystems have the correct labels, otherwise you won't be able to mount them when you switch to the 100gb disk.
For example if I were cloning the system whos fstab I quoted above and I wanted to create my new /home ext3 filesystem on what is currently /dev/hdc6 (the second part of the extended partition on my secondary master IDE drive) I would use the command:
mke2fs -jv -L "/home" /dev/hdc6
to ensure that when I'm booting up the startup scripts will recognize this filesystem as "/home" and mount it correctly.
Step 4. Copy the appropriate contents into each filesystem you created. The fastest and (AFAICT) most reliable way to do this is with the command "cp -avx" (the v is optional, but it lets you see what's going on). So for example I might do:
$ mke2fs -jv -L "/home" /dev/hdc6
$ mount -t auto /dev/hdc6 /mnt/newhome
$ cp -avx /home/. /mnt/newhome
$ umount /mnt/newhome
The only things to watch out for here are filesystems you don't want to copy. The "-x" option prevents copy from spanning filesystems, which helps a great deal (e.g. cp -avx /. /mnt/newroot won't attempt to copy your /proc filesystem), but it's important for you to know what not to copy. Specific things to watch out for:
Any place where /dev/shm is mounted (in particular Redhat likes to actually use /dev/shm as a mountpoint for some insane reason).
/dev/pts is a common mountpoint for the devpts filesystem (which I thing Redhat normally uses) that should not be copied.
/dev may be the mountpoint for the devfs filesystem (which is very nice, but I don't think that Redhat normally uses it, it breaks kudzu).
/proc is basically an interface for talking to the kernel and should certainly not be copied.
/proc/bus/usb is often the mount point of usbdevfs, but you shouldn't need to worry about it since you're not copying any part of /proc.
In most cases the -x switch will deal with things quite cleanly, e.g. "cp -avx /dev/. /mnt/newdev" copies all your device nodes but skips /dev/pts.
n.b. The "/dirname/." syntax is important. Two easy ways to screw this up would be:
1. cp -avx /dev /mnt/newdev would actually create all your devices in /mnt/newdev/dev instead of /mnt/newdev itself. This would mean that when you tried to boot from the new drive you'd have to access devices as "/dev/dev/whatever" which would confuse things no end (actually it probably just wouldn't boot).
2. cp -avx /dev/* /mnt/newdev is also wrong because the "*" wildcard is expanded by the shell before the arguments are passed to cp, so cp will get everything in /dev (including /dev/pts) as separate command line arguments and will copy everything (including attempting to copy /dev/pts).
Step 5: Make a boot disk (with mkbootdisk).
Step 6: Shut your system down and physically swap the hard disks.
Step 7: Boot up from your floppy, if all goes well your system should startup normally.
Step 8: Install your boot loader (typically grub or lilo) on your new disk. For lilo this just means running /sbin/lilo. For grub it's marginally more complex (see the grub docs for details). I find this a lot easier to do after swapping drives, but if you know what you're doing in the grub shell you should be able to do this instead of making a boot disk in step 5 and then skip steps 7 and 8 entirely.
Tada, you're done. Actually I think I spent more time writing this message than I did doing my last hard drive migration. . .
-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list