View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 2 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Nov 24, 2006 11:17 am 
Offline
Joined: Fri Jan 21, 2005 9:14 am
Posts: 124
Location: New York
My Myth box contains two hard drives, 80 gig hda and 300 gig hdb. /dev/hda1 is my boot partition (R5C7) and the rest of hda plus all of hdb is the LVM group of 380 gb size which contains all of /myth.

The 80 gb boot drive is throwing errors so I want to replace it with a 250 gb drive. hdb has enough free space to hold all of /myth *and* all of the boot drive.

What I want to do is 1) force all of /myth to physically reside on the 300 gb hdb drive; 2) segregate the LVM such that the boot drive is on hda and /myth is on hdb as two standard non-LVM volumes; 3) back up the boot drive to hdb; 4) replace the failing 80 gb with a new 250; 5) restore the boot drive to hda1 using twice the original partition size; and finally 6) combine the rest of the free space on hda with hdb to create a new LVM volume containing all of /myth with a size of ~530 gb.

Is this doable and if so, what steps/precautions should I talk?

Should I be following these steps from the LVM howto:

http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html

TIA,
Russ


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 9:38 pm 
Offline
Joined: Mon Feb 20, 2006 7:58 pm
Posts: 6
You are on the right track, but there are a few things to keep in mind:

1) Before you change the LVM layout, you need to shrink the /myth file system to something small enough to fit comfortably on hdb. The LVM how-to you referenced has some examples of this, and there are more examples in the ext2 how-to. VERY IMPORTANT! Make sure you remove the journal option on the file system BEFORE resizing! Some things I saw said you could resize an ext3 file system safely, but the one time I tried it I spent three days in fsck hell.

2) Once you have the file system resized you can follow the LVM how-to to resize the LV holding the /myth file system, remove the hda4 PV from the volume group, and finally kick the hda4 partition out of LVM entirely. At this point you should have a completely functioning system with a smaller /myth filesystem. If you want, you can put the journal back now, but you're probably going to resize again before you are done...

3) Rather than trying to copy the install from the old drive, I would suggest doing a backup and shuting down, then replace the 80 gig drive with the 250 gig drive and doing an auto install. Once you have a functioning (but not necessarily configured) system on the 250 gig drive you can change /etc/fstab to mount the LVM volume as /myth instead of hda4, do a restore, and you should be in business. (The other advantage of this approach is that if things end up really hosed, you can shut down and swap the 80 gig drive back in temporarily, then try again later.)

4) After the restore is done and you are completely satisfied with your system you can add the hda4 partition of the 250 gig drive to LVM, expand the LV with /myth, then expand the filesystem, add back the journal, and you are finally done.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu