First, let me give thanks to all who gave me answers on my xcdroast issue.
This time I don't have a problem, more of a situation.
I currently run FC4 with 2-disk drives, a 80-gig and a 15-gig. I caught a great deal on a 300-gig drive and I want to swap out the 15-gig for the 300-gig. What's on the 15-gig scares me a little: /dev/hdc1 4031 1m blks /u03 - user data and database files /dev/hdc2 4031 1m blks /u02 - user data and database files /dev/hdc3 2023 1m blks swap /dev/hdc5 2023 1m blks /u04 - user data and database files /dev/hdc6 478 1m blks /opt /dev/hdc7 1490 1m blks /var /dev/hdc4 standard extended partition boundary that covers hdc5, hdc6, and hdc7
Is there a way to do this without having to reinstall FC4? Where can I find the documentation? Any thoughts would be appreciated.
Gene
Eugene Poole writes:
First, let me give thanks to all who gave me answers on my xcdroast issue.
This time I don't have a problem, more of a situation.
I currently run FC4 with 2-disk drives, a 80-gig and a 15-gig. I caught a great deal on a 300-gig drive and I want to swap out the 15-gig for the 300-gig. What's on the 15-gig scares me a little: /dev/hdc1 4031 1m blks /u03 - user data and database files /dev/hdc2 4031 1m blks /u02 - user data and database files /dev/hdc3 2023 1m blks swap /dev/hdc5 2023 1m blks /u04 - user data and database files /dev/hdc6 478 1m blks /opt /dev/hdc7 1490 1m blks /var /dev/hdc4 standard extended partition boundary that covers hdc5, hdc6, and hdc7
Is there a way to do this without having to reinstall FC4? Where can I find the documentation? Any thoughts would be appreciated.
Okee-dokee. Your boot hard drive is /dev/hda, and this is /dev/hdc.
So -- what's on /dev/hdb? Your CD/DVD? Ok, then you have /dev/hdd free, that's the slave on your second IDE bus.
Jumper your new drive as a slave, and hook it up to the same cable as /dev/hdc. Now, if after booting up you see both /dev/hdc and /dev/hdd, that's pretty much it. Use fdisk on /dev/hdd and create partitions on /dev/hdd that are more or less identical to your partitions on /dev/hdc. Of course, you'll probably want to make the new ones bigger.
Use mkfs.ext3 to format your new ext3 partitions. Use mkswap to initialize your new swap partition. Once all partitions are formatted, mount them somewhere. Create temporary directories in /mnt, for example, and mount your new partitions as /mnt/u03, /mnt/u02, etc… Then, just copy over the files, one partition at a time:
cd /u03 tar cf - . | (cd /mnt/u03 ; tar xvf -)
Lather, rinse, repeat, for each partition. Unmount everything, shut down, pull out your /dev/hdc, reconnect and rejumper the new drive as a master, and you're done.
The trickiest part here is really making sure your typing is careful. Take it easy with fdisk, and double-check your typing. One typo, one misplaced letter, and kiss your existing partitions good-bye. But, as long as you go slow, and double-check everything before hitting Enter, this shouldn't be difficult.
Eugene Poole wrote:
First, let me give thanks to all who gave me answers on my xcdroast issue.
This time I don't have a problem, more of a situation.
I currently run FC4 with 2-disk drives, a 80-gig and a 15-gig. I caught a great deal on a 300-gig drive and I want to swap out the 15-gig for the 300-gig. What's on the 15-gig scares me a little: /dev/hdc1 4031 1m blks /u03 - user data and database files /dev/hdc2 4031 1m blks /u02 - user data and database files /dev/hdc3 2023 1m blks swap /dev/hdc5 2023 1m blks /u04 - user data and database files /dev/hdc6 478 1m blks /opt /dev/hdc7 1490 1m blks /var /dev/hdc4 standard extended partition boundary that covers hdc5, hdc6, and hdc7
Is there a way to do this without having to reinstall FC4? Where can I find the documentation? Any thoughts would be appreciated.
Sure. First, install the disk as /dev/hdd, the secondary (slave) drive on the 2nd cable, s/b the middle plug. Do this while powered down, and reboot.
Then run 'fdisk /dev/hdd', and assign, but do not label, a set of partitions to match the above but with sufficiently different names that you can readily identify which partition (/dev/hdd7) is var2, and establish those in the /etc/fstab file using these names. Size them roughly in proportion to the /dev/hdc versions but scaled up (except for the swap and /var2, which need be no bigger than a gig for swap, and maybe 2 gigs for the second var2), using the space basicly to expand the user partitions. Exit fdisk with a w, and rerun it to verify the table, then quit it again. Then do the mke2fs on those partitions where its suitable, and a mkswap on the new /swap.
Now make new /mnt/hdd/$newnames entries to match the ones you added in /etc/fstab. Mount each of them to /dev/hdd/$newname, and concoct an rsync command line to copy each of the existing /dev/hdc partitions to the new ones on /mnt/hdd/$newname. I think, but don't take it as gospel, that rsync -avc /src/path /dest/path is a good starting point. This will take a while, and the users should be off-duty/locked out by some means while this is taking place.
Now, before the data changes in /var by more activity, edit /etc/fstab to remove the extra hdd entries with a comment, power down, remove hdc, and change hdd to be the master drive and on the end of the cable, effectively it will become /dev/hdc. When you power back up, it should just be there.
Gene