Resizing Linux partition.

I’m running OES 2 SP3 on SUSE Linux Enterprise Server 10. SUSE has been installed into 10 GB partition and now only 1.3 CB free space left. Symantec Antivirus is running on this partition as well and it required additional 1 GB of space. I still have some upartitoned space on the server. Is there any way to expend Linux partition. Linux partition has ReiserFS.

Thank you.

The SUSE documentation is a good place to begin. :slight_smile:

If you go to https://www.suse.com/ and using the search box at the top right of the screen to search for “resize file system” you’ll find lots of hits. At the moment, links to many of the SLES10 HTTP references are broken (I’ve reported it). You can find the information you require from the PDF links. This is what the SLES11 docs say:

Hi vsurinovich,

I don’t have a SLES10 server at hand and have never had to repartition such a server - but many recent distros offer partition resizing tools, i.e. via a bootable live CD. That should work independently of the Linux version installed on the machine :).

If you’re likely to run into such situations more often, I’d recommend to set up LVM - that way, you can expand “partitions” (logical volumes) without rebooting the system, as long as there is enough physical disk space available. And if you’re low on that, add another disk or two (online, if your system supports it) and continue. Depending on the file systems used, you might be able to expand those to the new LV size even without having to un-mount them.

Resizing a ReiserFS has been covered by Kevin already.

Regards,
Jens

I need to expand partition: /dev/evms/lvm2/system/root (1GB for just to try)

I ran command:

servername# resize_reiserfs -s +1024M /dev/evms/lvm2/system/root

here is an output:

servername#resize_reiserfs 3.6.19 (2003 www.namesys.com)

/dev/evms/lvm2/system/root is of 2621440 blocks size only with reiserfs of 2621440 blocks
size on it. You are trying to expand reiserfs up to 2883584 blocks size.
You probably forgot to expand your partition size.

Hi vsurinovich,

servername# resize_reiserfs -s +1024M /dev/evms/lvm2/system/root

so you already are on LVM - so you need to expand the logical volume named /dev/evms/lvm2/system/root.

I haven’t had to fiddle with evms yet - isn’t there support for managing the EVMS parts within YaST? And I’m sure all that is described in the SLES10 docs (available online, my best guess would be the storage admin guide https://www.suse.com/documentation/sles10/pdfdoc/stor_evms/stor_evms.pdf), have you had a look?

Regards,
Jens

Yes, I did look Storage Admin Guide. I’ll write a little bit more information about my server and maybe someone can give me an advise. The server has three 450 GB SAS HDs (RAID5).Wnen I installed SUSE the OS assigned default value 14.9 GB for physical volume. I could not encrease this size during installation and I decided to that later. Then I installed OES2 on top, alocated about 600 GB for NSS volumes. Now I have over 200 GB unpartitioned space and I’d like to encrease default system volume. I tried to use both tools LVM and Partitioner, but neither one allowed me to resize system volume.

Vlad.

vsurinovich wrote:
[color=blue]

Yes, I did look Storage Admin Guide. I’ll write a little bit more
information about my server and maybe someone can give me an advise.
The server has three 450 GB SAS HDs (RAID5).Wnen I installed SUSE the
OS assigned default value 14.9 GB for physical volume. I could not
encrease this size during installation and I decided to that later.
Then I installed OES2 on top, alocated about 600 GB for NSS volumes.
Now I have over 200 GB unpartitioned space and I’d like to encrease
default system volume. I tried to use both tools LVM and Partitioner,
but neither one allowed me to resize system volume.

Vlad.[/color]

Hi Vlad,

You can’t expand the file system if it already uses all the avail space
on the partition (or logical volume). First, you have to make more
space available in your Logical Volume by expanding the LV, then
expand the file system.

Before you can expand your logical volume, you must have free space in
your Volume Group. If you do not have enough free space in the Volume
Group, you can add another physical volume to create additional free
space.

You said:
[color=blue]

SUSE has been installed into 10 GB partition and now only 1.3 CB free
space left.[/color]

and:
[color=blue]

I need to expand partition: /dev/evms/lvm2/system/root (1GB for just
to try)[/color]

Since root is a logical volume, /boot must be a separate partition, is
that correct? And swap too? If so, then that is three partitions you
have used out a maximum of four primary partitions.

You also said:
[color=blue]

Wnen I installed SUSE the OS assigned default value 14.9 GB for
physical volume.[/color]

and:
[color=blue]

Now I have over 200 GB unpartitioned space and I’d like to encrease
default system volume.[/color]

When you say “unpartitioned space”, that implies it is on an existing
disk. Is it? Or have you used your RAID management software to create
multiple Logical Volumes (LUNs) and that 200+ GB is still unallocated
space on the RAID array? I’m trying to understand just where that 200+
GB of free space is hiding before suggesting how to use it to expand
your root LVM.


Kevin Boyle - Knowledge Partner
If you find this post helpful and are using the web interface,
show your appreciation and click on the star below…

Hi Kevin,

I wish I can paste a screen shot of my SUSE server desktop in the forum’s interface, but I think it’s not an option.

Now, I’m using YasT LVM.

I have three devices:

/dev/mapper/sda3.1 599.9 GB
/dev/sda1 70.5 MB Linux native
/dev/sda2 14.9 GB Linux LVM

sda2 belongs to Volume group “system” (I need to expand it).
sda1 and sda3.1 did not belong to any volume group (blank).

Physical volume size: 14.9

I pressed “Add Volume” and physical volume size changed to 614.9 GB and device /dev/mapper/sda3.1 599.9 GB was added to Volume Group: system.

This is production server that’s why I did not apply changes yet. I want to make sure I can remove /dev/mapper/sda3.1 from Volume Group: system (if needed).

Seem like I can edit (increase logical volume group root up to max. size 612.9 GB) now.

I’m planing to add 100 GB to Volume: root. Is it right way to do that?

Vlad.

vsurinovich wrote:
[color=blue]

Hi Kevin,

I wish I can paste a screen shot of my SUSE server desktop in the
forum’s interface, but I think it’s not an option.

Now, I’m using YasT LVM.

I have three devices:

/dev/mapper/sda3.1 599.9 GB
/dev/sda1 70.5 MB Linux native
/dev/sda2 14.9 GB Linux LVM

sda2 belongs to Volume group “system” (I need to expand it).
sda1 and sda3.1 did not belong to any volume group (blank).

Physical volume size: 14.9

I pressed “Add Volume” and physical volume size changed to 614.9 GB
and device /dev/mapper/sda3.1 599.9 GB was added to Volume Group:
system.[/color]
That is correct. You have to “Add Volume” to create additional free
space in the Volume Group.

[color=blue]

This is production server that’s why I did not apply changes yet. I
want to make sure I can remove /dev/mapper/sda3.1 from Volume Group:
system (if needed).[/color]
You can only remove a device if it is not being used. Once you increase
the size of an existing LV and you need to use some of the free space
on this additional device, you will not be able to remove it.

[color=blue]

Seem like I can edit (increase logical volume group root up to max.
size 612.9 GB) now.[/color]
You can increase the size of an existing LV or create new LV’s as long
as there is free space in the Volume Group. You can increase an
existing LV to use all the free space if that is what you want.

[color=blue]

I’m planing to add 100 GB to Volume: root. Is it right way to do that?[/color]
That is one way to do it and probably the easiest. Another option would
be to create one or more new LV’s for /var, /home, or /opt, wherever
you see growth.

If the size of the root (/) is growing you should try to find out which
directories are growing. /var/log is where the log files are kept so it
will increase in size. /home is where user files are usually kept.

For example, if your /home directory is growing and you want to make
sure it doesn’t use up all the free space in your root directory,
create a new LV, move everything from /home to the new LV, then mount
the new LV at /home.

How you manage growth and your free space depends on how your server is
used. There is no one correct way to do it.
[color=blue]

Vlad.[/color]


Kevin Boyle - Knowledge Partner
If you find this post helpful and are using the web interface,
show your appreciation and click on the star below…