LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2003, 07:12 PM   #1
gemini91
LQ Newbie
 
Registered: Nov 2003
Location: Naples Fl
Distribution: Gentoo,Ubuntu,Fedora
Posts: 10

Rep: Reputation: 0
Another resize ext3 problem


Hello all,
I'm trying to do something that I think should be easy, split the last partition on my harddrive into two pieces. I've done a lot of searching in forums etc. and there seems to be a lot of conflicting info. Anyway here is my partition table :

Partition Table for /dev/hda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flags
-- ------- -------- --------- ------ --------- ---------------------- ---------
1 Primary 0 7817039 63 7817040 Win95 FAT32 (0B) Boot (80)
2 Primary 7817040 8028719 0 211680 Linux (83) None (00)
3 Primary 8028720 15845759 0 7817040 Linux (83) None (00)
4 Primary 15845760 58605119 0 42759360 Extended (05) None (00)
5 Logical 15845760 16828559 63 982800 Linux swap (82) None (00)
6 Logical 16828560 58605119 63 41776560 Linux (83) None (00)


I want to take 10 gig away from hda6 and create another partition. Neither parted or qtparted (frontend) will do any resizing of ext3 partitions, so I ran tune2fs to remove the journal from hda6 and then qtparted would resize it. However when I tried that I recieved the following error "an error happen during ped_file_system_open call". Do I need to resize the filesystem before resizing the partition. Plus once I resize the filesystem does the partition need to be the same size or can it be a little bigger.

Thanks, Don
 
Old 12-07-2003, 03:55 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Don - This may turn out to be a dead end, but I suggest taking a look at BootIT NG, from http://www.terabyteunlimited.com/bootitng.html I've used it quite a bit while I was setting up my boxes. I consider it a good product and I know it can resize Windows partitions (do a defrag first to maximize the amount of contiguous space) and I suspect it may be able to do the same with ext3 partitions. To be honest though, I don't know, I'll admit I've never tried to do that.

Obviously one brute-force method would be to copy any important data in hda6 to somewhere else, drop the hda6 partition, recreate it and the (new) hda7 with the desired sizes, and then restore what you need back to hda6. Of course, whether or not this would be possible I think would depend on what you've assigned to hda6. If it's /home or /tmp, etc, you should be in good shape, if it's / then it might be a different story. I don't know if any of this will help but good luck with it. -- J.W.
 
Old 12-07-2003, 07:31 PM   #3
gemini91
LQ Newbie
 
Registered: Nov 2003
Location: Naples Fl
Distribution: Gentoo,Ubuntu,Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the reply J.W. Hda6 contains my Fedora system and hda3 gentoo. I don't think I have enough room to tar and bzip2 hda6 but I'll give it a try. I really don't want to lose that system and the time I have in it..
again many thanks...................Don
 
Old 12-07-2003, 08:14 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Don - one other alternative of course would be to install a second disk drive. These days storage is <$1 per gig, and with a modest outlay you could add another 40-100 G for only double digit dollars. If you've already invested a lot of time/effort into setting up your Fedora and Gentoo systems, perhaps you could justify spending (say) $80 and about half an hour of time putting in the second hard drive, rather than to spend hours and hours of time doing a complicated "Rubik's cube" type maneuver moving your OS's and files around on the single drive. I finally bit the bullet myself and bought a second hard drive, and it definitely simplifies backups, etc, by an order of magnitude. Just a thought -- J.W.
 
Old 12-08-2003, 07:30 AM   #5
gemini91
LQ Newbie
 
Registered: Nov 2003
Location: Naples Fl
Distribution: Gentoo,Ubuntu,Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
Again J.W. thanks for the idea, but the machine is an IBM A31 laptop and with an extra hard drive I wouldn't be able to carry it all over the house and out on the side porch and use it. Convience rules. Thanks again ....................... Don

However it would let me move the Fedora system, then I could repartition and move it back. I'll have to look into that as an option. Many thanks...........don

Last edited by gemini91; 12-08-2003 at 07:39 AM.
 
Old 12-08-2003, 07:53 AM   #6
gemini91
LQ Newbie
 
Registered: Nov 2003
Location: Naples Fl
Distribution: Gentoo,Ubuntu,Fedora
Posts: 10

Original Poster
Rep: Reputation: 0
J.W. the old saying can't see the forest for the trees applies. I have an old adaptec scsi pcmcia that I use to back up an old 755. Linux supports it just fine, so all I need is a bigger hard drive to stick on it, and that will solve my problem plus give me away to back up the machine Great idea! Thanks again ...............Don
 
Old 12-16-2003, 03:00 AM   #7
vincebs
Member
 
Registered: Oct 2003
Location: Mississauga, ON
Distribution: Ubuntu 9.04
Posts: 494

Rep: Reputation: 30
Are there any free utilities out there that can resize an ext3 partition?
 
Old 12-16-2003, 03:59 AM   #8
zib
LQ Newbie
 
Registered: Dec 2003
Distribution: MDK8.2
Posts: 14

Rep: Reputation: 0
In theory you should be fine resizing with the following method:

a) use tune2fs to remove the journal from your ext3 partition
b) Change the entry for that partition in /etc/fstab to reflect ext2
c) run mkinitrd in case you're using initrd
d) reboot
e) umount the partition
f) read man for resize2fs
g) use 'resize2fs /dev/device size' to resize the file system
h) read man for fdisk
i) use fdisk to resize the partition - but be careful so you don't make the partition smaller than the file system.
j) use tune2fs to add the journal to your ext2 partition
k) change the entry again for that partition in /etc/fstab to reflect ext3
l) reboot

This is, of course, all in theory - sometimes things go wrong.
Creating a back=up before, is prolly a good idea.

/j.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to resize a ext3 partition? towel401 Linux - General 3 10-14-2005 05:30 PM
Can't resize ext3 Partition crack Linux - General 2 09-04-2005 07:39 AM
using parted to resize ext3 (problem) carboncopy Slackware 3 10-09-2004 01:17 AM
Resize an EXT3 charris Linux - Hardware 3 06-23-2004 01:43 PM
need to resize ext3 filesystem clsonnt Linux - Newbie 2 07-09-2003 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration