LinuxQuestions.org
Help answer threads with 0 replies.
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 08-26-2004, 12:45 AM   #1
tsoona
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Rep: Reputation: 0
Change/split partition after installation


Hi there

I installed RH ES3 to a machine that have:
/dev/hda1 /boot ext3
/dev/hda2 / ext3
/dev/hda3 swap swap
(that kind of partition is quite fool but it was automatically selected by the RH installation - my mistake anyway)

and i attempt to change it to :
/dev/hda1 /boot ext3
/dev/hda2 / ext3
/dev/hda3 swap swap
/dev/hda4 /usr ext3
/dev/hda5 /home ext3
/dev/hda6 /var ext3

how this is possible without losing any data?

can i activate LVM (Logical Volume Managment) somehow?

I've knoppix 3.6 - maybe qtparted helps? how?
 
Old 08-26-2004, 04:12 AM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
qtparted can resize and possibly even move partitions provided they are not mounted (in use) You'd better make a back-up though and take it one step at a time. I've had a disasterous experience trying to do exactly that. I managed to ove and resize the partitions, but most of my files got corrupted.
 
Old 08-26-2004, 07:41 AM   #3
tsoona
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Original Poster
Rep: Reputation: 0
I try with rescuecd (systemrescuecd-x86-0.2.15) which have parted and it says:
#parted /dev/hda
>print (printing: /dev/hda2 1014.001 8505.200 ext2)
>resize 2 1014.001 5000
>No Implementation: This ext2 filesystem has a rather starange layout! Parted can’t resize this (yet).
why parted not support this?
Any suggestions?
 
Old 09-07-2004, 05:34 AM   #4
tsoona
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Original Poster
Rep: Reputation: 0
One conclusion

I answer to me

----------------
What i try without help:
I booted with knoppix 3.6 and
# tune2fs -O ^has_journal /dev/hda2
# e2fsck -f /dev/hda2
opened qtparted and tried to reduce the size
bu i got an error with "...ped_file_system_open..."
no luck
then i booted with RescueCd and
#parted
>print
>resize 2 xxxx 5000
>No Implementation: This ext2 filesystem has a rather strange layout! Parted can’t resize this (yet).
>quit
and find from internet that : "This is definitely not an ext3-specific issue because I converted the ext3 partitions to ext2 with tune2fs and parted did exactly the same thing."
----------------

But finally this worked (!/home):
i booted with RescueCd and
# tune2fs -O ^has_journal /dev/hda2
# e2fsck -f /dev/hda2
# run_qtparted (i checked the usage of /dev/hda2)
hda2: User space 2,18Gb/7,72Gb ext2
quit
<ctrl-alt-del>
rebooting bccd-2.2.0 (bccd has ext2resize 1.1.17)
# 4 quickboot
# ext2resize -d /dev/hda2 4000m
# exit
<ctrl-alt-del>
booting RescueCd
# fdisk /dev/hda
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Partition number (1-4): 2
First cylinder (39-784, default 39):
Using default value 39
Last cylinder or +size or +sizeM or +sizeK (39-784, default 784): +4500M
n
e
<defaults (rest)>
n
+2000M (for /usr)
n
defaults (rest for /var)
p (to verify: hda5 usr and hda6 var)
Command (m for help): w
# tune2fs -j /dev/hda2
# e2fsck -f /dev/hda2
<at this part i test that rh es3 starts without problems -> ok>
# mkfs -t ext3 /dev/hda5
# mkfs -t ext3 /dev/hda6
# e2label /dev/hda5 /usr
# e2label /dev/hda6 /var
# badblocks -v /dev/hda5
# badblocks -v /dev/hda6
# mkdir /mnt/hda2
# mount /dev/hda2 /mnt/hda2
# vim /mnt/hda2/etc/fstab
><insert> and added two lines:
>LABEL=/usr /var ext3 defaults 1 2
>LABEL=/var /var ext3 defaults 1 2
><esc>:wq
# mv /mnt/hda2/usr /mnt/hda2/oldusr
# mv /mnt/hda2/var /mnt/hda2/oldvar
# mkdir /mnt/hda2/var
# mkdir /mnt/hda2/usr
# mount /dev/hda5 /mnt/hda2/usr
# mount /dev/hda6 /mnt/hda2/var
# cd /mnt/hda2/oldusr; find . | cpio -dumpv /mnt/hda2/usr
# cd /mnt/hda2/oldvar; find . | cpio -dumpv /mnt/hda2/var
# rm -rf /mnt/hda2/oldusr
# rm -rf /mnt/hda2/oldvar
# umount /mnt/hda2/usr
# umount /mnt/hda2/var

and rebooting rh es3 -> ok.

This link helps me a lot: http://www.redhat.com/archives/fedor.../msg02379.html
 
  


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
Is there a need to split the key folders into different partition on 1 hdd? Swakoo Linux - Newbie 9 08-03-2005 04:46 PM
Change partition size after installation Swakoo Linux - Newbie 4 07-29-2005 02:37 AM
How to Split root partition Latext Linux - Software 1 01-30-2005 02:01 PM
Want to split a partition without data loss. Ebel Linux - Hardware 1 08-09-2004 11:56 PM
How to split ext3 partition sadeer Linux - Newbie 1 07-17-2002 10:38 PM

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

All times are GMT -5. The time now is 02:54 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
Open Source Consulting | Domain Registration