LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I increase the size of a Reiserfs? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-increase-the-size-of-a-reiserfs-294654/)

lothario 02-25-2005 04:15 AM

How do I increase the size of a Reiserfs?
 
Consider this:

Quote:

root:# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hde3 2.4G 2.0G 433M 82% /

root:# fdisk /dev/hde

Command (m for help): p
Disk /dev/hde: 27.3 GB, 27373731840 bytes
16 heads, 63 sectors/track, 53040 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hde1 1 1939 977224+ 82 Linux swap
/dev/hde3 48444 53040 2316888 83 Linux
hde3 is actually a Reiserfs file system
hde3 is about 2.4G in size currently
hde3 is at the end of the hde disk
hde disk is 27.3G

As you can see there is plenty of space between hde1 and hde3.

I would like hde3 to be 10G in size
How can I do this?

Thanks.

prj 02-25-2005 04:55 AM

Simplest way without the hassle of actually resizing a partition is to create say "hde2" with the space and then mount it from a directory on hde3 or anywhere else you need it.
This would assume you dont need all 10GB for one file.

Somebody will probably have an easier way to actually resize.

Sepero 02-25-2005 06:46 AM

It is Impossible to enlarge it without free space after. The reason is because there are no tools in existance to move the front-end of a ReiserFS (or ext2, or ext3 for that matter).

What you must do to enlarge it is this:
1. Create a new partition in the middle (hde2?)
2. Copy the entire partition over

There has to be Free Space after the partition for you to be able to enlarge it.

lothario 02-25-2005 11:47 AM

ok, if I create a new Reiserfs partition in hde2 -
How do I move everything over from hde3?
What tools can move this?

And then when I reboot the system,
will anything complain about not being in hde3 any more?

Sepero 02-25-2005 07:10 PM

To copy everything, I would do this:
1. Create the new partition of the size I wanted on hde2
2. Create the filesystem on hde2
mkfs.reiserfs /dev/hde2
3. Mount the new filesystem
mount /dev/hde2 /mnt/<new_fs>
4. Use the command `cp -aR` to copy over all files
cp -aR /<old_fs> /mnt<new_fs>

Will it complain? Most likely yes.

To stop it from complaining, you will need to correct your bootloader(grub?) and /etc/fstab file.

lothario 02-27-2005 03:01 AM

Thanks. That helped.

Sepero 02-27-2005 08:07 PM

Glad I could help. Unfortunately, there appears to be very few people with partitioning knowledge on this forum.

(Either that, or they aren't very good at relaying the knowledge to others.)


All times are GMT -5. The time now is 05:40 PM.