Bug 37781 - Separate partitions (/var, /tmp, /usr, ..) and /var space
Separate partitions (/var, /tmp, /usr, ..) and /var space
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCS Installer
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Philipp Hahn
Sönke Schwardt-Krummrich
:
Depends on: 37898
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-12 08:11 CET by Stefan Gohmann
Modified: 2015-08-06 18:08 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Evaluate partman recipes and show sizes graphically (3.28 KB, text/plain)
2015-04-10 12:05 CEST, Philipp Hahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2015-02-12 08:11:37 CET
The installation fails if I use a 10 GB hard drive, install the whole software and use the auto partition separation into /var /tmp/ usr /home etc.

root@master312:~# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg_ucs-root  3.7G  348M  3.2G  10% /
/dev/sda1                457M   48M  385M  11% /boot
/dev/mapper/vg_ucs-home  980M  1.3M  912M   1% /home
/dev/mapper/vg_ucs-tmp   101M   25M   69M  26% /tmp
/dev/mapper/vg_ucs-usr   3.7G  3.1G  397M  89% /usr
/dev/mapper/vg_ucs-var   579M  537M   88K 100% /var
tmpfs                   1006M     0 1006M   0% /dev
none                     202M   14M  188M   7% /run
root@master312:~#

Either we should increase the minimum size of /var or we should remove the partition separation from the installation menu.
Comment 1 Philipp Hahn univentionstaff 2015-02-27 16:26:40 CET
I did an install with separated /home /var /usr /boot with all components installed. Afterwards the following space war used:

# LANG=C df -h -T -x tmpfs -x devtmpfs -x rootfs
Filesystem              Type  Size  Used Avail Use% Mounted on
/dev/mapper/vg_ucs-root ext4  3.7G  348M  3.2G  10% /
/dev/vda1               ext2  457M   48M  385M  11% /boot
/dev/mapper/vg_ucs-home ext4  7.3G   17M  6.9G   1% /home
/dev/mapper/vg_ucs-tmp  ext4  360M  2.8M  335M   1% /tmp
/dev/mapper/vg_ucs-usr  ext4  3.7G  3.2G  385M  90% /usr
/dev/mapper/vg_ucs-var  ext4  2.7G  677M  1.9G  27% /var

r14421 | Bug #37781 d-i/partman: Minimum part size
 / = 2 GiB (/opt)
 /boot = ½ GiB
 /home = -1 remaining
 /usr = 4 GiB
 /var = 1 GiB

$ repo_admin.py --cherrypick -p partman-auto -r 4.0 --releasedest 4.0 --dest errata4.0-1

Package: partman-auto
Version: 106.6.201502271440
Branch: ucs_4.0-0
Scope: errata4.0-1

No YAML file as this requires a D-I & DVD re-build. Something for the Release notes:
 The UCS-4.0-1 DVD has been updates to include a fixed auto-partitioning schema, which guarantees enough space is available for the installation of all components when using separate partitions for /home, /usr, /var.


$ repo_admin.py --cherrypick -p debian-installer -r 4.0 --releasedest 4.0 --dest errata4.0-1
$ build-cd-ucs4 -r 4.0-1 -i /var/univention/buildsystem2/apt/ucs_4.0-0-errata4.0-1 -s errata4.0-1
  # <https://hutten.knut.univention.de/mediawiki/index.php/UCS-4.0_DVD_bauen>
  ucs_4.0-1-20150227-153526-dvd-amd64.iso


Please note that "univention-system-setup" should be checked, if it contains code which checks the free space before installing new software. The Debian package information contains the "Installed-Size" [KiB] <https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Installed-Size> information, which is required by the package. This information by itself is not enough when multiple partitions are used, as there is no detailed information about the required space per /opt, /usr, /var, and /.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2015-04-08 12:33:59 CEST
I did an installation on a 10 GB hard disk with separated /home /var /usr /boot with all components installed. The installation was successful and afterwards the following disk space was used:

# LANG=C df -h -T -x tmpfs -x devtmpfs -x rootfs
Filesystem                 Type  Size  Used Avail Use% Mounted on
/dev/disk/by-uuid/ca961…   ext4  1.9G  391M  1.4G  22% /
/dev/sda9                  ext4  2.3G  154M  2.0G   8% /home
/dev/sda8                  ext4  218M  2.1M  201M   2% /tmp
/dev/sda5                  ext4  3.7G  3.2G  381M  90% /usr
/dev/sda6                  ext4  1.3G  689M  516M  58% /var
Comment 3 Philipp Hahn univentionstaff 2015-04-08 15:46:46 CEST
r14570 | d-i/partman: Minimum part size
 Reduce minimum swap size to 96 MiB as 100% with 10 GiB RAM is too much.

The "atomic" recipe uses min="100% of RAM" for swap, which is too much if RAM=10 GiB but HD<16 GiB. Changes min=96 MiB as this is used by "home" and "multi" as well.
See <http://ftp.dc.volia.com/pub/debian/preseed/partman-auto-recipe.txt> for more details.

Package: partman-auto
Version: 106.7.201504081542
Branch: ucs_4.0-0
Scope: errata4.0-1

TBD: build-cd-ucs4 -r 4.0-1 ...
Comment 4 Stefan Gohmann univentionstaff 2015-04-09 09:01:13 CEST
We should also increase the space for / if /home is on a separate partition. A tester reported he used a 320 GB hard disk and the auto partition created

302,6GB for /home
  4,1GB for /
 12,8GB for swap
Comment 5 Stefan Gohmann univentionstaff 2015-04-09 09:05:19 CEST
(In reply to Stefan Gohmann from comment #4)
> We should also increase the space for / if /home is on a separate partition.
> A tester reported he used a 320 GB hard disk and the auto partition created
> 
> 302,6GB for /home
>   4,1GB for /
>  12,8GB for swap

And the installation got stuck because "no space left on /".
Comment 6 Philipp Hahn univentionstaff 2015-04-09 12:32:03 CEST
(In reply to Philipp Hahn from comment #1)
> $ repo_admin.py --cherrypick -p partman-auto -r 4.0 --releasedest 4.0 --dest
> errata4.0-1

The missing "-s errata4.0-0" lead to "0015-add-option-to-menu-dhcp-disabled.patch" being forgotten again. Copied manually: r14572

r14573 | Bug #37781 d-i: Fix recipe priority
 If priority < minimum_size -> factor:=0, so the partition never gets additional space allocated when the free space is allocated.
 <http://code.metager.de/source/xref/debian/installer/doc/devel/partman-auto-recipe.txt>
 | <limits>::=<minimal size>_<priority>_<maximal size>_<parted fs>

Package: partman-auto
Version: 106.8.201504091051
Branch: ucs_4.0-0
Scope: errata4.0-1

$ build-cd-ucs4 -r 4.0-1 -i /var/univention/buildsystem2/apt/ucs_4.0-0-errata4.0-1 -s errata4.0-1
...
debian-installer-images_20130613.459.20150409105433_amd64.tar.gz
...
ucs_4.0-1-20150409-105433-dvd-amd64.iso
...


(In reply to Stefan Gohmann from comment #5)
> > 302,6GB for /home
> >   4,1GB for /
> >  12,8GB for swap

HD=10G RAM=1G
 atomic: /=9G SWAP=450M /boot=510M
 home: /home=4.5G /=5.5G SWAP=240M /boot=510M
 multi: /=2½G SWAP=280M /tmp=155M /usr=4.5G /var=1.2G /boot=510M

HD=320G RAM=1G
 atomic: /=230G SWAP=2G /boot=512M
 home: /home=330G /=10G SWAP=2G /boot=512M
 multi: /=10G SWAP=2G /tmp=400M /usr=10G /var=10G /boot=512M
Comment 7 Philipp Hahn univentionstaff 2015-04-09 16:26:26 CEST
r14574 | Bug #37781 d-i: Fix recipe priority
 multi:
  Increase /usr and /var to 32 GiB max.
  Increase /tmp to 500% RAM max.

Package: partman-auto
Version: 106.9.201504091617
Branch: ucs_4.0-0
Scope: errata4.0-1

$ build-cd-ucs4 -r 4.0-1 -i /var/univention/buildsystem2/apt/ucs_4.0-0-errata4.0-1 -s errata4.0-1
...
/var/univention/buildsystem2/isotests/ucs_4.0-1-20150409-162001-dvd-amd64.log
Comment 8 Philipp Hahn univentionstaff 2015-04-10 08:55:45 CEST
(In reply to Philipp Hahn from comment #7)
> r14574 | Bug #37781 d-i: Fix recipe priority
>  multi:
>   Increase /usr and /var to 32 GiB max.
>   Increase /tmp to 500% RAM max.
> 
> Package: partman-auto
> Version: 106.9.201504091617
> Branch: ucs_4.0-0
> Scope: errata4.0-1
> 
> $ build-cd-ucs4 -r 4.0-1 -i
> /var/univention/buildsystem2/apt/ucs_4.0-0-errata4.0-1 -s errata4.0-1
> ...
> /var/univention/buildsystem2/isotests/ucs_4.0-1-20150409-162001-dvd-amd64.log

debian-installer-images_20130613.461.20150409225843_amd64.tar.gz
ucs_4.0-1-20150409-225843-dvd-amd64.iso

HD=10G RAM=1G
 multi: /=2.3G SWAP=300M /tmp=155M /usr=4.6G /var=1.5G /boot=510M
Comment 9 Philipp Hahn univentionstaff 2015-04-10 12:05:25 CEST
Created attachment 6816 [details]
Evaluate partman recipes and show sizes graphically

apt-get install gnuplot-qt
./37781_partman-calc recipe/home
Comment 10 Philipp Hahn univentionstaff 2015-04-10 12:08:30 CEST
r14575 | Bug #37781 d-i: Fix home recipe
 home:
  Increase /usr to 32 GiB max.

Package: partman-auto
Version: 106.10.201504101114
Branch: ucs_4.0-0
Scope: errata4.0-1

debian-installer-images_20130613.462.20150410113639_amd64.tar.gz
ucs_4.0-1-20150410-113639-dvd-amd64.iso
Comment 11 Sönke Schwardt-Krummrich univentionstaff 2015-04-14 11:12:54 CEST
Three recipes: multi, home, atomic
Current limits for the partitions are as shown below:

MULTI             MIN       MAX
================================
bios_grub/efi     512      1024
/boot             512      1024
/                2048     10000
/usr             4096     32000
/var             1024     32000
/tmp               50     500% RAM
/home             300     unlimited
SWAP               96     200% RAM

HOME              MIN       MAX
================================
bios_grub/efi     512      1024
/boot             512      1024
/                5120     32000
/home             100     unlimited
SWAP               96     200% RAM

ATOMIC            MIN       MAX
================================
bios_grub/efi     512      1024
/boot             512      1024
/                5120     unlimited
SWAP               96     200% RAM

Due to bug 37385 the installer and therefore the DVD had to be rebuilt:
omar:/var/univention/buildsystem2/isotests$ isoinfo -f -R -i \
    ucs_4.0-1-20150413-162143-dvd-amd64-CORE-EDITION.iso | grep partman-auto_
/amd64/partman-auto_106.10.201504101114_amd64.udeb


Testinstall MULTI disk=300G + LVM:
Dateisystem             Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                   9,1G    351M  8,3G    5% /
udev                      10M       0   10M    0% /dev
/dev/mapper/vg_ucs-root  9,1G    351M  8,3G    5% /
/dev/sda1                457M     48M  385M   11% /boot
/dev/mapper/vg_ucs-home  219G     60M  208G    1% /home
/dev/mapper/vg_ucs-tmp   6,1G     15M  5,7G    1% /tmp
/dev/mapper/vg_ucs-usr    30G    1,4G   27G    5% /usr
/dev/mapper/vg_ucs-var    30G    186M   28G    1% /var

Testinstall MULTI disk=100G + LVM:
Dateisystem             Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                   9,1G    351M  8,3G    5% /
/dev/mapper/vg_ucs-root  9,1G    351M  8,3G    5% /
/dev/sda1                457M     48M  385M   11% /boot
/dev/mapper/vg_ucs-home   39G     48M   37G    1% /home
/dev/mapper/vg_ucs-tmp   4,0G    8,4M  3,8G    1% /tmp
/dev/mapper/vg_ucs-usr    23G    1,4G   21G    7% /usr
/dev/mapper/vg_ucs-var    21G    186M   19G    1% /var

Testinstall MULTI disk=8G:
Dateisystem             Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                   2,0G    381M  1,5G   21% /
/dev/sda9                626M    664K  580M    1% /home
/dev/sda8                 79M    1,6M   71M    3% /tmp
/dev/sda5                3,9G    1,3G  2,4G   36% /usr
/dev/sda6                1,1G    143M  890M   14% /var

Testinstall ATOMIC disk=8G:
Dateisystem             Größe Benutzt Verf. Verw% Eingehängt auf
rootfs                   7,5G    1,9G  5,3G   26% /
/dev/disk/by-uuid/a5ea…  7,5G    1,9G  5,3G   26% /

Testinstall HOME disk=8G + LVM:
Filesystem               Size  Used Avail Use% Mounted on
rootfs                   5.7G  1.8G  3.6G  33% /
/dev/mapper/vg_ucs-root  5.7G  1.8G  3.6G  33% /
/dev/sda1                457M   48M  385M  11% /boot
/dev/mapper/vg_ucs-home  1.2G  1.8M  1.1G   1% /home

→ VERIFIED