LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-16-2009, 12:19 PM   #1
adomi
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Rep: Reputation: 0
Partition resizing.


Hello,

Am new on this forum and in Linux and this is my firts post. Here's the problem am posting for:

I was trying to resize a partition and I used the following steps:

1. I ran the following:
# tune2fs -O ^has_journal /dev/sda2
2. then I checked the file system:
# e2fsck -f /dev/sda2
3. Run:
# resize2fs -d 27 -p /dev/sda2 3G
4. Now run e2fsck again
# e2fsck -f /dev/sda2
5. Then I added my journal back:
# tune2fs -j /dev/hda3

when I run # df -h /dev/sda2, the size is well 3.0 Gig
Code:
[root@beretta ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.9G  1.9G  2.8G  41% /
none                  125M     0  125M   0% /dev/shm
/dev/sda2             3.0G   42M  2.8G   2% /oracle
/dev/sda4             6.3G   47M  5.9G   1% /orabd_files
/dev/hdc              694M  694M     0 100% /media/cdrecorder
[root@beretta ~]#

but when I used parted with the print option, the size seems to have not shrunk at all.

the result is as follows:

Code:
[root@beretta ~]# parted /dev/sda
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Using /dev/sda
(parted) print                                                            
Disk geometry for /dev/sda: 0.000-20480.000 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031   4996.779  primary   ext3        boot
2       4996.780  11499.653  primary   ext3        
3      11499.653  13499.934  primary   linux-swap  
4      13499.934  20002.807  primary   ext3        
(parted)


I am using RHEL4.

Any tips?

Tanks in advance.
 
Old 10-16-2009, 12:33 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hi adomi and wellcome to LQ,

you'll have to reboot your computer between repartitioning and creating a filesystem.

Markus
 
Old 10-19-2009, 03:32 AM   #3
adomi
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
Hi adomi and wellcome to LQ,

you'll have to reboot your computer between repartitioning and creating a filesystem.

Markus
I have already resized the partition by following the steps I described above. What are u exactely suggesting? Dropping that patition and doing the operation anew?
 
Old 10-19-2009, 03:53 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,533

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Quote:
Originally Posted by adomi View Post
I have already resized the partition by following the steps I described above.
No you didn't - you resized the filesystem. Not the partition - which is what parted is concerned with. The partition is the physical allocation on the disk. Generally a filesystem exists within that and uses all the space (of the partition) - but needn't. Tools such as Partition Magic adjust both so they seem the same. Linux has a similar tool - gparted; I'd suggest as a new user you use that for resizing, as it's much safer.
 
Old 10-20-2009, 12:39 PM   #5
adomi
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you Syg00 for your reply, particularly for the precisions you gave me regarding what I truly did. I'll try and download gparted and use it for my operation. Will let you how it went.
 
  


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
resizing a partition someone Awesome Linux - Software 6 05-20-2009 03:26 PM
resizing partition cherith.brook Linux - Newbie 4 09-23-2008 01:00 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 12:42 PM
Resizing Partition CarnageBox Linux - Newbie 1 12-11-2004 01:34 AM
need help resizing an ext3 partition with an underlying partition... spiroth10 Linux - Software 1 07-30-2004 12:21 PM


All times are GMT -5. The time now is 11:18 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