RSDEV=/dev/sda14
df /dev/sda14 51197536 37636660 13560876 74% /lfs/cache12
umount /lfs/cache12
$ reiserfsck --check $RSDEV reiserfsck 3.6.19 (2003 www.namesys.com) Reiserfs journal '/dev/sda14' in blocks [18..8211]: 0 transactions replayed Checking internal tree..finished Comparing bitmaps..finished Checking Semantic tree: finished No corruptions found
$ resize_reiserfs $RSDEV resize_reiserfs 3.6.19 (2003 www.namesys.com)
ReiserFS report: blocksize 4096 block count 19908528 (12799776) free blocks 10498754 (3390219) bitmap block count 608 (391)
Syncing..done resize_reiserfs: Resizing finished successfully.
!reiserfsck No corruptions found
mount /lfs/cache12
df | grep !$ /dev/sda14 79631676 37636660 41995016 48% /lfs/cache12
Necessary prepare:
RSDEV=/dev/sda15
% umount $RSDEV
% reiserfsck --check $RSDEV Will read-only check consistency of the filesystem on /dev/sda15 Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
Replaying journal..
Reiserfs journal '/dev/sda15' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Comparing bitmaps..finished
Checking Semantic tree:
finished
No corruptions found
There are on the filesystem:
Leaves 42697
Internal nodes 287
Directories 11326
Other files 147601
Data block pointers 11114762 (7469 of them are zero)
Safe links 0Resize reiserfs partition with gparted. First try to resize down just 10M.
% gparted &
$ fdisk -l | grep $RSDEV /dev/sda15 17417 24791 59239656 83 Linux
Yes, partition resized.
% mount $RSDEV % umount $RSDEV
Yes, mounting/unmounting don't have any problem.
% reiserfsck --scan-whole-partition --check $RSDEV
Everything tested OK. Redo the last steps to resize reiserfs partition to the desired size.
documented on: 2006.12.03
From resize_reiserfs' man page:
The following example shows how to test resize_reiserfs. Suppose 2Gb reiserfs filesystem is created on the device /dev/hda8 and is mounted on /mnt. For shrinking the device we need to unmount it first, then run resize_reiserfs with a size parameter (in this case -1Gb):
df umount /mnt resize_reiserfs -s -1G /dev/hda8 mount /dev/hda8 /mnt df /mnt