GNOME Bugzilla – Bug 771580
Allow resizing [shrink] of a reiser4 partition.
Last modified: 2017-03-19 15:56:20 UTC
Hello, Allow resizing [shrink] of a reiser4 partition. Thanks --Glenn Reason I ask: The reason I ask is 57% unused space on volume so [100% - 43% used = 57% unused] I can Test on a 1.8Tb disk , whole disk is reiser4 volume. - 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> - Frees up alot of the allowable space [ 1.8T - 747G used] - Are there any tools/code to resize a reiser4 volume ? - I can assist testing. 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] --------------------------- A command line test run may look like this: # reiser4_shrink /dev/sdb - Found reiser4 partition on [sdb] - partition [sdb] unmounted :yes - scan for unused space :found - able to shrink reiser4 partition :yes Details progress: - Shrink R4 partition size [sdb] [no]:yes - Confirm R4 shrink size [sdb] [no]:yes - Shrink Reiser4 on [sdb]:done - Shrink Reiser4 on [sdb]:passed - New Reiser4 volume size used space :1000.4 GB - Add 3% free space to Reiser4 on [sdb]:done - Free unallocated disk space on [sdb] nnnn GB - Time used 1h:05m progress bar [0%..100%] Thank you for your help on this.
Hi Glenn, I didn't find reiser4_shrink in resier4progs latest version 1.1.0. https://sourceforge.net/projects/reiser4/files/reiser4-utils/reiser4progs/ Does the tool reiser4_shrink exist? Where can it be found? Thanks, Mike
Hello, Q: Does the tool reiser4_shrink exist? A: No,not to my knowledge. I made inquires on: - http://www.spinics.net/lists/reiserfs-devel/maillist.html - http://www.spinics.net/lists/reiserfs-devel/msg05155.html - https://build.opensuse.org/package/show/home:jeff_mahoney:branches:filesystems/reiserfs other info: https://sourceforge.net/projects/reiser4/files/reiser4-for-linux-4.x/ 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 can make use of this too. http://www.spinics.net/lists/reiserfs-devel/ <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: https://build.opensuse.org Cheers --Glenn
GParted is a frontend to file system specific manipulation tools to perform tasks such as file system resizing. When there is a reiser4 resize tool please come back. In the mean time I am closing this as not a GParted bug. Mike
Another step: Found a copy resizefs.reiser4 See link http://rpm.pbone.net/index.php3/stat/4/idpl/3871122/dir/mandrake_10.x/com/reiser4progs-1.0.3-2.mdk10.1.thac.i586.rpm.html Content of RPM : . . /sbin/resizefs.reiser4 Source code: Total files number: 1 Site Filename Distribution File size ftp.pbone.net reiser4progs-1.0.3-2.mdk10.1.thac.src.rpm Mandrake 10.X 537189 ftp://ftp.pbone.net/mirror/www.mde.djura.org/10.1/SRPMS/reiser4progs-1.0.3-2.mdk10.1.thac.src.rpm
Found a way to unpack source. # rpm2cpio reiser4progs-1.0.3-2.mdk10.1.thac.src.rpm | cpio --extract --make-directories --verbose #seeing how it builds: https://build.opensuse.org/package/show/home:doiggl/reiser4progs
Looking at reiser4progs-1.0.3 from December 2004 ... This is what resizefs from 1.0.3 does: progs/resizefs/resizefs.c main() libreiser4/filesystem.c reiser4_fs_resize() libreiser4/tree.c reiser4_tree_resize() aal_error("Sorry, not implemented yet!") Latest reiser4progs-1.1.0 from August 2015 ... reiser4_tree_resize() still errors with "Sorry, not implemented yet!". So the developers have merely removed resizefs/* so that users don't think that there is a resize tool for reiser4 which doesn't exist.
Closing this bug report again as there is not tool to resize reiser4 file systems. Glenn, As the reiser4 developers haven't written the resize too in at least 12 years that you appear to desperately want; why don't you switch to ext4. (Backup, reformat and restore). It can be resized, is much better supported and much more widely used. Mike
*** Bug 779003 has been marked as a duplicate of this bug. ***
*** Bug 772387 has been marked as a duplicate of this bug. ***
Hello, I have an idea to allow shrinkage of a Reiser4 volume. Would you write a command line utility for it. I can assist testing on a reiser4 partition. I can use openSUSE Build Service to build application. The idea's,example: - ensure debugfs.reiser4 installed. [debugfs.reiser4] reiser4progs - check unmounted volume is a Reiser4 formatted partition. - find the last 'used block' on a unmounted Reiser4 partition [1] - check block number is greater than >0 and less than < the maximum block of reiser4 volume size. - print details of new volume, space unused. - ask to perform shrink reiser4 volume to nnn. - if 'y' do volume shrink. - verify volume details and print new details used/free, Reason I ask: Allow shrinkage of reiser4 volume to last 'used block' + [n blocks free] Since no reiser4 blocks moved, no reiser4 metadata changes needed. Just volume size changes [no blocks moved] [1] find the last 'used block'. # debugfs.reiser4 /dev/sdb2 --print-tree | grep -i "NODE" | grep -v "NPTR"| cut -d" " -f2 | sed 's/(//' | sed 's/)//' |sort -n |tail -1 Format release: 4.0.1 Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING. 2938354 other info: Total blocks used: ################# # debugfs.reiser4 /dev/sdb2 --print-tree | grep -i "NODE" | grep -v "NPTR"| cut -d" " -f2 | sed 's/(//' | sed 's/)//' |sort -n | wc -l debugfs.reiser4 1.1.0 Format release: 4.0.1 Copyright (C) 2001-2005 by Hans Reiser, licensing governed by reiser4progs/COPYING. 833657 Thanks --Glenn
> I have an idea to allow shrinkage of a Reiser4 volume. > Would you write a command line utility for it. In short, the answer is no. GParted's Mission Statement: The goal of GParted is to provide an easy way to graphically manage disk device partitions, without unintended loss of data, through the use of GNU libparted and other free software file system tools. We rely on other project code to work with file systems, we do not develop this code ourselves. As such this request remains closed. Curtis