LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   resize_reiserfs question (https://www.linuxquestions.org/questions/linux-software-2/resize_reiserfs-question-149521/)

celeron2002 02-23-2004 08:55 AM

resize_reiserfs question
 
when i resize a partition, i am deleting the files of partition adjacent??

Rounan 02-23-2004 01:09 PM

I'm under the impression that you can only resize a partition into unallocated space - before you can make a partition bigger, you need to make adjacent partitions smaller - hopefully without data loss.

Resizing can be tricky - filesystems can be resized at the end, but not from the beginning. So if you have
|----hda1---|----hda2----|----hda3---|
and you want to make hda2 bigger, you need to make 1 or 3 smaller. If you make 1 smaller, that's easy. But then you have
|-hda1-|-empty-|----hda2---|----hda3----|
... and you need to move hda2 before you can make it bigger. The safest way to do this is if you can find enough free space on your drive to back it up: resize hda3, format a new hda4 and put everything from hda2 on the new partition.
|-hda1-|-empty-|-hda2-|-hda3-|-hda2backup-|
Then delete hda2 and create a new partition that uses all the empty space in the middle.
|-hda1-|---bighda2---|-hda3-|-hda2backup-|
Copy over from hda4, and then put hda3 back to normal.
|-hda1-|---bighda2---|-----hda3-----|

Please, correct me if I'm wrong!

--Rounan

EDIT: actually, if you can clear enough space from hda1 in the first step, just move hda2 in its entirety to the new empty space, then resize that partition. only one bigass file move, instead of two. ;)


All times are GMT -5. The time now is 05:20 AM.