PDA

View Full Version : Resizing root-partition



mmarkows
25-Feb-2016, 09:05
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

ab
25-Feb-2016, 14:12
From the 'btrfs' manpage:



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...

malcolmlewis
25-Feb-2016, 14:26
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!

mmarkows
26-Feb-2016, 08:53
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

mmarkows
29-Feb-2016, 08:24
Hi
The existing patrition has 21 G used are approx 19.5 G
so its a problem
greetings michael

malcolmlewis
29-Feb-2016, 15:40
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;


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;


# 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;



/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;


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


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



zypper in btrfsmaintenance
btrfs fi usage /


This should clean up and recover lost space.

It should also have added a weekly cronjob to balance?


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!