resize btrfs filesystem

btrfs is funny – there is no resize2fs equivalent, but you need to

1) recreate the partitions with e.g. cfdisk

# cfdisk
- select partition
- delete partion
- create new partition on free space
- write (partition table)
- q (cannot re-read partition table)
# reboot
# df -h
/dev/sda3       4,2G  3,6G   63M  99% /

2) tell btrfs to use the partition’s space

# btrfs filesystem resize max /
# df -h
/dev/sda3       9,2G  3,6G  5,1G  42% /

This was a test vm for icinga package builds used locally only – I would not recommend doing that on production systems (nor use btrfs in production).

opensuse 12.2 upgrade fun with minimal pattern and btrfs

For local tests with Icinga and LConf as well as packing I do keep a local openSUSE VM. Which isn’t uptodate all the time, so I needed to do a dist upgrade from 12.2 to 12.3 these days.

While the official guide and a shorter howto did work fine for the repo disable/enable part, the system failed heavily during “zypper dup”. The root cause for that is the minimal pattern meta package which is automatically installed when selecting the minial install during setup to prevent yast from pulling more packages than required. Which is obviously bullshit anyways here.

Wipe the old minimal pattern install. It will conflict during “zypper dup” with an installed mta (and if exim is removed, postfix is pulled). Even further, it breaks udev transition.

linux-1ydz:~ # zypper dup
Achtung: Sie wollen eine Distributionsaktualisierung mit allen aktivierten Repositories durchführen. Bevor Sie weitermachen, sollten Sie sicherstellen, das diese Repositories kompatibel sind. Siehe 'man zypper' zu weiteren Informationen zu diesem Befehl.
Daten des Repositories laden ...
Installierte Pakete lesen ...
Distributionsaktualisierung berechnen ...
3 Probleme:
Problem: patterns-openSUSE-minimal_base-conflicts-12.3-7.10.1.x86_64 steht in Konflikt mit smtp_daemon, angeboten von postfix-2.9.6-1.2.1.x86_64
Problem: libgudev-1_0-0-195-13.11.1.x86_64 benötigt libudev1 = 195-13.11.1, was aber nicht angeboten werden kann
Problem: udev-195-13.29.1.x86_64 benötigt libudev1, was aber nicht angeboten werden kann

Problem: patterns-openSUSE-minimal_base-conflicts-12.3-7.10.1.x86_64 steht in Konflikt mit smtp_daemon, angeboten von postfix-2.9.6-1.2.1.x86_64
Lösung 1: veraltetes patterns-openSUSE-minimal_base-conflicts-12.2-5.5.1.x86_64 behalten
Lösung 2: Deinstallation von postfix-2.9.6-1.2.1.x86_64

Wählen Sie aus den obigen Lösungen mittels Nummer oder Sie (u)eberspringen, (w)iederholen oder (b)rechen ab. [1/2/u/w/b] (b):
# zypper rm patterns-openSUSE-minimal_base-conflicts

Bring 12.2 into shape

# zypper ar -c -n "openSUSE-12.2-Update" http://download.opensuse.org/update/12.2/ repo-update
# zypper up

Disable old repos for dist-upgrade.

zypper mr -adR

Add new 12.3 repos

zypper ar -n "openSUSE-12.3 OSS" http://download.opensuse.org/distribution/12.3/repo/oss/ repo-12.3-oss
zypper ar -n "openSUSE-12.3 Non-OSS" http://download.opensuse.org/distribution/12.3/repo/non-oss/ repo-12.3-non-oss
zypper ar -f -n "openSUSE-12.3 Updates OSS" http://download.opensuse.org/update/12.3/ repo-12.3-update-oss
zypper ar -f -n "openSUSE-12.3 Updates Non-OSS" http://download.opensuse.org/update/12.3-non-oss/ repo-12.3-update-non-oss

Upgrade the system.

zypper clean -a
zypper ref
zypper up
zypper dup

PS: When using btrfs as filesystem, cleanup your snapshots in order to have enough space available.

# snapper list
# for i in `seq 1 156`; do snapper delete $i; done