mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
initramfs: Set elevator=noop on the rpool's disks
ZFS already sets elevator=noop for wholedisk vdevs (for all pools), but typical root-on-ZFS installations use partitions. This sets elevator=noop on the disks in the root pool. Ubuntu 16.04 and 16.10 had this. It was lost in 17.04 due to Debian switching to this upstream initramfs script. Signed-off-by: Richard Laager <rlaager@wiktel.com>
This commit is contained in:
parent
11b9dcfb2d
commit
4fc411f7a3
@ -883,6 +883,24 @@ mountroot()
|
||||
/bin/sh
|
||||
fi
|
||||
|
||||
# Set elevator=noop on the root pool's vdevs' disks. ZFS already
|
||||
# does this for wholedisk vdevs (for all pools), so this is only
|
||||
# important for partitions.
|
||||
"${ZPOOL}" status -L "${ZFS_RPOOL}" 2> /dev/null |
|
||||
awk '/^\t / && !/(mirror|raidz)/ {
|
||||
dev=$1;
|
||||
sub(/[0-9]+$/, "", dev);
|
||||
print dev
|
||||
}' |
|
||||
while read i
|
||||
do
|
||||
if [ -e "/sys/block/$i/queue/scheduler" ]
|
||||
then
|
||||
echo noop > "/sys/block/$i/queue/scheduler"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# P R E P A R E R O O T F I L E S Y S T E M
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user