Fedora Linux Support Community & Resources Center
  #1  
Old 27th September 2006, 05:14 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Migrating FC5 Default Install to Larger Hard Drive

Greetings,

I've outgrown my 30gig IDE drive and wish to migrate my fully updated FC5 install to a 120gig drive, which would give me an additional 90gig.

I used the FC5 default installation so there's no custom part's or windows part's to worry about.

I was thinking this should be a simple matter but apparently not.

My first attempt involved installing FC5 (minimum install) from the install DVD to the 120gig. I then tried using Ghost for Linux (g4l) but the clone option (hdc-hda) resulted in the same size partitions that I started with. After cloning, I looked at the system under with the LVM (clear as mud) tool and it showed the remaining 90gig as unpartitioned and it included /root.

My 2nd attemp involved installing FC5 (minimum install) from the install DVD to the 120gig. I then tried using Ghost for Linux (g4l) and cloning only the 2 partitions (hdc1-hda1 & hdc2-hda2) but again, the clone option resulted in the same size partitions that I started with. After cloning, I looked at the system under with the LVM tool and I don't see the additional 90gig at all.

Frustration has set in.

This is what I ended up with after 2nd attempt...

Code:
[root@localhost ~]# fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14       14593   117113850   8e  Linux LVM

Disk /dev/dm-0: 29.3 GB, 29326573568 bytes
255 heads, 63 sectors/track, 3565 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
I simply want to clone my drive and extend the partitions to include the extra capacity of the new drive.

I'm sure you FC5 peeps must do this kind of thing all the time and would appreciate any assistance, hints or a link to a how-to.

Thanks!!

Last edited by gadgetwiz; 27th September 2006 at 05:30 AM.
Reply With Quote
  #2  
Old 27th September 2006, 06:38 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
Talking

warning: you should backup your files.
your will need a live-cd to do this.
in my case, i used ubunto live-cd.
if you don't have, please download and burn.

1. attach the 120gb hdd on your pc
2. boot to your current fc installation
3. write down the details of your /etc/fstab file on a piece of paper
4. backup your /etc/fstab file
#cp /etc/fstab /etc/fstab.bak
5. create a new linux partition on your 120gb hdd occupying the whole drive
#fdisk /dev/hdx
where x is your new drive letter e.g. hdb or hdc
6. format it to ext3 filesystem
#mkfs.ext3 /dev/hdxy
where y is the partition number
7. poweroff your system
8. put the live-cd on the drive and boot your system using it
9. make 2 directories e.g. /mnt/oldroot and /mnt/newroot
#mkdir /mnt/oldroot
#mkdir /mnt/newroot
10. mount the root partition(30gb) on /mnt/oldroot
11. mount the new root partion(120gb) on /mnt/newroot
12. go to /mnt/newroot
#cd /mnt/newroot
13. copy everything on the /mnt/oldroot to /mnt/newroot
#cp -pR /mnt/oldroot .
please take note on the 'dot' after oldroot
14. update the / details on your /etc/fstab file
e.g. /dev/hdxy / ext3 defaults 1 1
15. shutdown the live-cd system
16. boot your system using the new root partition

regards,
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^

Last edited by powereds; 27th September 2006 at 07:34 AM.
Reply With Quote
  #3  
Old 27th September 2006, 07:03 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
/etc/fstab on original install (30gig)

Code:
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot                        /boot                ext3    defaults        1 2
devpts                                 /dev/pts           devpts  gid=5,mode=620  0 0
tmpfs                                   /dev/shm          tmpfs   defaults        0 0
proc                                     /proc                proc    defaults        0 0
sysfs                                     /sys                 sysfs   defaults        0 0
/dev/VolGroup00/LogVol01  swap               swap    defaults        0 0
Ready to go with my 120gig.

Last edited by gadgetwiz; 27th September 2006 at 07:08 AM.
Reply With Quote
  #4  
Old 27th September 2006, 07:13 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
sorry i edited by first reply.

please run on terminal:
#df -h
and post.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^

Last edited by powereds; 27th September 2006 at 07:19 AM.
Reply With Quote
  #5  
Old 27th September 2006, 07:23 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
you can contact me using ym if you like.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^
Reply With Quote
  #6  
Old 27th September 2006, 07:25 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
df -h

Code:
/dev/mapper/VolGroup00-LogVol00
                       27G   18G  7.3G  72% /
/dev/hdc1       99M   15M   80M  16% /boot
tmpfs              125M     0  125M   0% /dev/shm
This will not affect the original 30g drive, correct?

Last edited by gadgetwiz; 27th September 2006 at 07:32 AM.
Reply With Quote
  #7  
Old 27th September 2006, 07:30 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
yes, it should not.
i've done this procedure last week but not on lvm partition.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^

Last edited by powereds; 27th September 2006 at 07:32 AM.
Reply With Quote
  #8  
Old 27th September 2006, 07:33 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Can I use recovery mode on the original FC5 DVD, rather than a live CD?

I have Mandriva Live CD..
Reply With Quote
  #9  
Old 27th September 2006, 07:38 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
i haven't tried using the recovery cd.
you can use mandriva-live as long as it will detect the hardwares needed.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^

Last edited by powereds; 27th September 2006 at 07:40 AM.
Reply With Quote
  #10  
Old 27th September 2006, 08:21 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Thanks for the step-by-step. I'll give it a try and report back.

Thanks again for your help.
Reply With Quote
  #11  
Old 27th September 2006, 08:39 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
no probs
i hope it will help you a little.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^
Reply With Quote
  #12  
Old 28th September 2006, 04:38 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Quote:
Originally Posted by powereds
8. put the live-cd on the drive and boot your system using it
9. make 2 directories e.g. /mnt/oldroot and /mnt/newroot
#mkdir /mnt/oldroot
#mkdir /mnt/newroot
10. mount the root partition(30gb) on /mnt/oldroot
11. mount the new root partion(120gb) on /mnt/newroot
Greetings,

I'm confused with this section of the step-by-step

On the 30gb drive I have 2 partitions

/dev/hdc1 - Boot of old drive (small)
/dev/hdc2 - Remainder of old drive

I also assume there is a swap area in there somewhere?

I can't seem to mount this drive. I get an error message that it doesn't know which file system?

What would be the command to mount this LVM drive using a live CD (Mandriva one)?

/dev/hda1 - Boot new drive (small)
/dev/hda2 - Remainder of new drive

Also, my assumption is that I should mount /dev/hdc2 on /mnt/oldroot and mount /dev/hda2 on /mnt/newroot. Then do the copy.

Is that correct?

Last edited by gadgetwiz; 28th September 2006 at 04:40 AM.
Reply With Quote
  #13  
Old 28th September 2006, 05:42 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Found these little tidbits..

Quote:

You can't mount a LVM physical volume, you must use the LVM tools to find and activate the logical volumes on the RAID, then mount the logical volumes.

vgscan --mknodes

vgchange -a y link

--------------------------------

To mount an LV in a VG
mount /dev/mapper/vgname-lvname /mnt/point

Before mounting the VG must be available.
vgchange -a y

However, the default install used VolGroup00 for the VG name.
So unless you changed it (s/b uniqueue for each install) you can NOT have 2 VG with the same name in the system.

You best course is to boot up with the bad drive and copy the /home data that you need to a CD.
Then boot up with the good drive and
cd /home/you
mkdir olddata
copy the data to /home/you/olddata

then cp files to the right place. link
According to what I'm reading, I can't even mount and move data from 2 FC5 default install drives because "you can NOT have 2 VG with the same name in the system."

That really sux.

I would think that migrating to larger drive would be something that everyone will eventually need to do without jumping through hoops. I'm not a fan of windows/ntfs, but this kind of thing is childs play using a utility like ghost.

Guess I'm screwed.

Does anyone have any suggestions or links as to how this accomplished in FC5?
Reply With Quote
  #14  
Old 29th September 2006, 07:55 AM
gadgetwiz Offline
Registered User
 
Join Date: Aug 2006
Posts: 517
Bump^^^^^^

So any help for the Gadget, peeps?
Reply With Quote
  #15  
Old 2nd October 2006, 02:33 AM
powereds Offline
Registered User
 
Join Date: May 2005
Location: /ph/bohol/talibon
Posts: 310
hi gadgetwiz.

8. put the live-cd on the drive and boot your system using it
this is now under the live os
you have to make directories and mount them under mandriva live so we can copy your old root partition(30gb)
in this procedure, i assume that your 120gb hdd is empty and you want to fully occupy it with your root partition

9. make 2 directories e.g. /mnt/oldroot and /mnt/newroot
#mkdir /mnt/oldroot <--this will become the source
#mkdir /mnt/newroot <--this is the target
10. mount the root partition(30gb) on /mnt/oldroot
11. mount the new root partion(120gb) on /mnt/newroot

you should mount this volume so you can copy the root partition inside this volume.
this is where your /home partition also resides.
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1 <--this is where your old root partition resides

Quote:
However, the default install used VolGroup00 for the VG name.
So unless you changed it (s/b uniqueue for each install) you can NOT have 2 VG with the same name in the system.
only one volume will be mounted(/dev/VolGroup00/LogVol00).
the procedure above tells you to create a custom linux partition.

Quote:
On the 30gb drive I have 2 partitions

/dev/hdc1 - Boot of old drive (small)
/dev/hdc2 - Remainder of old drive
i didn't mention of boot partition in the above-mentioned procedure. so don't touch it

your boot partition remains the same as well as your swap volume.
__________________
PowerEds
DCSE
Registered LinuxUser #395049


WAF :: Philippines
^

Last edited by powereds; 2nd October 2006 at 02:51 AM.
Reply With Quote
Reply

Tags
default, drive, fc5, hard, install, larger, migrating

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating to LVM with a hard drive upgrade MrJones Guides & Solutions (No Questions) 3 8th September 2008 03:08 PM
Replacing hda with larger drive pshepherd Using Fedora 2 3rd April 2007 03:13 PM
How to move a Fedora installation to a larger hard drive wizard Guides & Solutions (No Questions) 9 6th August 2006 05:43 PM
Default permissions for mounted second hard drive topazz Using Fedora 0 14th July 2004 04:45 PM


Current GMT-time: 06:44 (Tuesday, 02-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat