Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Put back ZoL stuff.
+ RAID-Z3 is availible on Linux.
+ Use 'zfs create -p' to simplify code.
+ Linux don't have a problem with having multiple devices (mirror,
  raidzX etc) on either the /boot or /lib/modules etc, so just skip
  and we're done.
+ Change "{Free,Used} physical volumes" to "... devices' which is more correct.
+ Hack for linux - remove ' free #X' from the device list line.
  => Don't know where that came from though...
+ Make post-base-installer.d/60partman-zfs executable.
+ Put the linux check before the get_zfs_root_boot() call.
+ No cache file on linux.
  => If Linux, create a v28 pool for now. ZoL is using LZ4 to compress
     the meta data, but grub does not (yet!) understand this so it will
     bail out to a rescue shell with:
      error: compression algorithm 143 not supported
+ Double check to make sure we don't have FS created in fs_create()
  already on separate partition. Such as having /boot on separate
  partition/outside the ZFS pool.
+ The /boot/zfs directory is needed when creating an initrd.
+ Build and install 'genhostid' from Red Hat, to create a /etc/hostid.
  + Execute it just before loading the module.
+ Move (and fix) the stuff in post-base-installer.d/60partman-zfs to
  finish.d/aptinstall_zfs.
+ Put back a simpler version of post-base-installer.d/60partman-zfs
  which only copies /boot/zfs and /etc/hostid if they exists.
+ Only setup features to enable if not Linux.
  => Linux must use zfs-fuse for the initial pool/fs creation and that
     does not support [any] featues.
+ Supply pv_prepare() with a third option - the real path to device.
  Use this (on Linux) to see if we want to use full device or partition..
+ Create /home at the top of the pool instead of below the root fs.
  => Simplifies recursive snapshotting (/home should not be used when
     booting from a snapshot).
+ Create filesystems with '-o canmount=noauto' and then set mountpoint.
  => This because partman unmounts all filesystems on /target before
     starting the install.
  => Need to mount them all in mount.d/zfs, which is only called with
     the root fs.
  => Because of zfs-fuse, we must use 'zfs mount' to mount a Z fs.
+ Simplify get_lv_value().

Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
  • Loading branch information
FransUrbo committed Apr 18, 2015
1 parent e6a048b commit 77002ed
Show file tree
Hide file tree
Showing 90 changed files with 415 additions and 214 deletions.
9 changes: 8 additions & 1 deletion check.d/no_zfs_boot
Expand Up @@ -33,8 +33,15 @@ get_zfs_root_boot () {
esac
done
}
eval "$(get_zfs_root_boot)"

# For Linux, we're all good..
if [ "$(udpkg --print-os)" = linux ]; then
db_set partman/confirm_nochanges true
db_fset partman/confirm_nochanges seen true || true
exit 0
fi

eval "$(get_zfs_root_boot)"

if [ "$boot_st" = bad ]; then
db_subst partman-bad/multipv_other MNT "/boot"
Expand Down
13 changes: 12 additions & 1 deletion choose_partition/zfs/do_option
Expand Up @@ -98,6 +98,10 @@ do_vg_create() {
IFS="$NL"
for line in $(pv_list_allowed_free); do
restore_ifs
# Hack for Linux - remove ' free #X'.
# => line='/var/lib/partman/devices/=dev=sda 32256-8589934591 8589902336 /dev/sda free #1'
# No idea where it comes from though...
[ "$(udpkg --print-os)" = linux ] && line=${line%% free *}
local dev="${line%%$TAB*}"
line="${line#*$TAB}"
local id="${line%%$TAB*}"
Expand Down Expand Up @@ -193,6 +197,12 @@ do_vg_create() {
#if [ "$numdev" -ge 5 ]; then
# choices="${choices}, 3"
#fi
if [ "$(udpkg --print-os)" = linux ]; then
# Is availible on Linux though...
if [ "$numdev" -ge 5 ]; then
choices="${choices}, 3"
fi
fi
db_subst partman-zfs/vgcreate_raidz_parity RAIDZ_PARITY "${choices}"
db_input critical partman-zfs/vgcreate_raidz_parity
db_go || return
Expand All @@ -213,7 +223,7 @@ do_vg_create() {
if [ "${line%%$TAB*}" = "$pv" ]; then
local devid="${line#*$TAB}"
local path
if path="$(pv_prepare "${devid%//*}" "${devid#*//}")"; then
if path="$(pv_prepare "${devid%//*}" "${devid#*//}" "$pv")"; then
need_commit=true
fi
newpvs="${newpvs:+$newpvs }$path"
Expand All @@ -230,6 +240,7 @@ do_vg_create() {
do_initial_setup
fi

# Create the pool
if ! vg_create "$vg" $mode $pvs; then
db_subst partman-zfs/vgcreate_error VG "$vg"
db_input critical partman-zfs/vgcreate_error
Expand Down
34 changes: 34 additions & 0 deletions debian/changelog
@@ -1,3 +1,37 @@
partman-zfs (43.ZOL5) wheezy; urgency=medium

* Revert the 'zpool import ... -N' part. Not availible on kFreeBSD and
zfs-fuse.

-- Turbo Fredriksson <turbo@bayour.com> Fri, 17 Apr 2015 18:20:43 +0200

partman-zfs (43.ZOL4) wheezy; urgency=medium

* Create /home at the top of the pool instead of below the root fs.
Simplifies recursive snapshotting (/home should not be used when
booting from a snapshot).

-- Turbo Fredriksson <turbo@bayour.com> Thu, 26 Mar 2015 04:04:57 +0100

partman-zfs (43.ZOL3) wheezy; urgency=medium

* All pv_prepare() with a third option - the real path to device.
Use this (on Linux) to see if we want to use full device or partition..

-- Turbo Fredriksson <turbo@bayour.com> Wed, 25 Mar 2015 19:14:28 +0100

partman-zfs (43.ZOL2) wheezy; urgency=medium

* On Linux, let "zpool" create the partitions (if 'whole disk' selected).

-- Turbo Fredriksson <turbo@bayour.com> Thu, 19 Mar 2015 13:55:49 +0100

partman-zfs (43.ZOL1) wheezy; urgency=medium

* Put back ZoL stuff

-- Turbo Fredriksson <turbo@bayour.com> Wed, 22 Oct 2014 21:07:51 +0200

partman-zfs (43) unstable; urgency=medium

* Do not enable zpool features by default, except those that are
Expand Down
7 changes: 4 additions & 3 deletions debian/control
Expand Up @@ -11,7 +11,8 @@ Vcs-Git: git://anonscm.debian.org/d-i/partman-zfs.git

Package: partman-zfs
Package-Type: udeb
Architecture: kfreebsd-any
Depends: ${misc:Depends}, zfsutils-udeb (>= 9.2~), zfs-modules, partman-basicfilesystems (>= 59), partman-base (>= 134),
cdebconf-udeb (>= 0.133), di-utils (>= 1.14),
Architecture: kfreebsd-any linux-any
Depends: ${misc:Depends}, zfsutils-udeb (>= 9.2~) [kfreebsd-any], zfs-fuse-udeb (>= 0.7.0-12) [linux-any],
zfs-modules [kfreebsd-any], partman-basicfilesystems (>= 59), partman-base (>= 134), cdebconf-udeb (>= 0.133),
di-utils (>= 1.14),
Description: Add to partman support for ZFS
1 change: 1 addition & 0 deletions debian/install
Expand Up @@ -3,3 +3,4 @@ fstab.d lib/partman
lib lib/partman
parted_names lib/partman
post-base-installer.d usr/lib
genhostid usr/sbin
4 changes: 2 additions & 2 deletions debian/partman-zfs.templates
Expand Up @@ -171,8 +171,8 @@ Choices: ${CHOICES_L10N}
_Description: ZFS configuration action:
Summary of current ZFS configuration:
.
Free physical volumes: ${FREE_PVS}
Used physical volumes: ${USED_PVS}
Free physical devices: ${FREE_PVS}
Used physical devices: ${USED_PVS}
ZFS pools: ${VGS}
ZFS logical volumes: ${LVS}
${BOOTFS}
Expand Down
4 changes: 2 additions & 2 deletions debian/po/am.po
Expand Up @@ -334,8 +334,8 @@ msgstr "የወቅታዊው የLVM ዝግጅት መረጃ ማጠቅላያ:-"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/ar.po
Expand Up @@ -340,8 +340,8 @@ msgstr "ملخّث تهئية ZFS الحالية:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/ast.po
Expand Up @@ -344,8 +344,8 @@ msgstr "Sumariu de la configuración ZFS d'anguaño:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/be.po
Expand Up @@ -352,8 +352,8 @@ msgstr "Агляд актуальных наладак ZFS:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/bg.po
Expand Up @@ -361,8 +361,8 @@ msgstr "Текущата конфигурация на ZFS накратко:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/bn.po
Expand Up @@ -354,8 +354,8 @@ msgstr "বর্তমান ZFS কনফিগারেশনের সার
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/bo.po
Expand Up @@ -321,8 +321,8 @@ msgstr ""
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/bs.po
Expand Up @@ -353,8 +353,8 @@ msgstr "Pregled trenutne ZFS konfiguracije:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/ca.po
Expand Up @@ -351,8 +351,8 @@ msgstr "Resum de la configuració actual del ZFS:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/cs.po
Expand Up @@ -342,8 +342,8 @@ msgstr "Přehled aktuálního nastavení ZFS:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/cy.po
Expand Up @@ -349,8 +349,8 @@ msgstr "Crynodeb o gyfluniad ZFS presennol:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/da.po
Expand Up @@ -364,8 +364,8 @@ msgstr "Opsummering af den aktuelle ZFS-konfiguration:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/de.po
Expand Up @@ -374,8 +374,8 @@ msgstr "Übersicht der aktuellen ZFS-Konfiguration:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/dz.po
Expand Up @@ -346,8 +346,8 @@ msgstr "ད་ལྟོའི་ཛེཌི་ཨེཕ་ཨེསི་ ར
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/el.po
Expand Up @@ -366,8 +366,8 @@ msgstr "Σύνοψη της τρέχουσας ρύθμισης του ZFS:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/eo.po
Expand Up @@ -346,8 +346,8 @@ msgstr "Resumo de la nuna ZFS-agordo:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/es.po
Expand Up @@ -388,8 +388,8 @@ msgstr "Resumen de la configuración ZFS actual:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/et.po
Expand Up @@ -358,8 +358,8 @@ msgstr "Praeguse ZFS-i seadistuse kokkuvõte:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/eu.po
Expand Up @@ -355,8 +355,8 @@ msgstr "Uneko ZFS konfigurazioaren laburpena:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/fa.po
Expand Up @@ -351,8 +351,8 @@ msgstr "خلاصیه از پیکربندی فعلی ZFS:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/fi.po
Expand Up @@ -352,8 +352,8 @@ msgstr "Yhteenveto käytössä olevista ZFS:n asetuksista:"
#: ../partman-zfs.templates:21001
#, fuzzy
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/fr.po
Expand Up @@ -361,8 +361,8 @@ msgstr "Synthèse de la configuration de ZFS :"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/ga.po
Expand Up @@ -342,8 +342,8 @@ msgstr "Achoimre ar an gcumraíocht reatha ZFS:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/gl.po
Expand Up @@ -350,8 +350,8 @@ msgstr "Resumo da configuración actual de ZFS:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down
4 changes: 2 additions & 2 deletions debian/po/gu.po
Expand Up @@ -342,8 +342,8 @@ msgstr "હાલનાં ZFS રૂપરેખાંકનનો સાર:"
#. :sl4:
#: ../partman-zfs.templates:21001
msgid ""
" Free physical volumes: ${FREE_PVS}\n"
" Used physical volumes: ${USED_PVS}\n"
" Free physical devices: ${FREE_PVS}\n"
" Used physical devices: ${USED_PVS}\n"
" ZFS pools: ${VGS}\n"
" ZFS logical volumes: ${LVS}\n"
" ${BOOTFS}"
Expand Down

0 comments on commit 77002ed

Please sign in to comment.