From 16e2c85922848adb1c21a46a6cc23846ef94b951 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jan 2014 07:40:58 +0100 Subject: Enable RAID root system. Quoting /usr/share/doc/cryptsetup/README.keyctl : The current state for dm-crypt in Linux is that it is single threaded, thus every dm-crypt mapping only uses a single core for crypto operations. To use the full power of your many-core processor it is thus necessary to split the dm-crypt device. For Linux software raid arrays the easiest segmentation is to just put the dm-crypt layer below the software raid layer. However, this seems no longer true since 2.6.38, cf. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714806 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c029772125594e31eb1a5ad9e0913724ed9891f2 http://kernelnewbies.org/Linux_2_6_38#head-49f5f735853f8cc7c4d89e5c266fe07316b49f4c Therefore encrypting the array (instead of assembling an array of encrypted disks) shouldn't cause a performance cost. Also, it makes the ramdisk much easier to configure :-) --- src/fripost-partman-udeb/base.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/fripost-partman-udeb') diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh index b6770f8..976cfb6 100644 --- a/src/fripost-partman-udeb/base.sh +++ b/src/fripost-partman-udeb/base.sh @@ -586,3 +586,19 @@ getIPv4() { $ip -4 address show dev "$if" scope global \ | sed -nr '/^\s+inet\s([[:xdigit:].:]{3,39}).*/ {s//\1/p;q}' } + + + +############################################################################## +# Remove a partition from a device +# +# Usage: fripost_rmpart device partition + +fripost_rmpart () { + local device="$1" part="$2" + n=$( /sbin/parted -sm "$device" p + | sed -nr "/^[0-9].*:$part:[^:]*;$/ s/:.*//p" ) + [ "$n" ] || return + log "Removing partition $n ($part) from $device" + /sbin/parted -sm "$device" rm "$n" +} -- cgit v1.2.3