blockdev

Probleme mit Samba, NFS, FTP und Co.
Antworten
jcw
Beiträge: 99
Registriert: 10.01.2016 17:11:46

blockdev

Beitrag von jcw » 10.04.2021 19:49:14

Hallo!

Ich habe festgestellt, dass mein RAID-Controller 3ware 9500S besser mit der Einstellung /usr/sbin/blockdev --setra 16384 /dev/sdd performed.So, wie in dem Artikel
https://forums.gentoo.org/viewtopic-t-4 ... art-0.html
beschrieben.
Wie kann ich in Debian 10 diese Einstellung permanent nach dem Starten des Servers übernehmen? Muss dafür ein Skript erstellt werden oder kann man den Parameter auch anders hinterlegen?

Danke für die Unterstützung.

Benutzeravatar
king-crash
Beiträge: 720
Registriert: 08.08.2006 12:07:56
Lizenz eigener Beiträge: MIT Lizenz

Re: blockdev

Beitrag von king-crash » 11.04.2021 16:19:12

Mit einer udev Regel könnte es funktionieren.
Zuerst den Modellnamen des Blockdevices herausfinden.

Code: Alles auswählen

cat /sys/block/sdb/device/model
Dann eine Regel erstellen und den Modellnamen, ggf mit Wildcard am Ende, einfügen.
/etc/udev/rules.d/99-raid-setra.rules

Code: Alles auswählen

SUBSYSTEM=="block", ATTRS{model}=="[HIER_DEN_MODELLNAMEN_EINTRAGEN]", ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{bdi/read_ahead_kb}="16384"
Ich habe das nicht selbst getestet, es kann also sein, dass etwas nicht ganz passt.

jcw
Beiträge: 99
Registriert: 10.01.2016 17:11:46

Re: blockdev

Beitrag von jcw » 12.04.2021 20:40:02

Danke für den Hinweis. Ich probiere das mal aus.

jcw
Beiträge: 99
Registriert: 10.01.2016 17:11:46

Re: blockdev

Beitrag von jcw » 15.04.2021 22:02:14

Kann es sein, dass es das Attribute 'read_ahead_kb' gar nicht gibt und man dies dann auch nicht setzen kann? Es geht hier um dem Controller "9500S-8 DISK ".

Code: Alles auswählen

root@jw02:/etc/udev/rules.d# udevadm info --attribute-walk /dev/sdd

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0/0000:06:01.0/host1/target1:0:0/1:0:0:0/block/sdd':
    KERNEL=="sdd"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{ext_range}=="256"
    ATTR{events_poll_msecs}=="-1"
    ATTR{discard_alignment}=="0"
    ATTR{events}==""
    ATTR{stat}=="    1989       91    42232    56513      108      185     3305     1997        0     4344    56580        0        0        0        0"
    ATTR{size}=="3906228224"
    ATTR{ro}=="0"
    ATTR{events_async}==""
    ATTR{capability}=="50"
    ATTR{removable}=="0"
    ATTR{inflight}=="       0        0"
    ATTR{alignment_offset}=="0"
    ATTR{range}=="16"
    ATTR{hidden}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0/0000:06:01.0/host1/target1:0:0/1:0:0:0':
    KERNELS=="1:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
    ATTRS{ioerr_cnt}=="0x1"
    ATTRS{type}=="0"
    ATTRS{evt_inquiry_change_reported}=="0"
    ATTRS{timeout}=="60"
    ATTRS{evt_capacity_change_reported}=="0"
    ATTRS{state}=="running"
    ATTRS{model}=="9500S-8    DISK "
    ATTRS{scsi_level}=="4"
    ATTRS{iodone_cnt}=="0x88f"
    ATTRS{evt_media_change}=="0"
    ATTRS{eh_timeout}=="10"
    ATTRS{evt_mode_parameter_change_reported}=="0"
    ATTRS{vendor}=="AMCC    "
    ATTRS{evt_lun_change_reported}=="0"
    ATTRS{rev}=="2.08"
    ATTRS{inquiry}==""
    ATTRS{device_blocked}=="0"
    ATTRS{queue_ramp_up_period}=="120000"
    ATTRS{device_busy}=="0"
    ATTRS{iocounterbits}=="32"
    ATTRS{queue_type}=="simple"
    ATTRS{evt_soft_threshold_reached}=="0"
    ATTRS{dh_state}=="detached"
    ATTRS{queue_depth}=="254"
    ATTRS{iorequest_cnt}=="0x890"
    ATTRS{blacklist}==""

  looking at parent device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0/0000:06:01.0/host1/target1:0:0':
    KERNELS=="target1:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0/0000:06:01.0/host1':
    KERNELS=="host1"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0/0000:06:01.0':
    KERNELS=="0000:06:01.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="3w-9xxx"
    ATTRS{local_cpus}=="3"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{ari_enabled}=="0"
    ATTRS{revision}=="0x00"
    ATTRS{subsystem_device}=="0x1002"
    ATTRS{irq}=="16"
    ATTRS{vendor}=="0x13c1"
    ATTRS{enable}=="1"
    ATTRS{class}=="0x010400"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{msi_bus}=="1"
    ATTRS{subsystem_vendor}=="0x13c1"
    ATTRS{device}=="0x1002"
    ATTRS{broken_parity_status}=="0"
    ATTRS{numa_node}=="0"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{driver_override}=="(null)"

  looking at parent device '/devices/pci0000:00/0000:00:13.0/0000:05:00.0':
    KERNELS=="0000:05:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{class}=="0x060400"
    ATTRS{secondary_bus_number}=="6"
    ATTRS{driver_override}=="(null)"
    ATTRS{vendor}=="0x1033"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{subordinate_bus_number}=="6"
    ATTRS{irq}=="0"
    ATTRS{revision}=="0x06"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{current_link_width}=="1"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{max_link_speed}=="2.5 GT/s"
    ATTRS{local_cpus}=="3"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{current_link_speed}=="2.5 GT/s"
    ATTRS{device}=="0x0125"
    ATTRS{broken_parity_status}=="0"
    ATTRS{numa_node}=="0"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{max_link_width}=="8"
    ATTRS{enable}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{ari_enabled}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:13.0':
    KERNELS=="0000:00:13.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="pcieport"
    ATTRS{ari_enabled}=="0"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{max_link_width}=="1"
    ATTRS{subordinate_bus_number}=="7"
    ATTRS{max_link_speed}=="2.5 GT/s"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{current_link_speed}=="2.5 GT/s"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{secondary_bus_number}=="5"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{class}=="0x060400"
    ATTRS{local_cpus}=="3"
    ATTRS{irq}=="16"
    ATTRS{broken_parity_status}=="0"
    ATTRS{revision}=="0xa1"
    ATTRS{vendor}=="0x10de"
    ATTRS{numa_node}=="0"
    ATTRS{device}=="0x077a"
    ATTRS{enable}=="1"
    ATTRS{subsystem_device}=="0x82e2"
    ATTRS{current_link_width}=="1"
    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

Benutzeravatar
king-crash
Beiträge: 720
Registriert: 08.08.2006 12:07:56
Lizenz eigener Beiträge: MIT Lizenz

Re: blockdev

Beitrag von king-crash » 19.04.2021 15:10:36

Das sollte Controllerunabhängig sein, da es nur den Blocklayer betrifft. Hast du es denn überhaupt ausprobiert?
Die Zugehörige Datei findet sich in "/sys/block/sd*/bdi/read_ahead_kb"

Antworten