Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
moving house: enlarging the root FS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nivw
Apprentice
Apprentice


Joined: 09 Nov 2005
Posts: 261

PostPosted: Wed Feb 01, 2006 4:52 pm    Post subject: moving house: enlarging the root FS Reply with quote

Hi,
I want to add 10G from a ext3 partiotin mounted as /home , to reser4 /
I have had bad expirince with repartioning using linux cfdisk as well as fdisk.
1. DID anyone here changed the partition table using fdisk then ran Partition magic - to discover all the disk appear in yellow = invalid partition table ?
2. I assume I can define the partitons in partition magic, thus avoid using fdisk, but then how may I enlarge the reiser4 partition ?
3. can I just attach a second disk , create a same size partition as / and copy
cp -rf /.* /sec_disk
it all over to the second disk , then repartition using PM?

Niv
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Wed Feb 01, 2006 5:46 pm    Post subject: Reply with quote

i'm not sure, but a reiserfs4 partition cannot be enlarged.
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
linuxtuxhellsinki
l33t
l33t


Joined: 15 Nov 2004
Posts: 700
Location: Hellsinki

PostPosted: Wed Feb 01, 2006 7:03 pm    Post subject: Reply with quote

I think that copying to the another disk and back is the best way, maybe something like
Code:
cp -ax /* /sec_disk/

Make it via LiveCD, cause then there's nothing changing on the disk. And you'd exclude some proc & tmp -dirs.

I wouldn't use PM to anything, there's also those graphical partition managers for Linux like gparted etc... :?
_________________
1st use 'Search' & lastly add [Solved] to
the subject of your first post in the thread.
Back to top
View user's profile Send private message
Sainted_Trousers
n00b
n00b


Joined: 27 Nov 2005
Posts: 42

PostPosted: Wed Feb 01, 2006 7:34 pm    Post subject: Reply with quote

It's been my experience that filesystems don't like to have their partitions changed. It's best to copy everything over to a spare
partition, as you suggested, and copy everything back over after re-partitioning (I would re-format, too - if there were any errors
in the filesytem before the re-partitioning, that would fix them). You should re-configure grub afterwards, if you don't have a se-
parate boot partition (and maybe even if you do) just to make sure. As for the copy command, I would use
Code:
cp -ax /* /sec_disk

The 'x' option needs some explanation. If you don't use it, then cp will dump a bunch of files into /sec_disk, and then try to
copy the contents of /sec_disk into itself, thus causing a catastrophic tear in subspace. So you'll have to manually copy each
partition separately into the appropriate subdirectories in /sec_disk. Then be prepared to re-install because your sacrifice was
not worthy.

I've never had fdisk do anything I didn't tell it to do (I've told it to do dumb things before), but I have heard bad things about
Partition Magic. Forget hearsay, though. I would trust fdisk before I'd trust Partition Magic just on general principles - it's
smaller, it does one thing very well, and the code is more mature. I prefer smaller, less complex software when I have a choice.
YMMV, of course.

EDIT: Hmm, hellsinki stole my thunder with the cp command.
Back to top
View user's profile Send private message
chris_andrew
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 291
Location: Wiltshire, UK

PostPosted: Thu Feb 02, 2006 1:14 pm    Post subject: Reply with quote

Does this help?

http://www.gentoo.org/doc/en/articles/partitioning-p1.xml

Cheers,

Chris.
Back to top
View user's profile Send private message
nivw
Apprentice
Apprentice


Joined: 09 Nov 2005
Posts: 261

PostPosted: Wed May 03, 2006 2:19 am    Post subject: Reply with quote

updated scenerio:
I boot off the / I want to move from hda7 -> hde5
if I run cp -ax / /mnt/backup
It is stuck at /proc somthing
can I exclude folders in this recursive copy?
Back to top
View user's profile Send private message
Rodent
Tux's lil' helper
Tux's lil' helper


Joined: 06 Sep 2003
Posts: 81
Location: Noblesville, Indiana

PostPosted: Wed May 03, 2006 10:31 am    Post subject: Reply with quote

Just a FYI for all who care.

To expanding a partition is trivial in linux. However if it goes south so does your data. There are a couple of popular options I will summarize. They both do the same thing.
1 - Use GNU parted
Code:
# parted /dev/hda
# resize

2 - Use the any partition tool and then have the FS expand or contract. Obviously reverse steps to go smaller.
Code:
# fdisk /dev/hda
- delete partition then remake it with the _same_ starting sector but new size -
# resize_reiserfs -s +10G /dev/hda


Hope that helps! And remember to RTFM before doing serious stuff like this.

as for your cp command it should work, however you could try
Code:
cp -a /bin /boot /dev /etc /home /lib /mnt /root /sbin /tmp /usr /var /mnt/backup
Back to top
View user's profile Send private message
nivw
Apprentice
Apprentice


Joined: 09 Nov 2005
Posts: 261

PostPosted: Wed May 03, 2006 12:12 pm    Post subject: Reply with quote

just for the record I did this:
Quote:
cp -avx /bin /dev /etc /home /lib /mnt /root /sbin /tmp /usr /var /backup /boot /data /opt /mnt/backup
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum