LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2006, 12:46 PM   #1
Macky
LQ Newbie
 
Registered: Apr 2005
Location: Stockholm
Distribution: Slackware 10.2, 2.6.15 kernel
Posts: 28

Rep: Reputation: 15
Resize an ext3 partition safely


Hi, perhaps not entirely Slackware specific, but I am looking into resizing my home partition to gain more space.

Here is fdisk -l:

/dev/hda1 1 2107 15928888+ 5 Extended
/dev/hda5 1 4 30177 83 Linux
/dev/hda6 5 169 1247368+ 82 Linux swap
/dev/hda7 170 815 4883728+ 83 Linux
/dev/hda8 816 2107 9767488+ 83 Linux

Home partion is mounted on hda8, and I have a few gigs left of unallocated space after hda8 which I want to make use of now.

When I do a man resize2fs, they say ext2/ext3 partitions are resizeable, if I first use fdisk/cfdisk to delete and then recreate it with a larger size, under the constraint that I recreate the new partition at the same old start cylinder as before. When that is done, I can use the resize2fs command to resize the actual filesystem (which is still there on old hda8) to extend the whole new hda8.

But the big question now for me is, will this method destroy data on the partition? As far as I understand, it won't... I am aware of using copy & backups, and parted to recreate partions. But if this method above is supposed to work, it's pretty straightforward.

And this I should be able to do by booting from the Slackware install cd, and operate from there?

If anyone done it, please confirm if above method works, with data intact on the partition.

Thanks,

/Mack
 
Old 01-08-2006, 01:02 PM   #2
bobbens
Member
 
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Rep: Reputation: 30
I haven't done this myself, but technically if you destroy the partition and create a new one starting at the same cylinder, it won't erase the data as long as you don't format that drive again. So just delete the partition with fdisk or whatever and then create a new one starting at the same cylinder as the old one and give it the extra space you want to use. This should work, no reason it shouldn't, just don't blame me if it screws up .

If you are going to do it from your OS, you'll have to umount the partition before doing this to not damage anything, just in case I'd probably back up the most important files, as a general rule it's a good idea to have a back up anyways.
 
Old 01-08-2006, 01:46 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
The method works on a primary partition; I'm not sure what would happen on an extended (logical) partition. If you do go through with this, please post the outcome.
 
  


Reply



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
format reiserfs partition to ext3 safely chocloman Linux - Software 2 10-03-2005 04:14 PM
Can't resize ext3 Partition crack Linux - General 2 09-04-2005 07:39 AM
Ext3 Partition Resize nerotique Slackware 15 11-12-2004 04:44 PM
resize an ext3 partition with coexisting ntfs partition andy_g Linux - Newbie 1 02-03-2004 05:38 AM
safely, easily resizing ext3 partition Independence Linux - General 10 10-13-2002 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:18 AM.

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
Open Source Consulting | Domain Registration