# Resizing Linux partition.

**URL:** <https://forums.suse.com/t/resizing-linux-partition/23179>\
**Category:** SLES Configure-Administer\
**Created:** [October 10, 2012, 8:55pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179 "2012-10-10T20:55:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsurinovich](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vsurinovich](https://forums.suse.com/u/vsurinovich)\
**Post date:** [October 10, 2012, 8:55pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/1 "2012-10-10T20:55:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KEVIN1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KEVIN1](https://forums.suse.com/u/KEVIN1)\
**Post date:** [October 10, 2012, 10:44pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/2 "2012-10-10T22:44:01Z")

</div>

The SUSE documentation is a good place to begin. 🙂

If you go to [https://www.suse.com/](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:

> [@](#):
>
> 5.3 Increasing the Size of a Reiser File System
> 
> A ReiserFS file system can be increased in size while mounted or unmounted.
> 
> [LIST]  
> [_] Open a terminal console, then log in as the root user or equivalent.  
> [_] Increase the size of the file system on the device called /dev/sda2, using one of the following methods:  
> [LIST]  
> [\*] To extend the file system size to the maximum available size of the device, enter
> 
> resize\_reiserfs /dev/sda2 When no size is specified, this increases the volume to the full size of the partition.  
> [\*] To extend the file system to a specific size, enter
> 
> resize\_reiserfs -s size /dev/sda2 Replace size with the desired size in bytes. You can also specify units on the value, such as 50000K (kilobytes), 250M (megabytes), or 2G (gigabytes). Alternatively, you can specify an increase to the current size by prefixing the value with a plus (+) sign. For example, the following command increases the size of the file system on /dev/sda2 by 500 MB:
> 
> resize\_reiserfs -s +500M /dev/sda2  
> [/LIST]
> 
> Wait until the resizing is completed before continuing.  
> [\*] If the file system is not mounted, mount it now.  
> For example, to mount an ReiserFS file system for device /dev/sda2 at mount point /home, enter
> 
> mount -t reiserfs /dev/sda2 /home  
> [\*] Check the effect of the resize on the mounted file system by entering
> 
> df -h The Disk Free (df) command shows the total size of the disk, the number of blocks used, and the number of blocks available on the file system. The -h option print sizes in human-readable format, such as 1K, 234M, or 2G.  
> [/LIST]

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [October 11, 2012, 6:04pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/3 "2012-10-11T18:04:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vsurinovich](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vsurinovich](https://forums.suse.com/u/vsurinovich)\
**Post date:** [October 12, 2012, 10:42pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/4 "2012-10-12T22:42:38Z")

</div>

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](http://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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [October 13, 2012, 12:54am UTC](https://forums.suse.com/t/resizing-linux-partition/23179/5 "2012-10-13T00:54:28Z")

</div>

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](https://www.suse.com/documentation/sles10/pdfdoc/stor_evms/stor_evms.pdf)), have you had a look?

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![vsurinovich](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vsurinovich](https://forums.suse.com/u/vsurinovich)\
**Post date:** [October 19, 2012, 11:19pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/6 "2012-10-19T23:19:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KEVIN1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KEVIN1](https://forums.suse.com/u/KEVIN1)\
**Post date:** [October 20, 2012, 1:13am UTC](https://forums.suse.com/t/resizing-linux-partition/23179/7 "2012-10-20T01:13:19Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![vsurinovich](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vsurinovich](https://forums.suse.com/u/vsurinovich)\
**Post date:** [October 24, 2012, 8:25pm UTC](https://forums.suse.com/t/resizing-linux-partition/23179/8 "2012-10-24T20:25:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KEVIN1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KEVIN1](https://forums.suse.com/u/KEVIN1)\
**Post date:** [October 25, 2012, 4:11am UTC](https://forums.suse.com/t/resizing-linux-partition/23179/9 "2012-10-25T04:11:09Z")

</div>

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…
