LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-08-2005, 10:45 AM   #1
mramos
LQ Newbie
 
Registered: Sep 2005
Posts: 14

Rep: Reputation: 0
Resize Partitions


Hi.

I need to increase one partition size and decrease another one, on a server with RH AS 2.1.

This server has two disks(c0d0 and c0d1), and involve partitions are in teh same disk (c0d1). I have seen that I have to do this using "parted" (in single mode user).

I have executed print command, and partitions looks like:

Minor Start End Type Filesystem Flags
1 0.016 6143.906 primary ext3 boot
2 6143.906 38911.406 primary ext3
3 38911.406 46079.296 primary ext3
4 46079.297 69459.609 extended lba
5 46079.312 51199.218 logical ext3
6 51199.234 54271.171 logical ext3
7 54271.188 57343.125 logical ext3
8 57343.141 60415.078 logical ext3
9 60415.094 62977.031 logical ext3

Ther is 6.5 GB free space on it.

The partiton that I have to increase is Minor=2 (I would like to increase it 4 GB), and Partition that I would like to decrease is Minor=7 (I have to decrease it 2 GB).

But I have some doubts abouts steps to execute:

1. Delete partitons from 3 to 9, using:
rm <minor_index>
2. Increase partition 2, with:
resize 2 6143.906 ????
How can I get this ???? value (because they are blocks).
3. Make again rest of partitons:
- Minor=3 -> mkpartfs primary ext3 ????+1 żżżżż
How can I get this żżżż value
- Minor=4 -> How can I make this extended partition?
- Rest:
mkpartfs logical ext3 <start_block> <stop_block>
4. Quit from parted.
5. Reboot the server.

Are that steps right?,

Can anybody tell me how can I calculate <stop_block> value?.

After I restart the server, all file systems are mounted?, or I have to mount them.

Any help will be well received.

Thanks.
 
Old 09-08-2005, 11:47 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you delete and recreate partitions, you *WILL* lose data. Your proposal would destroy all partitions from 3 up, and the filesystems on them. Read the limitations on parted's file system resizing capabilities here.
 
Old 09-12-2005, 04:37 AM   #3
mramos
LQ Newbie
 
Registered: Sep 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the information.

I know that if I delete and recreate the partitions, I will lost the informtation, but I was thinking on execute a backup of them before.

I was thinking diferent ways to do this, but it doesn't occurred to me it.

Has anybody knows another way to do this?.

Can anybody tell me if steps indicated are ok?.

Thanks.
 
Old 09-12-2005, 07:45 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you make a backup first, then you should be able to do what you described, then restore from the backup.
 
Old 09-12-2005, 09:32 AM   #5
mramos
LQ Newbie
 
Registered: Sep 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Unhappy

Thank you very much Matir.

I have some doubts unresolved:

1. Increase partition 2, with:
resize 2 6143.906 ????
How can I get this ???? value (because they are blocks).

2. Make again rest of partitons:
- Minor=3 -> mkpartfs primary ext3 ????+1 żżżżż
How can I get this żżżż value

3. Minor=4 -> How can I make this extended partition?


Can anybody tell me how can I calculate <stop_block> value? and how to created extended partition?.

After I restart the server, all file systems are mounted?, or I have to mount them.
 
  


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
Resize partitions in Ubuntu pgsmith Linux - Newbie 16 01-07-2007 10:29 AM
how do i resize my partitions?? PeO Linux - General 10 08-27-2004 04:54 AM
How to resize solaris partitions? subaruwrx Solaris / OpenSolaris 2 08-23-2004 05:55 AM
how to resize partitions with slack? marlor Slackware 2 07-27-2004 09:09 PM
resize partitions wolfe2554 Linux - General 1 07-05-2004 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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