System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing ReiserFS on SUSE Ent 9

WayneKim
Frequent Advisor

Resizing ReiserFS on SUSE Ent 9

I am trying to resize/extend the file system on SUSE 9. The LUN is from HP EVA. Partitioner in YaST reads as follows:
/dev/sda 1.2TB HSV200 0 163176
/dev/sda1 999.9GB Linux native /u 0 130534
When I choose /dev/sda1 and click on Resize and try to take up the unused space, I get a "resize failed" error. Please help.
16 REPLIES
Ciro Iriarte
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

Are you using LVM?. If you're not, you should unmount the filesystem, delete the first partition and recreate it again with the new size. As a last step, run resize_reiserfs.

Obviously, this is all without warranty :D
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

I'm looking for a way to not have to delete the partition. Is it not possible to just claim the unused space and extend the existing file system?
GiTs_1
Occasional Visitor

Re: Resizing ReiserFS on SUSE Ent 9

Umount FS. Extend partition using EVA GUI.
Use parted from shell and extend partition table.
Use resize_reiserfs.
to extend FS.
Be Smart Use Linux http://gits.bg
Maaz
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

1, Umount the file system
2, extend the partition using EVA GUI.
3, to recognize the new(extension) size of disk, you have to reboot the OS (SLES 10)
4, after the system boots, now using fdisk/cfdisk/yast, you can see the new(extended) disk size

But 'df -hT' still shows the old(small) size.

5, now run the following command
# resize_reiserfs /dev/sda1

To verify, run "df -hT"

Regards
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

Am I doing the "resize" command while the file system is unmounted?
Ciro Iriarte
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

resize_reiserfs can be run online, the delete/create partition procedure doesn't delete the data (it's supposed to be safe, but you never know :D)...
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

"resize_reiserfs /dev/sda1" did not extend the file system. It still shows at 1TB and doesn't claim the 250GB unused space.

odsprismaserver:~ # df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/cciss/c0d0p2
reiserfs 5.1G 2.8G 2.3G 55% /
tmpfs tmpfs 1.7G 4.0K 1.7G 1% /dev/shm
/dev/cciss/c0d0p3
reiserfs 63G 3.1G 60G 5% /Prisma_Files
/dev/sda1 reiserfs 1000G 422G 578G 43% /u
odsprismarip:/var/db/forms
nfs 250G 13G 238G 5% /var/db/forms
odsprismaserver:~ # resize_reiserfs /dev/sda1
resize_reiserfs 3.6.19 (2003 www.namesys.com)



resize_reiserfs: On-line resizing finished successfully.

odsprismaserver:~ # df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/cciss/c0d0p2
reiserfs 5.1G 2.8G 2.3G 55% /
tmpfs tmpfs 1.7G 4.0K 1.7G 1% /dev/shm
/dev/cciss/c0d0p3
reiserfs 63G 3.1G 60G 5% /Prisma_Files
/dev/sda1 reiserfs 1000G 422G 578G 43% /u
odsprismarip:/var/db/forms
nfs 250G 13G 238G 5% /var/db/forms

Any idea??
Maaz
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

does the OS is at SP3 level(it should be at SP 4)
whats the output of 'SPident' ?
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

odsprismaserver:~ # SPident

CONCLUSION: System is up-to-date!
found SLES-9-i386-SP3 + "online updates"

The system is under certain requirements to support the application that it's running. I am not able to independently upgrade the SP level of the OS as it violates the SLA of the application's vendor. Is SP4 an absolute requirement for resizing to work?
Maaz
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

> Is SP4 an absolute requirement for resizing to work?
No.
as SP3 is also too old(I think it was released in 2006), So a lot many updates/features/fixes you are missing.
as you already performed the proper method of resizing, I suspect that it might be a issue/limitation of reiserfs module, that shipped with SLES 9 SP3.
If it is possible, try to upgrade only the "reiserfs" package from sles9 sp4.

Caution:
I havent upgrade the reiserfs(as suggested), so I take no responsibility ;(

GiTs_1
Occasional Visitor

Re: Resizing ReiserFS on SUSE Ent 9

Hello Again,

Having in main that we have random writes on mounted files structure it is better to unmount FS before resize.
What was output when you try to resize ?

Be Smart Use Linux http://gits.bg
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

The output is posted above. It basically told me resize was successful but df shows that the file system is still the same size.
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

Anyone else have any idea to my problem?

Thanks.
Mike Stroyan
Honored Contributor

Re: Resizing ReiserFS on SUSE Ent 9

Reading back through your earlier postings I don't see any statement that you managed to resize the partition. But you went on to trying to resize the filesystem anyway. You need to resize the partition with a tool like parted before you can resize the filesystem. It will not be able to make the filesystem larger than the size reported for /dev/sda1.
Try the parted command and see what you can do with its resize operation.
Ciro Iriarte
Valued Contributor

Re: Resizing ReiserFS on SUSE Ent 9

You can't just "reclaim" the free space as the filesystem lives on top of a partition.

Parted has a resize option:
http://www.gnu.org/software/parted/manual/html_mono/parted.html#SEC25

But I personally prefer the delete/create path, is faster (you don't have to calculate start and end).

Also, next time you can create the filesystem just on top of the LUN, without partitions.

Regards,
WayneKim
Frequent Advisor

Re: Resizing ReiserFS on SUSE Ent 9

Isn't the "Resize" option in Partitioner (in YaST) basically trying to do the samething as what you indicate "parted" would do? I don't understand what the difference is.

Below is the output of "parted /dev/sda1" :
odsprismaserver:~ # parted /dev/sda1
GNU Parted 1.6.21
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.

Using /dev/sda1
(parted) print
Disk geometry for /dev/sda1: 0.000-1023949.969 megabytes
Disk label type: loop
Minor Start End Filesystem Flags
1 0.000 1023949.969 reiserfs
(parted)

When using the resize option, how do I know what the end value is? Do I have to umount the filesystem prior to resizing? Sorry if these questions seem elementary as I am not familiar with this process.

Thanks.