[thechat] Linux partition help
Garrett Coakley
garrett at polytechnic.co.uk
Tue Jun 8 05:23:22 CDT 2004
On Tue, Jun 08, 2004 at 04:06:01PM +1000, Paul Cowan wrote:
> /home is a separate partition, so ideally I'd like to just move the data
> onto the new disk and then change /home from being /dev/hda3 to being
> /dev/hdb1 (or whatever).
The quick overview (these steps can result in data loss, so make
sure you have backups!)
0: You've got your backups right? Tested them? Good....
1: Power down and attach the new hard drive
2: Powerup and then format (/sbin/fdisk /dev/hd{whatever}) and create a
file system on the drive. 'mke2fs' is the main command, but depending on
the file system you want there may be a wrapper script for it. EG for an
ext3 filesystem the command on debian is mkfs.ext3
3: Mount the new drive somewhere temporary (mkdir /tmpdrv && mount
/dev/hd{whatever} /tmpdrv)
4: Copy across existing /home to the new drive. You'll want to use 'cp -p'
to preserve ownership and perms.
5: Edit /etc/fstab with an entry for your new drive. Mine looks like this:
[root at cincinnati root] # grep home /etc/fstab
/dev/hda3 /home ext3 defaults 0 2
6: Reboot, and you should be good to go.
> Then, if I can merge /dev/hda3 with /dev/hda2 (/usr), that would be
> wonderful.
Merging I don't think will be possible (not without setting up Logical
Volume Management, not sure if RH8 has it running or not), but you could
mount the old drive as /usr/local for example, depending on how much
space you have on it.
Some more URLs that might help:
http://www.pcworld.idg.com.au/index.php/id;171470406;fp;2;fpid;1039317049
http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/index.html
G.
--
------------------------------------------------------------------------
Work : http://www.gencon.co.uk & http://spiked.co.uk
Play : http://polytechnic.co.uk
Learn : http://evolt.org
More information about the thechat
mailing list