d-i allocates all disk space to /home

Bug #1427160 reported by Jonathan Davies
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
partman-auto (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I have a series of compute nodes, where d-i with the regular partman recipe, has gone and allocated most of the disk space on the boxes to /home:

ubuntu@maas:~⟫ for i in $(seq 0 2); do juju ssh nova-compute/$i df -h; done
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.1G 3.1G 5.6G 36% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 378G 4.0K 378G 1% /dev
tmpfs 76G 1.0M 76G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 378G 0 378G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda6 80G 56M 75G 1% /home
Connection to compute01 closed.
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.1G 2.1G 6.6G 24% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 378G 4.0K 378G 1% /dev
tmpfs 76G 1008K 76G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 378G 0 378G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda6 80G 56M 75G 1% /home
Connection to compute03 closed.
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.1G 2.1G 6.6G 24% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 378G 4.0K 378G 1% /dev
tmpfs 76G 1008K 76G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 378G 0 378G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda6 80G 56M 75G 1% /home
Connection to compute02 closed.

I've booted a single m1.small instance in my cloud and see:

"Disk Usage: Used 20GB of 27GB "

...in horizon.

MAAS version: 1.5.4+bzr2294-0ubuntu1.3.

Tags: cts openstack
Revision history for this message
Jonathan Davies (jpds) wrote :

It looks fixable by adding:

d-i partman-auto/choose_recipe select atomic

...to the default preseed.

James Page (james-page)
tags: added: openstack
Revision history for this message
Andres Rodriguez (andreserl) wrote :

This is an strange issue for MAAS. MAAS has not changed the default preseed in a long long time.

MAAS does not do any custom partition nor creates a partition for the /home. MAAS takes the whole disk and puts the root partition. If this is happening, maybe there's a bug in partman, or you are using a custom partitioning preseed. Example partition mlayoute on a maas installed node:

ubuntu@hateful-robin:~$ sudo df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 240233144 3185492 224821392 2% /
none 4 0 4 0% /sys/fs/cgroup
udev 1011108 4 1011104 1% /dev
tmpfs 204932 504 204428 1% /run
none 5120 0 5120 0% /run/lock
none 1024656 0 1024656 0% /run/shm
none 102400 0 102400 0% /run/user

Changed in maas:
status: New → Incomplete
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Do we have any example preseeds?

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Machine deployed with Debian Installer and the default preseed:

ubuntu@node01:~$ sudo df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 7608792 1188780 6010464 17% /
none 4 0 4 0% /sys/fs/cgroup
udev 240040 4 240036 1% /dev
tmpfs 50180 380 49800 1% /run
none 5120 0 5120 0% /run/lock
none 250896 0 250896 0% /run/shm
none 102400 0 102400 0% /run/user

Revision history for this message
Kevin Metz (pertinent) wrote :

Example preseed for setting swap size with volume groups

# Partitioning
d-i partman/early_command string debconf-set partman-auto/disk `list-devices disk | head -n1`
d-i partman-iscsi/mainmenu string finish
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/new_vg_name string system
d-i partman-auto/expert_recipe string \
      test :: \
              285 10 286 ext4 \
                      $primary{ } $bootable{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext4 } \
                      mountpoint{ /boot } \
              . \
              11000 50 12000 ext4 \
                      $lvmok{} lv_name{ root } $defaultignore{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext4 } \
                      mountpoint{ / } \
              . \
             11000 15000 -1 ext4 \
                      $lvmok{} lv_name{ var } $defaultignore{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext4 } \
                      mountpoint{ /var } \
              . \

              4000 50000 4100 linux-swap \
                      $lvmok{ } lv_name{ swap_1 } $defaultignore{ } \
                      method{ swap } format{ } \
              .
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true

Revision history for this message
Jonathan Davies (jpds) wrote :

Just a quick note, Kevin's talking about a different environment.

Revision history for this message
Jonathan Davies (jpds) wrote :

I've provisioned a brand new compute node on the cluster I'm working on, and it came up with similiar partitioning, note that we have not done any customer partitioning in MAAS:

ubuntu@compute09:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.1G 1.3G 7.4G 15% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 378G 4.0K 378G 1% /dev
tmpfs 76G 996K 76G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 378G 0 378G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda6 80G 56M 75G 1% /home
ubuntu@compute09:~$ free -g
             total used free shared buffers cached
Mem: 755 5 750 0 0 0
-/+ buffers/cache: 4 750
Swap: 3 0 3
ubuntu@compute09:~$ sudo fdisk -l

Disk /dev/sda: 100.0 GB, 99994337280 bytes
255 heads, 63 sectors/track, 12156 cylinders, total 195301440 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk identifier: 0x0009f6a0

   Device Boot Start End Blocks Id System
/dev/sda1 * 512 19531263 9765376 83 Linux
/dev/sda2 19531774 195300863 87884545 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 19531776 26638847 3553536 82 Linux swap / Solaris
/dev/sda6 26639360 195300863 84330752 83 Linux

Revision history for this message
Jonathan Davies (jpds) wrote :
Download full text (4.2 KiB)

Preseed file taken from MAAS "View preseed" UI:

# MAAS - Ubuntu Server Installation
# * Minimal install
# * Cloud-init for bare-metal
# * Cloud-init preseed data

# Locale
d-i debian-installer/locale string en_US.UTF-8

# No splash
d-i debian-installer/splash boolean false

# Keyboard layout
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string

# Network configuration
d-i netcfg/get_nameservers string
d-i netcfg/get_ipaddress string
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string
d-i netcfg/confirm_static boolean true

# Local clock (set to UTC and use ntp)
d-i clock-setup/utc boolean true
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string ntp.ubuntu.com
d-i time/zone string Etc/UTC

# Partitioning
d-i partman/early_command string debconf-set partman-auto/disk `list-devices disk | head -n1`
d-i partman-iscsi/mainmenu string finish
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/default_filesystem string ext4

# Enable this if you want to override to a specific kernel, such as
# linux-generic-lts-saucy, but Debian Installer should pick the right one based
# on the boot kernel.
#d-i base-installer/kernel/image string linux-server

# User Setup
d-i passwd/root-login boolean false
d-i passwd/make-user boolean true
d-i passwd/user-fullname string ubuntu
d-i passwd/username string ubuntu
d-i passwd/user-password-crypted password !
d-i passwd/user-uid string
d-i user-setup/allow-password-weak boolean false
d-i user-setup/encrypt-home boolean false
d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare

# APT
d-i mirror/country string manual
d-i mirror/http/hostname string za.archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string http://maas-ip:8000/

# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
d-i debian-installer/allow_unauthenticated string false

# Lang
d-i pkgsel/language-packs multiselect en
d-i pkgsel/update-policy select none
d-i pkgsel/updatedb boolean true

# Boot-loader
d-i grub-installer/skip boolean false
d-i lilo-installer/skip boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/keep-consoles boolean false
d-i finish-install/reboot_in_progress note

# Eject cdrom
d-i cdrom-detect/eject boolean true
...

Read more...

Revision history for this message
Ante Karamatić (ivoks) wrote :

Uniqness of this machine is that it had a lot more RAM than disk. partman-auto couldn't deploy 'atomic' recipe and went with next one, which was 'home'. This can happen with regular d-i, without MAAS.

tags: added: cts
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in partman-auto (Ubuntu):
status: New → Confirmed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I see no immediate reason why things would fallback to the home recipe like this, default indeed seems like it should be atomic anyway. Furthermore, seeing as explicitly specifying atomic seems to fix it, I'm not sure what to think of this bug report. Please provide /var/log/installer/syslog and/or /var/log/installer/partman; maybe there will be something there mentioned by d-i to explain issues.

The behavior here certainly has nothing to do with the amount of RAM on the system, and atomic looks like it should be fine down to about 2GB size disks.

Changed in partman-auto (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Medium
Revision history for this message
Jonathan Davies (jpds) wrote :

IRC chat from the day we debugged this:

< cjwatson> It's clearly considering the atomic recipe ineligible for some reason.
< cjwatson> Probably because it thinks that its computed minimum size is greater than the free size.
< ivoks> how much memory do this machines have?
< ivoks> i suspect more than disk
< ivoks> maybe partman doesn't handle that very well
< cjwatson> I'm looking into that
< jpds> ivoks: 780GB.
< cjwatson> Odd alignment here. Seems to have put the first partition starting at 256KiB.
< cjwatson> Yeah that's going to be a problem
< cjwatson> The home recipe works because it has its minimum size set to 96 rather than 100% (of RAM)
< cjwatson> But because atomic has it set to 100%, it decides that it's too big to fit on the disk
< jpds> $ free -m: Mem total: 774023.
< cjwatson> As a quick solution I would suggest using an expert recipe

Revision history for this message
Jonathan Davies (jpds) wrote :
Revision history for this message
Jonathan Davies (jpds) wrote :
Changed in partman-auto (Ubuntu):
status: Incomplete → Triaged
Jonathan Davies (jpds)
summary: - MAAS allocates all disk space to /home (d-i installer)
+ d-i allocates all disk space to /home
Jonathan Davies (jpds)
Changed in maas:
status: Incomplete → Invalid
Revision history for this message
t-readyroc (t-readyroc) wrote :

I've just deployed a 16-node compute cluster via Foreman & experienced the same issue. Each of the nodes has a 20GB disk and 64GB memory. Here's the result (same as what's been reported above):

root@pn00:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.1G 4.0G 858M 83% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 32G 4.0K 32G 1% /dev
tmpfs 6.3G 396K 6.3G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 32G 0 32G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda6 14G 36M 13G 1% /home

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.