View previous topic :: View next topic |
Author |
Message |
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Wed Feb 01, 2006 4:52 pm Post subject: moving house: enlarging the root FS |
|
|
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 |
|
|
!equilibrium Bodhisattva
Joined: 06 Jun 2004 Posts: 2109 Location: MI/BG/LC
|
|
Back to top |
|
|
linuxtuxhellsinki l33t
Joined: 15 Nov 2004 Posts: 700 Location: Hellsinki
|
Posted: Wed Feb 01, 2006 7:03 pm Post subject: |
|
|
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 |
|
|
Sainted_Trousers n00b
Joined: 27 Nov 2005 Posts: 42
|
Posted: Wed Feb 01, 2006 7:34 pm Post subject: |
|
|
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 |
|
|
chris_andrew Apprentice
Joined: 19 Sep 2004 Posts: 291 Location: Wiltshire, UK
|
|
Back to top |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Wed May 03, 2006 2:19 am Post subject: |
|
|
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 |
|
|
Rodent Tux's lil' helper
Joined: 06 Sep 2003 Posts: 81 Location: Noblesville, Indiana
|
Posted: Wed May 03, 2006 10:31 am Post subject: |
|
|
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 |
|
|
nivw Apprentice
Joined: 09 Nov 2005 Posts: 261
|
Posted: Wed May 03, 2006 12:12 pm Post subject: |
|
|
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 |
|
|
|