# Resizing root-partition

**URL:** <https://forums.suse.com/t/resizing-root-partition/27933>\
**Category:** SLED Configure-Administer\
**Created:** [February 25, 2016, 10:05am UTC](https://forums.suse.com/t/resizing-root-partition/27933 "2016-02-25T10:05:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmarkows](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mmarkows](https://forums.suse.com/u/mmarkows)\
**Post date:** [February 25, 2016, 10:05am UTC](https://forums.suse.com/t/resizing-root-partition/27933/1 "2016-02-25T10:05:08Z")

</div>

Hallo

I tried to resize my root-partition - Filesyetm is BTRFS OS SLE 12  
using the command btrfs filesystem resize max /  
result : no effect

Did I misunderstood the manual ?

greetings

Michael

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [February 25, 2016, 3:12pm UTC](https://forums.suse.com/t/resizing-root-partition/27933/2 "2016-02-25T15:12:26Z")

</div>

From the ‘btrfs’ manpage:

```auto
The resize command does not manipulate the size of underlying partition.
If you wish to enlarge/reduce a filesystem, you must make sure you can
expand the partition before enlarging the filesystem and shrink the
partition after reducing the size of
the filesystem. This can done using fdisk(8) or parted(8) to delete the
existing partition and recreate it with the new desired size. When
recreating the partition make sure to use the same starting disk cylinder
as before.
```

Is it safe to assume you have free space in your partition into which your  
filesystem can grow?

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [February 25, 2016, 3:26pm UTC](https://forums.suse.com/t/resizing-root-partition/27933/3 "2016-02-25T15:26:02Z")

</div>

> [@](#):
>
> On Thu 25 Feb 2016 08:14:01 AM CST, mmarkows wrote:
> 
> Hallo
> 
> I tried to resize my root-partition - Filesyetm is BTRFS OS SLE 12  
> using the command btrfs filesystem resize max /  
> result : no effect
> 
> Did I misunderstood the manual ?
> 
> greetings
> 
> Michael

Hi  
How big is the existing / or are you running out of space due to  
snapshot retention/maintenance, hence the need to resize?

If space, then first off configure the snapper config, second run the  
maintenance cron job.

–  
Cheers Malcolm Â°Â¿Â° LFCS, SUSE Knowledge Partner (Linux Counter #276890)  
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.51-60.25-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!

---

<div class="post-metadata">

**Author:** ![mmarkows](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mmarkows](https://forums.suse.com/u/mmarkows)\
**Post date:** [February 26, 2016, 9:53am UTC](https://forums.suse.com/t/resizing-root-partition/27933/4 "2016-02-26T09:53:10Z")

</div>

I deletd a 3,5 G - partition  
schould be enough  
If i use parted or fdisk will the existing root-partition deleted  
sound it demands a new installation  
greetings  
Michael

---

<div class="post-metadata">

**Author:** ![mmarkows](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mmarkows](https://forums.suse.com/u/mmarkows)\
**Post date:** [February 29, 2016, 9:24am UTC](https://forums.suse.com/t/resizing-root-partition/27933/5 "2016-02-29T09:24:09Z")

</div>

Hi  
The existing patrition has 21 G used are approx 19.5 G  
so itÂ´s a problem  
greetings michael

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [February 29, 2016, 4:40pm UTC](https://forums.suse.com/t/resizing-root-partition/27933/6 "2016-02-29T16:40:15Z")

</div>

> [@](#):
>
> On Mon 29 Feb 2016 07:34:01 AM CST, mmarkows wrote:
> 
> Hi  
> The existing patrition has 21 G used are approx 19.5 G  
> so it\_s a problem  
> greetings michael

Hi  
More than likely snapper snapshots filling it up…

How many snapshots present;

```auto
snapper list|awk 'NR > 3 { print }'|wc -l
```

If it \> 10, then you probably want to configure the settings  
in /etc/snapper/configs/root for;

```auto
# limit for number cleanup
NUMBER_MIN_AGE="1800"
-> NUMBER_LIMIT="4"
-> NUMBER_LIMIT_IMPORTANT="2"

# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
-> TIMELINE_LIMIT_HOURLY="4"
-> TIMELINE_LIMIT_DAILY="2"
-> TIMELINE_LIMIT_MONTHLY="1"
-> TIMELINE_LIMIT_YEARLY="1"
```

The above is what I normally run with a 40GB / with 20 it should be ok,  
but worth keeping an eye on it.

Then once configured for your requirements, manually run the daily cron  
job to clean up the snappshots;

```auto
/etc/cron.daily/suse.de-snapper

snapper list|awk 'NR > 3 { print }'|wc -l
```

The amount of snapshots should have decreased?

Now you need to clean up the btrfs filesystem;

```auto
/usr/share/btrfsmaintenance/btrfs-balance.sh
btrfs fi usage /
```

If the btrfs balance command isn’t found, then install and run the  
above commands;

```auto
zypper in btrfsmaintenance
btrfs fi usage /
```

This should clean up and recover lost space.

It should also have added a weekly cronjob to balance?

```auto
ls -la /etc/cron.weekly/btrfs-balance.sh
lrwxrwxrwx 1 root root 44 Feb 28 22:54 /etc/cron.weekly/btrfs-balance.sh -> /usr/share/btrfsmaintenance/btrfs-balance.sh
```

If not, create a softlink so it runs weekly.

–  
Cheers Malcolm Â°Â¿Â° LFCS, SUSE Knowledge Partner (Linux Counter #276890)  
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.53-60.30-default  
If you find this post helpful and are logged into the web interface,  
please show your appreciation and click on the star below… Thanks!
