1

Topic: Re-size [shrink] Reiser4 partition

Hello,
Reason I ask:
Q: Does the tool reiser4_shrink exist?
A: No,not to my knowledge.

It would be useful for a utility to allow Reiser4 partition size be shrunk
Im not experienced enough to write code manipulating meta data, but I can test.
I can supply feedback  and  would ask you questions along the way as well.

Reason I ask:

- use spare space for another partition after Reiser4 partition is shrunk.
- Utility useful. [with disk volumes increasing] may want to use/shrink,from a large space to a smaller space for Reiser4 partition.
- It allows unused space [on large volumes] to be used for other partition volumes.
- I can test to see shrink process works.
- I think some on the R4 mailing list an make use of this too.

  <reiserfs-devel@vger.kernel.org>

I can test on a Reiser4 volume [uses entire disk].
Only 43% is used so 1.8T [entire disk] - 747G [used] = 57% [free space]

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb 1.8T 747G 1.0T 43% /media/disk

So disk may have:

###.#..#..####.........

# = used blocks
. = free blocks


output example[Sample only]
---------------------------

# reiser4_shrink /dev/sdb

Details:
- Total blocks on Reiser4 volume[sdb] :488378640
- df -h  shows:

Filesystem Size Used Avail Use% Mounted on
/dev/sdb 1.8T 747G 1.0T 43% /media/disk

- Found reiser4 partition on [sdb]
- scan for free space             :found
- partition [sdb] unmounted       :yes
- Shrink  R4 partition size (n)   :yes
- Confirm R4 shrink    size (n)   :yes
- Reiser4 volume unmounted [sdb]  :yes
- Shrink Reiser4 on [sdb]         :done
- Shrink Reiser4 on [sdb]         :passed
- added 5% free space
- New Reiser4 volume size:1100.4 GB
- Time used 1h:05m

progress bar [0%..100%]

Thank you for your help on this.

I can compile-build source code on:build.opensuse.org

Cheers
--Glenn


Build jobs exists Architecture: i586

    _buildenv
    kernel-reiser4-4.7.0-4.2.i686.rpm
    kernel-reiser4-4.7.0-4.2.nosrc.rpm
    kernel-reiser4-debuginfo-4.7.0-4.2.i686.rpm
    kernel-reiser4-debugsource-4.7.0-4.2.i686.rpm
    kernel-reiser4-devel-4.7.0-4.2.i686.rpm
    rpmlint.log

Show Show used resources
Repository has been published Architecture: x86_64

    _buildenv
    kernel-reiser4-4.7.0-2.4.nosrc.rpm
    kernel-reiser4-4.7.0-2.4.x86_64.rpm
    kernel-reiser4-debuginfo-4.7.0-2.4.x86_64.rpm
    kernel-reiser4-debugsource-4.7.0-2.4.x86_64.rpm
    kernel-reiser4-devel-4.7.0-2.4.x86_64.rpm
    kernel-reiser4-devel-debuginfo-4.7.0-2.4.x86_64.rpm
    rpmlint.log
##
series.conf

    ###################################################
    #Reiser4fs Patches -Add to series.conf
    ###################################################
    patches.rpmify/reiser4-for-4.7.0.patch


may need reiser4progs

2

Re: Re-size [shrink] Reiser4 partition

GParted is a graphical front-end.  When the reiser4 file system developers provide a resizing tool it can be added to GParted.

Reference Bug 771580 - Allow resizing [shrink] of a reiser4 partition. where the current state of reiser4progs was examined.