View | Details | Raw Unified | Return to bug 208094
Collapse All | Expand All

(-)usr.sbin/bsdinstall/scripts/zfsboot (-5 / +5 lines)
Lines 302-308 Link Here
302
msg_swap_size="Swap Size"
302
msg_swap_size="Swap Size"
303
msg_swap_size_help="Customize how much swap space is allocated to each selected disk"
303
msg_swap_size_help="Customize how much swap space is allocated to each selected disk"
304
msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap"
304
msg_swap_toosmall="The selected swap size (%s) is to small. Please enter a value greater than 100MB or enter 0 for no swap"
305
msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n  %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices."
305
msg_these_disks_are_too_small="These disks are smaller than the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 100%% or more of each of the following selected disks:\n\n  %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of disks."
306
msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'"
306
msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'"
307
msg_unsupported_partition_scheme="%s is an unsupported partition scheme"
307
msg_unsupported_partition_scheme="%s is an unsupported partition scheme"
308
msg_user_cancelled="User Cancelled."
308
msg_user_cancelled="User Cancelled."
Lines 1483-1493 Link Here
1483
		# NB: dialog_menu_layout supports running non-interactively
1483
		# NB: dialog_menu_layout supports running non-interactively
1484
		dialog_menu_layout || continue
1484
		dialog_menu_layout || continue
1485
1485
1486
		# Make sure each disk will be at least 50% ZFS
1486
		# Make sure each disk will have room for ZFS
1487
		if f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize &&
1487
		if f_expand_number "$ZFSBOOT_SWAP_SIZE" swapsize &&
1488
		   f_expand_number "$ZFSBOOT_BOOT_POOL_SIZE" bootsize
1488
		   f_expand_number "$ZFSBOOT_BOOT_POOL_SIZE" bootsize &&
1489
		   f_expand_number "1g" zpoolmin
1489
		then
1490
		then
1490
			minsize=$swapsize teeny_disks=
1491
			minsize=$(( $swapsize + $zpoolmin )) teeny_disks=
1491
			[ "$ZFSBOOT_BOOT_POOL" ] &&
1492
			[ "$ZFSBOOT_BOOT_POOL" ] &&
1492
				minsize=$(( $minsize + $bootsize ))
1493
				minsize=$(( $minsize + $bootsize ))
1493
			for disk in $ZFSBOOT_DISKS; do
1494
			for disk in $ZFSBOOT_DISKS; do
Lines 1495-1501 Link Here
1495
					$disk $DEVICE_TYPE_DISK device
1496
					$disk $DEVICE_TYPE_DISK device
1496
				$device get capacity disksize || continue
1497
				$device get capacity disksize || continue
1497
				[ ${disksize:-0} -ge 0 ] || disksize=0
1498
				[ ${disksize:-0} -ge 0 ] || disksize=0
1498
				disksize=$(( $disksize - $minsize ))
1499
				[ $disksize -lt $minsize ] &&
1499
				[ $disksize -lt $minsize ] &&
1500
					teeny_disks="$teeny_disks $disk"
1500
					teeny_disks="$teeny_disks $disk"
1501
			done
1501
			done

Return to bug 208094