| PLEX86 | ||
|
changing logical ext3 parbreastion 1920
I apologize for ever On Mon, 24 Jul 2006 23:52:07 -0400, Les Walton Sorry, I forgot to include my original message. here it is. And for whatever it is worth I tried... You are going to need to do it with either a spare SCSI (or SATA) disk OR use a rescue CD (or 'Live' Linux CD). If you can boot up either a rescue or Live CD, you can use resize2fs to resize the root file system. *After* doing resize2fs ondev-sda1, you can use fdisk to update the parbreastion table. *BE VERY CAREFUL* note ALL of the number before and after and be very careful of what the new numbers will be. ONLY resize ONE parbreastion at a time. You can't 'move' a file system, so once you have shrunkdev-sda1, you have a big 'hole' in your parbreastioning. You are going to have to do backup-restores of all of the rest of the parbreastions, but you should be able to do that on the live system. buttuming a parbreastioning like (guessing): (1 cylinder = 8meg) Mount point parbreastion size start end dev-sda1 40gig (primary) 1 5121 dev-sda4 5gig (extended) 5251 5891home dev-sda7 5gig (logical) 5251 5891 And lets buttume the root file system only needs 6 gig (768 cylinders), I apologize for ever I sincerely apologize for posting the problems I have had with Linux to comp.os.linux.advocacy.I truly thought... buttuming a block size of 8192 you'll want to changedev-sda1 from 5242880 blocks to 786432, so doing (withdev-sda1 unmounted from a rescue or live disk): e2fsck -fdev-sda1 resize2fs dev-sda1 786432 e2fsck -fdev-sda1 The use fdisk to change the parbreastions to: parbreastion size start end dev-sda1 6gig (primary) 1 768 plus 1dev-sda2 1gig (primary) 770 898dev-sda4 39gig (extended) 899 5891 dev-sda6 34gig (logical) 899 5250 dev-sda7 5gig (logical) 5251 5891 (Note:dev-sda7 is *exactly* where it was!) Now you can mkfs.ext3 ondev-sda6, don't give it a label yet. And mkswap ondev-sda2. You can now reboot the system into single user mode (if you are using lilo, you might need to use the rescue disk to re-install lilo -- grub should be just fine). Once rebooted, you can use dump-restore to move what is ondev-sda7 (-home) todev-sda6: mkdirmnt-newhome mountdev-sda6mnt-newhome dump 0f -home (cdmnt-newhome;restore -rf -) And change thedev-sda6's label: e2labeldev-sda6home You can now unmountmnt-newhome andhome: umountmnt-newhome umounthome and use fdisk to change the parbreastion table to: dev-sda1 6gig (primary) 1 768 plus 1dev-sda2 1gig (primary) 770 898dev-sda4 39gig (extended) 899 5891 dev-sda7 39gig (logical) 899 5891 You now need to reboot (into single user mode). once up, you unmounthome and use resize2fs to grow it to fill the space: e2fsck -fdev-sda7 resize2fs dev-sda7 e2fsck -fdev-sda7 You should now be able to remounthome and boot up to full multiuser mode. This buttumes there are no other parbreastions. If there are additional parbreastions (other than a swap parbreastion and the extended parbreastion), you are going to have lots and lots more fun :-(. It is doable, but you need to be real careful and do things step-by-step. If it is possible to just backup and remake a file system from scratch, it might be easier to do so. Ifhome is presently empty (which is usually the case with a fresh install), you don't need to fuss with using resize2fs on it -- just trash it and remake it from scratch. Oh, the numbers I used are 'made up' -- I picked a cylinder size of 8meg more or less out of a hat and made up parbreastion and block sizes -- you will need to look at fdisk's output (fdisk -ldev-sda) and dumpe2fs output (dumpe2fs -hdev-sda1) closely and note the various important numbers down and do some careful calculations -- both the block size (from dumpe2fs) and the cylinder size (from fdisk) are important and will constrain your exact parbreastion sizes. -- Robert Heller -- 978-544-68 plus 133 Deepwoods Software -- Linux Installation and Administration
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||