HP N54L Custom-Kernel für kürzere Boot-Zeiten

sandreas

Well-Known Member
Hallo zusammen,

ich möchte gerne für meinen HP N54L auf Basis von FreeNAS einen Custom-Kernel bauen, um die Boot-Zeiten zu verringern. Dabei lege ich darauf Wert, dass die Funktionen von FreeNAS möglichst alle noch gegeben sein sollten und nur die nicht vorhandene Hardware bzw unnötige Optionen rausfliegen.

Im Manual steht hier nicht wirklich viel zum Thema, ich wurschtel mich gerade mal so durch:

https://www.freebsd.org/doc/handbook/kernelconfig-devices.html

Natürlich ist das recht mühselig und ich freue mich über Unterstützung eines erfahrenen FreeBSD-Spezialisten.

  • Ist das Kernel-Debugging (siehe unten) ein großer Faktor für die Bootzeit?
  • Kann mir jemand mal mit ein paar Tipps und Tricks weiterhelfen, wie ich die benötigte Hardware zweifelsfrei identifiziere (abgesehen von dmesg und pciconf)?
  • Vielleicht hat jemand schon eine vordefinierte N54L-Konfiguration, die er bereitstellen könnte?
  • Gibt es weitere Tweaks in der Kernel-Config oder auch gerne in den Settings, die ich für eine kürzere Bootzeit durchführen kann?

Nur zur Info die unmodifizierte FreeNAS Kernel-Konfiguration (wenn ich fertig mit meiner bin, poste ich die mal mit einigen Fragen):
Code:
#
# FREENAS64 -- FreeBSD/amd64 config file tune for FreeNAS
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$

cpu        HAMMER
ident        FREENAS64

makeoptions    DEBUG=-g        # Build kernel with gdb(1) debug symbols
makeoptions    WITH_CTF=1        # Run ctfconvert(1) for DTrace support

options     SCHED_ULE        # ULE scheduler
options     PREEMPTION        # Enable kernel thread preemption
options     INET            # InterNETworking
options     INET6            # IPv6 communications protocols
options     TCP_OFFLOAD        # TCP offload
#options     SCTP            # Stream Control Transmission Protocol
options     FFS            # Berkeley Fast Filesystem
options     SOFTUPDATES        # Enable FFS soft updates support
options     UFS_ACL            # Support for access control lists
options     UFS_DIRHASH        # Improve performance on big directories
options     UFS_GJOURNAL        # Enable gjournal-based UFS journaling
options     QUOTA            # Enable disk quotas for UFS
options     MD_ROOT            # MD is a potential root device
options     NFSCL            # New Network Filesystem Client
options     NFSD            # New Network Filesystem Server
options     NFSLOCKD        # Network Lock Manager
options     NFS_ROOT        # NFS usable as /, requires NFSCL
options     MSDOSFS            # MSDOS Filesystem
options     CD9660            # ISO 9660 Filesystem
options     PROCFS            # Process filesystem (requires PSEUDOFS)
options     PSEUDOFS        # Pseudo-filesystem framework
options     GEOM_PART_GPT        # GUID Partition Tables.
options     GEOM_RAID        # Soft RAID functionality.
options     GEOM_LABEL        # Provides labelization
options     COMPAT_43TTY        # BSD 4.3 TTY compat (sgtty)
options     COMPAT_FREEBSD32    # Compatible with i386 binaries
options     COMPAT_FREEBSD4        # Compatible with FreeBSD4
options     COMPAT_FREEBSD5        # Compatible with FreeBSD5
options     COMPAT_FREEBSD6        # Compatible with FreeBSD6
options     COMPAT_FREEBSD7        # Compatible with FreeBSD7
options     SCSI_DELAY=5000        # Delay (in ms) before probing SCSI
options     KTRACE            # ktrace(1) support
options     STACK            # stack(9) support
options     SYSVSHM            # SYSV-style shared memory
options     SYSVMSG            # SYSV-style message queues
options     SYSVSEM            # SYSV-style semaphores
options     P1003_1B_SEMAPHORES    # POSIX-style semaphores
options     _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options     PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
options     KBD_INSTALL_CDEV    # install a CDEV entry in /dev
options     HWPMC_HOOKS        # Necessary kernel hooks for hwpmc(4)
options     AUDIT            # Security event auditing
options     CAPABILITY_MODE        # Capsicum capability mode
options     CAPABILITIES        # Capsicum capabilities
options     PROCDESC        # Support for process descriptors
options     MAC            # TrustedBSD MAC Framework
options     KDTRACE_FRAME        # Ensure frames are compiled in
options     KDTRACE_HOOKS        # Kernel DTrace hooks
options     DDB_CTF            # Kernel ELF linker loads CTF data
options     DDB            # Support DDB.
options     INCLUDE_CONFIG_FILE    # Include this file in kernel
options     RACCT            # Resource accounting framework
options     RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options     RCTL            # Resource limits
options     KGSSAPI

# Debugging support.  Always need this:
options     KDB            # Enable kernel debugger support.
options     KDB_TRACE        # Print a stack trace for a panic.

# Make an SMP-capable kernel by default
options     SMP            # Symmetric MultiProcessor Kernel

# CPU frequency control
device        cpufreq

# Bus support.
device        acpi
options     ACPI_DMAR
device        pci

# Floppy drives
device        fdc

# ATA controllers
device        ahci            # AHCI-compatible SATA controllers
device        ata            # Legacy ATA/SATA controllers
options     ATA_STATIC_ID        # Static device numbering
device        mvs            # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
device        siis            # SiliconImage SiI3124/SiI3132/SiI3531 SATA

# SCSI Controllers
device        ahc            # AHA2940 and onboard AIC7xxx devices
options     AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                    # output.  Adds ~128k to driver.
device        ahd            # AHA39320/29320 and onboard AIC79xx devices
options     AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                    # output.  Adds ~215k to driver.
#device        esp            # AMD 53C974 (Tekram DC-390(T))
device        hptiop            # Highpoint RocketRaid 3xxx series
device        isp            # Qlogic family
#device        ispfw            # Firmware for QLogic HBAs- normally a module
device        mpt            # LSI-Logic MPT-Fusion
device        mps            # LSI-Logic MPT-Fusion 2
device        mpr            # LSI-Logic MPT-Fusion 3
#device        ncr            # NCR/Symbios Logic
device        sym            # NCR/Symbios Logic (newer chipsets + those of `ncr')
#device        trm            # Tekram DC395U/UW/F DC315U adapters

#device        adv            # Advansys SCSI adapters
#device        adw                # Advansys wide SCSI adapters
#adevice    aic            # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
#device        bt            # Buslogic/Mylex MultiMaster SCSI adapters
device        isci            # Intel C600 SAS controller

# ATA/SCSI peripherals
device        scbus            # SCSI bus (required for ATA/SCSI)
device        ch            # SCSI media changers
device        da            # Direct Access (disks)
device        sa            # Sequential Access (tape etc)
device        cd            # CD
device        pass            # Passthrough device (direct ATA/SCSI access)
device        ses            # Enclosure Services (SES and SAF-TE)
device        ctl            # CAM Target Layer

# RAID controllers interfaced to the SCSI subsystem
device        amr            # AMI MegaRAID
device        arcmsr            # Areca SATA II RAID
#XXX it is not 64-bit clean, -scottl
#device        asr            # DPT SmartRAID V, VI and Adaptec SCSI RAID
device        ciss            # Compaq Smart RAID 5*
device        dpt            # DPT Smartcache III, IV - See NOTES for options
device        hptmv            # Highpoint RocketRAID 182x
device        hptnr            # Highpoint DC7280, R750
device        hptrr            # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
device        hpt27xx            # Highpoint RocketRAID 27xx
device        iir            # Intel Integrated RAID
device        ips            # IBM (Adaptec) ServeRAID
device        mly            # Mylex AcceleRAID/eXtremeRAID
device        twa            # 3ware 9000 series PATA/SATA RAID
device        tws            # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller

# RAID controllers
device        aac            # Adaptec FSA RAID
device        aacp            # SCSI passthrough for aac (requires CAM)
device        aacraid            # Adaptec by PMC RAID
#device        ida            # Compaq Smart RAID
device        mfi            # LSI MegaRAID SAS
device        mfip            # LSI MegaRAID SAS passthrough, requires CAM
device        mlx            # Mylex DAC960 family
device        mrsas            # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
#XXX PCI ID conflicts with ahd(4) and mvs(4)
#device        pmspcv            # PMC-Sierra SAS/SATA Controller driver
#XXX pointer/int warnings
#device        pst            # Promise Supertrak SX6000
device        twe            # 3ware ATA RAID

# NVM Express (NVMe) support
device        nvme            # base NVMe driver
device        nvd            # expose NVMe namespaces as disks, depends on nvme

# atkbdc0 controls both the keyboard and the PS/2 mouse
device        atkbdc            # AT keyboard controller
device        atkbd            # AT keyboard
device        psm            # PS/2 mouse

device        kbdmux            # keyboard multiplexer

device        vga            # VGA video card driver
options     VESA            # Add support for VESA BIOS Extensions (VBE)

device        splash            # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device        sc
options     SC_PIXEL_MODE        # add support for the raster text mode

# vt is the new video console driver
device        vt
device        vt_vga
device        vt_efifb

device        agp            # support several AGP chipsets

# Serial (COM) ports
device        uart            # Generic UART driver

# PCI Ethernet NICs.
device        bxe            # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE
device        cxgb            # Chelsio T3 10 Gigabit Ethernet adapter driver
device        cxgbe            # Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters.
device        de            # DEC/Intel DC21x4x (``Tulip'')
device        em            # Intel PRO/1000 Gigabit Ethernet Family
device        igb            # Intel PRO/1000 PCIE Server Gigabit Family
device        ix            # Intel PRO/10GbE PCIE PF Ethernet
device        ixv            # Intel PRO/10GbE PCIE VF Ethernet
device        ixl            # Intel XL710 40Gbe PCIE Ethernet
device        ixlv            # Intel XL710 40Gbe VF PCIE Ethernet
device        le            # AMD Am7900 LANCE and Am79C9xx PCnet
device        mxge            # Myricom Myri10GE 10 Gigabit Ethernet adapter driver
device        ti            # Alteon Networks Tigon I/II gigabit Ethernet
device        txp            # 3Com 3cR990 (``Typhoon'')
device        vx            # 3Com 3c590, 3c595 (``Vortex'')
device        qlxgb            # QLogic 10Gb 3200/8200 Ethernet
device        qlxge            # QLogic 10Gb 8100 Ethernet
#device        qlxgbe            # QLogic 10Gb 8300 Ethernet
device        oce            # Emulex 10Gbe Ethernet
device        sfxge            # Solarflare SFC9000 family 10Gb Ethernet adapters

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device        miibus            # MII bus support
device        ae            # Attansic/Atheros L2 FastEthernet
device        age            # Attansic/Atheros L1 Gigabit Ethernet
device        alc            # Atheros AR8131/AR8132 Ethernet
device        ale            # Atheros AR8121/AR8113/AR8114 Ethernet
device        bce            # Broadcom BCM5706/BCM5708 Gigabit Ethernet
device        bfe            # Broadcom BCM440x 10/100 Ethernet
device        bge            # Broadcom BCM570xx Gigabit Ethernet
device        dc            # DEC/Intel 21143 and various workalikes
device        et            # Agere ET1310 10/100/Gigabit Ethernet
device        fxp            # Intel EtherExpress PRO/100B (82557, 82558)
device        jme            # JMicron JMC250 Gigabit/JMC260 Fast Ethernet
device        lge            # Level 1 LXT1001 gigabit Ethernet
device        msk            # Marvell/SysKonnect Yukon II Gigabit Ethernet
device        nfe            # nVidia nForce MCP on-board Ethernet
device        nge            # NatSemi DP83820 gigabit Ethernet
device        nve            # nVidia nForce MCP on-board Ethernet Networking
device        pcn            # AMD Am79C97x PCI 10/100 (precedence over 'le')
device        re            # RealTek 8139C+/8169/8169S/8110S
device        rl            # RealTek 8129/8139
device        sf            # Adaptec AIC-6915 (``Starfire'')
device        sge            # Silicon Integrated Systems SiS190/191
device        sis            # Silicon Integrated Systems SiS 900/SiS 7016
device        sk            # SysKonnect SK-984x & SK-982x gigabit Ethernet
device        ste            # Sundance ST201 (D-Link DFE-550TX)
device        stge            # Sundance/Tamarack TC9021 gigabit Ethernet
device        tl            # Texas Instruments ThunderLAN
device        tx            # SMC EtherPower II (83c170 ``EPIC'')
device        vge            # VIA VT612x gigabit Ethernet
device        vr            # VIA Rhine, Rhine II
device        wb            # Winbond W89C840F
device        xl            # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Pseudo devices.
device        loop            # Network loopback
device        random            # Entropy device
device        padlock_rng        # VIA Padlock RNG
device        rdrand_rng        # Intel Bull Mountain RNG
device        ether            # Ethernet support
device        vlan            # 802.1Q VLAN support
device        tun            # Packet tunnel.
device        md            # Memory "disks"
device        gif            # IPv6 and IPv4 tunneling
device        faith            # IPv6-to-IPv4 relaying (translation)
device        firmware        # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device        bpf            # Berkeley packet filter

# USB support
options     USB_DEBUG        # enable debug msgs
device        uhci            # UHCI PCI->USB interface
device        ohci            # OHCI PCI->USB interface
device        ehci            # EHCI PCI->USB interface (USB 2.0)
device        xhci            # XHCI PCI->USB interface (USB 3.0)
device        usb            # USB Bus (required)
device        ukbd            # Keyboard
device        umass            # Disks/Mass storage - Requires scbus and da

# VirtIO support
device        virtio            # Generic VirtIO bus (required)
device        virtio_pci        # VirtIO PCI device
device        vtnet            # VirtIO Ethernet device
device        virtio_blk        # VirtIO Block device
device        virtio_scsi        # VirtIO SCSI device
device        virtio_balloon        # VirtIO Memory Balloon device

# HyperV drivers and enchancement support
# NOTE: HYPERV depends on hyperv.  They must be added or removed together.
options     HYPERV            # Hyper-V kernel infrastructure
device        hyperv            # HyperV drivers

# Xen HVM Guest Optimizations
# NOTE: XENHVM depends on xenpci.  They must be added or removed together.
options     XENHVM            # Xen HVM kernel infrastructure
device        xenpci            # Xen HVM Hypervisor services driver

# VMware support
device        vmx            # VMware VMXNET3 Ethernet

## FreeNAS shared modifications
options        GEOM_UZIP
options        GEOM_ELI
options        NULLFS
options        UNIONFS
options        TMPFS            #Efficient memory filesystem
options        VFS_AIO
options        ISP_TARGET_MODE        # Qlogic FC target mode
device        zfs
device        amdtemp
device        coretemp
device        cpuctl
device        crypto            # core crypto support
device        cryptodev        # /dev/crypto for access to h/w
device        aesni
device        lagg            # Link aggregation
device        carp
device        pty            # BSD-style compatibility pseudo ttys
device        iscsi
device        smbus            # Needed for ipmi(4)

# ipfw and nat for jails
options        IPDIVERT
options        IPFIREWALL
options        IPFIREWALL_VERBOSE
options        IPFIREWALL_DEFAULT_TO_ACCEPT
options        IPFIREWALL_NAT
#options        DUMMYNET
options        LIBALIAS

## FreeNAS specific modifications
# misc
device        padlock
options        VIMAGE
options        NETGRAPH
device        snp
device        epair        # A pair of virtual back-to-back connected Ethernet interfaces
device        if_bridge    # network bridge device
#  The `tap' device is a pty-like virtual Ethernet interface
device        tap
device        ucom

# Watchdog support
device        ichwd
#device        amdsbwd            # #7094: driver must not set watchdog if requested value is too high
device        viawd
device        wbwd

# FireWire support
device        firewire    # FireWire bus code
device        sbp        # SCSI over FireWire (Requires scbus and da)
#device        fwe        # Ethernet over FireWire (non-standard!)
#device        fwip        # IP over FireWire (RFC 2734,3146)
#device        dcons        # Dumb console driver
#device        dcons_crom    # Configuration ROM for dcons
## End FreeNAS specific section
 
Das Problem bei FreeNAS wird wohl eher das schlechte Alignment der Partitionen im Image sein. Da kannst Du mit dem Kernel nicht viel raus holen. Auf USB-Sticks sollte man je nach Typ die Partitionen an 16k oder 64k Grenzen (Ich nehme einfach 1MiB, da ist man relativ sicher). Das macht unglaublich viel aus.

Da mein FreeNAS 24/7 läuft ignoriere ich das einfach.
 
Vielen Dank für den Hinweis...

Da mein FreeNAS 24/7 läuft ignoriere ich das einfach.
Ja, meins leider nicht. Daher nervt es ein bisschen, immer so extrem lange zu warten, bis das Ding oben ist. Insbesondere da mit dem N54L Hibernate / S3 nicht funktioniert.

Das Problem bei FreeNAS wird wohl eher das schlechte Alignment der Partitionen im Image sein. Da kannst Du mit dem Kernel nicht viel raus holen.
Interessanter Aspekt... das müsste man ja auch im build-Prozess irgendwo anpassen können. Ne Idee wo das sein könnte? Vielleicht hier: https://github.com/freenas/freenas-...c8b31b0f736e6e58f0e/build/tools/create-iso.py ?

Ich lese mal n bisschen was dazu...
Das hier scheint ganz nett zu sein: https://www.ateamsystems.com/tech-blog/freebsd-partition-alignment-raid-ssd-4k-drive/

Ich habe jetzt in der Kernel-Config mal alles rausgefeuert, was meiner Ansicht nach für einen N54L nicht benötigt wird. Sind insgesamt 87 Treiber / Devices, die ich entfernen konnte (besonders viel Network und Raid Quatsch)... werde mal schaun, ob es so bootet und ob es wirklich nicht viel ausmacht.

Hier die Konfig, alles mit #xxx ist von mir rausgeschmissen (es fehlt noch einiges, das war nur der erste Durchgang ;)
Code:
#
# FREENAS64 -- FreeBSD/amd64 config file tune for FreeNAS
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$

cpu        HAMMER
ident        FREENAS64

makeoptions    DEBUG=-g        # Build kernel with gdb(1) debug symbols
makeoptions    WITH_CTF=1        # Run ctfconvert(1) for DTrace support

options     SCHED_ULE        # ULE scheduler
options     PREEMPTION        # Enable kernel thread preemption
options     INET            # InterNETworking
options     INET6            # IPv6 communications protocols
options     TCP_OFFLOAD        # TCP offload
#options     SCTP            # Stream Control Transmission Protocol
options     FFS            # Berkeley Fast Filesystem
options     SOFTUPDATES        # Enable FFS soft updates support
options     UFS_ACL            # Support for access control lists
options     UFS_DIRHASH        # Improve performance on big directories
options     UFS_GJOURNAL        # Enable gjournal-based UFS journaling
options     QUOTA            # Enable disk quotas for UFS
options     MD_ROOT            # MD is a potential root device
options     NFSCL            # New Network Filesystem Client
options     NFSD            # New Network Filesystem Server
options     NFSLOCKD        # Network Lock Manager
options     NFS_ROOT        # NFS usable as /, requires NFSCL
options     MSDOSFS            # MSDOS Filesystem
options     CD9660            # ISO 9660 Filesystem
options     PROCFS            # Process filesystem (requires PSEUDOFS)
options     PSEUDOFS        # Pseudo-filesystem framework
options     GEOM_PART_GPT        # GUID Partition Tables.
options     GEOM_RAID        # Soft RAID functionality.
options     GEOM_LABEL        # Provides labelization
options     COMPAT_43TTY        # BSD 4.3 TTY compat (sgtty)
options     COMPAT_FREEBSD32    # Compatible with i386 binaries
options     COMPAT_FREEBSD4        # Compatible with FreeBSD4
options     COMPAT_FREEBSD5        # Compatible with FreeBSD5
options     COMPAT_FREEBSD6        # Compatible with FreeBSD6
options     COMPAT_FREEBSD7        # Compatible with FreeBSD7
options     SCSI_DELAY=5000        # Delay (in ms) before probing SCSI
options     KTRACE            # ktrace(1) support
options     STACK            # stack(9) support
options     SYSVSHM            # SYSV-style shared memory
options     SYSVMSG            # SYSV-style message queues
options     SYSVSEM            # SYSV-style semaphores
options     P1003_1B_SEMAPHORES    # POSIX-style semaphores
options     _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options     PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
options     KBD_INSTALL_CDEV    # install a CDEV entry in /dev
options     HWPMC_HOOKS        # Necessary kernel hooks for hwpmc(4)
options     AUDIT            # Security event auditing
options     CAPABILITY_MODE        # Capsicum capability mode
options     CAPABILITIES        # Capsicum capabilities
options     PROCDESC        # Support for process descriptors
options     MAC            # TrustedBSD MAC Framework
options     KDTRACE_FRAME        # Ensure frames are compiled in
options     KDTRACE_HOOKS        # Kernel DTrace hooks
options     DDB_CTF            # Kernel ELF linker loads CTF data
options     DDB            # Support DDB.
options     INCLUDE_CONFIG_FILE    # Include this file in kernel
options     RACCT            # Resource accounting framework
options     RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options     RCTL            # Resource limits
options     KGSSAPI

# Debugging support.  Always need this:
options     KDB            # Enable kernel debugger support.
options     KDB_TRACE        # Print a stack trace for a panic.

# Make an SMP-capable kernel by default
options     SMP            # Symmetric MultiProcessor Kernel

# CPU frequency control
device        cpufreq

# Bus support.
device        acpi
options     ACPI_DMAR
device        pci

# Floppy drives
#xxx device        fdc

# ATA controllers
device        ahci            # AHCI-compatible SATA controllers
device        ata            # Legacy ATA/SATA controllers
options     ATA_STATIC_ID        # Static device numbering

#xxx device        mvs            # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
#xxx device        siis            # SiliconImage SiI3124/SiI3132/SiI3531 SATA

# SCSI Controllers
device        ahc            # AHA2940 and onboard AIC7xxx devices
options     AHC_REG_PRETTY_PRINT    # Print register bitfields in debug
                    # output.  Adds ~128k to driver.
device        ahd            # AHA39320/29320 and onboard AIC79xx devices
options     AHD_REG_PRETTY_PRINT    # Print register bitfields in debug
                    # output.  Adds ~215k to driver.
#device        esp            # AMD 53C974 (Tekram DC-390(T))
#xxx device        hptiop            # Highpoint RocketRaid 3xxx series
#xxx device        isp            # Qlogic family
#device        ispfw            # Firmware for QLogic HBAs- normally a module
#xxx device        mpt            # LSI-Logic MPT-Fusion
#xxx device        mps            # LSI-Logic MPT-Fusion 2
#xxx device        mpr            # LSI-Logic MPT-Fusion 3
#device        ncr            # NCR/Symbios Logic
device        sym            # NCR/Symbios Logic (newer chipsets + those of `ncr')
#device        trm            # Tekram DC395U/UW/F DC315U adapters

#device        adv            # Advansys SCSI adapters
#device        adw                # Advansys wide SCSI adapters
#adevice    aic            # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
#device        bt            # Buslogic/Mylex MultiMaster SCSI adapters
#xxx device        isci            # Intel C600 SAS controller

# ATA/SCSI peripherals
device        scbus            # SCSI bus (required for ATA/SCSI)
device        ch            # SCSI media changers
device        da            # Direct Access (disks)
device        sa            # Sequential Access (tape etc)
device        cd            # CD
device        pass            # Passthrough device (direct ATA/SCSI access)
device        ses            # Enclosure Services (SES and SAF-TE)
device        ctl            # CAM Target Layer

# RAID controllers interfaced to the SCSI subsystem
device        amr            # AMI MegaRAID
device        arcmsr            # Areca SATA II RAID
#XXX it is not 64-bit clean, -scottl
#device        asr            # DPT SmartRAID V, VI and Adaptec SCSI RAID
#xxx device        ciss            # Compaq Smart RAID 5*
#xxx device        dpt            # DPT Smartcache III, IV - See NOTES for options
#xxx device        hptmv            # Highpoint RocketRAID 182x
#xxx device        hptnr            # Highpoint DC7280, R750
#xxx device        hptrr            # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
#xxx device        hpt27xx            # Highpoint RocketRAID 27xx
#xxx device        iir            # Intel Integrated RAID
#xxx device        ips            # IBM (Adaptec) ServeRAID
#xxx device        mly            # Mylex AcceleRAID/eXtremeRAID
#xxx device        twa            # 3ware 9000 series PATA/SATA RAID
#xxx device        tws            # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller

# RAID controllers
#xxx device        aac            # Adaptec FSA RAID
#xxx device        aacp            # SCSI passthrough for aac (requires CAM)
#xxx device        aacraid            # Adaptec by PMC RAID
#device        ida            # Compaq Smart RAID
#xxx device        mfi            # LSI MegaRAID SAS
#xxx device        mfip            # LSI MegaRAID SAS passthrough, requires CAM
#xxx device        mlx            # Mylex DAC960 family
#xxx device        mrsas            # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
#XXX PCI ID conflicts with ahd(4) and mvs(4)
#device        pmspcv            # PMC-Sierra SAS/SATA Controller driver
#XXX pointer/int warnings
#device        pst            # Promise Supertrak SX6000
#xxx device        twe            # 3ware ATA RAID

# NVM Express (NVMe) support
#xxx device        nvme            # base NVMe driver
#xxx device        nvd            # expose NVMe namespaces as disks, depends on nvme

# atkbdc0 controls both the keyboard and the PS/2 mouse
device        atkbdc            # AT keyboard controller
device        atkbd            # AT keyboard
device        psm            # PS/2 mouse

device        kbdmux            # keyboard multiplexer

device        vga            # VGA video card driver
options     VESA            # Add support for VESA BIOS Extensions (VBE)

device        splash            # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device        sc
options     SC_PIXEL_MODE        # add support for the raster text mode

# vt is the new video console driver
device        vt
device        vt_vga
device        vt_efifb

device        agp            # support several AGP chipsets

# Serial (COM) ports
device        uart            # Generic UART driver

# PCI Ethernet NICs.
#xxx device        bxe            # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE
#xxx device        cxgb            # Chelsio T3 10 Gigabit Ethernet adapter driver
#xxx device        cxgbe            # Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters.
#xxx device        de            # DEC/Intel DC21x4x (``Tulip'')
#xxx device        em            # Intel PRO/1000 Gigabit Ethernet Family
#xxx device        igb            # Intel PRO/1000 PCIE Server Gigabit Family
#xxx device        ix            # Intel PRO/10GbE PCIE PF Ethernet
#xxx device        ixv            # Intel PRO/10GbE PCIE VF Ethernet
#xxx device        ixl            # Intel XL710 40Gbe PCIE Ethernet
#xxx device        ixlv            # Intel XL710 40Gbe VF PCIE Ethernet
#xxx device        le            # AMD Am7900 LANCE and Am79C9xx PCnet
#xxx device        mxge            # Myricom Myri10GE 10 Gigabit Ethernet adapter driver
#xxx device        ti            # Alteon Networks Tigon I/II gigabit Ethernet
#xxx device        txp            # 3Com 3cR990 (``Typhoon'')
#xxx device        vx            # 3Com 3c590, 3c595 (``Vortex'')
#xxx device        qlxgb            # QLogic 10Gb 3200/8200 Ethernet
#xxx device        qlxge            # QLogic 10Gb 8100 Ethernet
#device        qlxgbe            # QLogic 10Gb 8300 Ethernet
#xxx device        oce            # Emulex 10Gbe Ethernet
#xxx device        sfxge            # Solarflare SFC9000 family 10Gb Ethernet adapters

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
#xxx device        miibus            # MII bus support
#xxx device        ae            # Attansic/Atheros L2 FastEthernet
#xxx device        age            # Attansic/Atheros L1 Gigabit Ethernet
#xxx device        alc            # Atheros AR8131/AR8132 Ethernet
#xxx device        ale            # Atheros AR8121/AR8113/AR8114 Ethernet
#xxx device        bce            # Broadcom BCM5706/BCM5708 Gigabit Ethernet
#xxx device        bfe            # Broadcom BCM440x 10/100 Ethernet
device        bge            # Broadcom BCM570xx Gigabit Ethernet
#xxx device        dc            # DEC/Intel 21143 and various workalikes
#xxx device        et            # Agere ET1310 10/100/Gigabit Ethernet
#xxx device        fxp            # Intel EtherExpress PRO/100B (82557, 82558)
#xxx device        jme            # JMicron JMC250 Gigabit/JMC260 Fast Ethernet
#xxx device        lge            # Level 1 LXT1001 gigabit Ethernet
#xxx device        msk            # Marvell/SysKonnect Yukon II Gigabit Ethernet
#xxx device        nfe            # nVidia nForce MCP on-board Ethernet
#xxx device        nge            # NatSemi DP83820 gigabit Ethernet
#xxx device        nve            # nVidia nForce MCP on-board Ethernet Networking
#xxx device        pcn            # AMD Am79C97x PCI 10/100 (precedence over 'le')
#xxx device        re            # RealTek 8139C+/8169/8169S/8110S
#xxx device        rl            # RealTek 8129/8139
#xxx device        sf            # Adaptec AIC-6915 (``Starfire'')
#xxx device        sge            # Silicon Integrated Systems SiS190/191
#xxx device        sis            # Silicon Integrated Systems SiS 900/SiS 7016
#xxx device        sk            # SysKonnect SK-984x & SK-982x gigabit Ethernet
#xxx device        ste            # Sundance ST201 (D-Link DFE-550TX)
#xxx device        stge            # Sundance/Tamarack TC9021 gigabit Ethernet
#xxx device        tl            # Texas Instruments ThunderLAN
#xxx device        tx            # SMC EtherPower II (83c170 ``EPIC'')
#xxx device        vge            # VIA VT612x gigabit Ethernet
#xxx device        vr            # VIA Rhine, Rhine II
#xxx device        wb            # Winbond W89C840F
#xxx device        xl            # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Pseudo devices.
device        loop            # Network loopback
device        random            # Entropy device
device        padlock_rng        # VIA Padlock RNG
device        rdrand_rng        # Intel Bull Mountain RNG
device        ether            # Ethernet support
device        vlan            # 802.1Q VLAN support
device        tun            # Packet tunnel.
device        md            # Memory "disks"
device        gif            # IPv6 and IPv4 tunneling
device        faith            # IPv6-to-IPv4 relaying (translation)
device        firmware        # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device        bpf            # Berkeley packet filter

# USB support
options     USB_DEBUG        # enable debug msgs
device        uhci            # UHCI PCI->USB interface
device        ohci            # OHCI PCI->USB interface
device        ehci            # EHCI PCI->USB interface (USB 2.0)
device        xhci            # XHCI PCI->USB interface (USB 3.0)
device        usb            # USB Bus (required)
device        ukbd            # Keyboard
device        umass            # Disks/Mass storage - Requires scbus and da

# VirtIO support
device        virtio            # Generic VirtIO bus (required)
device        virtio_pci        # VirtIO PCI device
device        vtnet            # VirtIO Ethernet device
device        virtio_blk        # VirtIO Block device
device        virtio_scsi        # VirtIO SCSI device
device        virtio_balloon        # VirtIO Memory Balloon device

# HyperV drivers and enchancement support
# NOTE: HYPERV depends on hyperv.  They must be added or removed together.
#xxx options     HYPERV            # Hyper-V kernel infrastructure
#xxx device        hyperv            # HyperV drivers

# Xen HVM Guest Optimizations
# NOTE: XENHVM depends on xenpci.  They must be added or removed together.
#xxx options     XENHVM            # Xen HVM kernel infrastructure
#xxx device        xenpci            # Xen HVM Hypervisor services driver

# VMware support
#xxx device        vmx            # VMware VMXNET3 Ethernet

## FreeNAS shared modifications
options        GEOM_UZIP
options        GEOM_ELI
options        NULLFS
options        UNIONFS
options        TMPFS            #Efficient memory filesystem
options        VFS_AIO
options        ISP_TARGET_MODE        # Qlogic FC target mode
device        zfs
device        amdtemp
device        coretemp
device        cpuctl
device        crypto            # core crypto support
device        cryptodev        # /dev/crypto for access to h/w
device        aesni
device        lagg            # Link aggregation
device        carp
device        pty            # BSD-style compatibility pseudo ttys
device        iscsi
device        smbus            # Needed for ipmi(4)

# ipfw and nat for jails
options        IPDIVERT
options        IPFIREWALL
options        IPFIREWALL_VERBOSE
options        IPFIREWALL_DEFAULT_TO_ACCEPT
options        IPFIREWALL_NAT
#options        DUMMYNET
options        LIBALIAS

## FreeNAS specific modifications
# misc
device        padlock
options        VIMAGE
options        NETGRAPH
device        snp
device        epair        # A pair of virtual back-to-back connected Ethernet interfaces
device        if_bridge    # network bridge device
#  The `tap' device is a pty-like virtual Ethernet interface
device        tap
device        ucom

# Watchdog support
device        ichwd
#device        amdsbwd            # #7094: driver must not set watchdog if requested value is too high
device        viawd
device        wbwd

# FireWire support
#xxx device        firewire    # FireWire bus code
#xxx device        sbp        # SCSI over FireWire (Requires scbus and da)
#device        fwe        # Ethernet over FireWire (non-standard!)
#device        fwip        # IP over FireWire (RFC 2734,3146)
#device        dcons        # Dumb console driver
#device        dcons_crom    # Configuration ROM for dcons
## End FreeNAS specific section
 
Nochmal der Vollständigkeit halber wo die Kernel-Config liegt:

/build/profiles/freenas9/kernel/FreeNAS.amd64

Hab eventuell auch gefunden, wo das alignment gemacht wird:

https://github.com/freenas/freenas/...9b5e28df/src/freenas-installer/etc/install.sh
/src/freenas-installer/etc/install.sh, Zeile 313

Hier wird mit gpart add ein Alignment von 4k eingestellt... Müsste ja reichen, dass swap um -a 1m zu erweitern und -a 4k durch -a 1m zu ersetzen, also von:
Code:
create_partitions() {
    local _disk="$1"
    local _size=""
  
    if [ $# -eq 2 ]; then
        _size="-s $2"
    fi
    if gpart create -s GPT ${_disk}; then
        if gpart add -t bios-boot -i 1 -s 512k ${_disk}; then
            if is_truenas; then
                gpart add -t freebsd-swap -s 16g -i 3 ${_disk}
            fi
            if gpart add -t freebsd-zfs -i 2 -a 4k ${_size} ${_disk}; then
                return 0
            fi
        fi
    fi

    return 1
}

NACH

Code:
create_partitions() {
    local _disk="$1"
    local _size=""
  
    if [ $# -eq 2 ]; then
        _size="-s $2"
    fi
    if gpart create -s GPT ${_disk}; then
        if gpart add -t bios-boot -i 1 -s 512k ${_disk}; then
            if is_truenas; then
                gpart add -t freebsd-swap -a 1m -s 16g -i 3 ${_disk}
            fi
            if gpart add -t freebsd-zfs -i 2 -a 1m ${_size} ${_disk}; then
                return 0
            fi
        fi
    fi

    return 1
}
 
Ist jegliche unnötige Hardware entfernt/abgestöpselt, im BIOS deaktiviert. Sind im BIOS alle Einstellungen wie z.B. Boot-Reihenfolge optimiert? Die Zeitspanne bis das OS wirklich beginnt dauert auf dem HP leider. Wieviele Sekunden wartet dein Boot Loader auf eine Eingabe bis er das Default bootet?
 
Ist jegliche unnötige Hardware entfernt/abgestöpselt, im BIOS deaktiviert. Sind im BIOS alle Einstellungen wie z.B. Boot-Reihenfolge optimiert? Die Zeitspanne bis das OS wirklich beginnt dauert auf dem HP leider. Wieviele Sekunden wartet dein Boot Loader auf eine Eingabe bis er das Default bootet?

Ja, hier ist alles optimiert. Bootloader wartet 2 Sekunden.

Anfänglich dauert der Bootvorgang bis zum Bestätigen des Bootloaders 15 Sekunden, danach noch mal 113 Sekunden bis alles verfügbar ist (SSH, WebInterface), insgesamt also 128 Sekunden.

Es ist folglich gut möglich, dass man seitens FreeBSD noch was rausholen kann :-)

Interessant wäre noch, wie ich das Alignment auf dem fertigen Datenträger prüfen kann, damit ich sehe, ob mein kleiner "Patch" funktioniert hat :-)
 
Du kannst das Image mit `mdconfig -f` öffnen und ganz normal wie einen Datenträger verwenden.

Das heißt Du kannst mit `gpart` und `fdisk` nachsehen.
 
Nuja, du siehst ja in gpart wie die Partitionierung aussieht. Da steht dann auch wo die Partitionsgrenzen sind. Du solltest dann auch gleich checken ob dein ZFS damit richtig fährt und gucken ob du nen ashift von 12 hast.
 
Nuja, du siehst ja in gpart wie die Partitionierung aussieht. Da steht dann auch wo die Partitionsgrenzen sind. Du solltest dann auch gleich checken ob dein ZFS damit richtig fährt und gucken ob du nen ashift von 12 hast.
Wie ich sagte, ashift 12 passt für SSDs, für viele USB-Sticks ist das aber zu wenig. Da hatte ich schon welche in der Hand die erst bei 64k Alignment ihren Nenndurchsatz bringen.
 
Wie ich sagte, ashift 12 passt für SSDs, für viele USB-Sticks ist das aber zu wenig. Da hatte ich schon welche in der Hand die erst bei 64k Alignment ihren Nenndurchsatz bringen.

Wie oben erwähnt habe ich das Alignment im Installer-Script anhand der Vorschläge in diesem Blog auf 1m angepasst, ob es läuft sehe ich heute Abend. Änderung:
Code:
# Original: gpart add -t freebsd-swap -s 16g -i 3 ${_disk}
gpart add -t freebsd-swap -a 1m -s 16g -i 3 ${_disk}

# Original: if gpart add -t freebsd-zfs -i 2 -a 4k ${_size} ${_disk}; then
if gpart add -t freebsd-zfs -i 2 -a 1m ${_size} ${_disk}; then

Falls es damit nicht läuft, werde ich auf 64k runter gehn :-)
 
Man muss in Vielfachen rechnen: 1M == 1024K == 16*64K. Wenn du auf 1M ausrichtest, bist du also gleichzeitig auf 64k ausgerichtet. Nur in die andere Richtung klappt es logischerweise nicht. Ich halte es da übrigens mit Windows und richte die Partitionen auf ein Alignement von 2M aus. Sich am dicksten Fisch zu orientieren ist nie falsch. :)
 
Man muss in Vielfachen rechnen: 1M == 1024K == 16*64K. Wenn du auf 1M ausrichtest, bist du also gleichzeitig auf 64k ausgerichtet. Nur in die andere Richtung klappt es logischerweise nicht. Ich halte es da übrigens mit Windows und richte die Partitionen auf ein Alignement von 2M aus. Sich am dicksten Fisch zu orientieren ist nie falsch. :)
Bei einer 840 Evo wären 1.5M optimal, durch den TLC ist das die Größe der Delete-Blöcke (bei der Pro sind es 1M). Da passen die 2M auch nicht optimal. Wobei sich das wahrscheinlich nicht bemerkbar auf die Performance auswirkt.
 
Ich werde als Installationsmedium einen Sandisk Extreme USB-Stick mit 16GB oder 32GB nehmen. Die sind recht flott (> 200MB lesen), aber eben keine SSD. Außerdem macht es dank USB 2.0 im Microserver wohl keinen Unterschied, solange man >50MB/s lesen liegt.

Ok, nach Installation meines gepatchten Images in einer VM läuft erstmal alles soweit stabil.

Gefühlt bootet es etwas schneller als mit den ganzen Treibern im Kernel, gemessen habe ich es noch nicht.

Aber wie kriege ich denn jetzt raus, ob es geklappt hat und die Partitionen aligned sind oder nicht? Hier mal die Ausgaben von diskinfo und gpart

Code:
[root@freenas ~]# diskinfo -v /dev/ada0                                       
/dev/ada0                                                                     
        512             # sectorsize                                           
        17179869184     # mediasize in bytes (16G)                             
        33554432        # mediasize in sectors                                 
        0               # stripesize                                           
        0               # stripeoffset                                         
        33288           # Cylinders according to firmware.                     
        16              # Heads according to firmware.                         
        63              # Sectors according to firmware.                       
        VB6185ef77-08d017dc     # Disk ident.

Code:
[root@freenas ~]# gpart show                                                   
=>      34  33554365  ada0  GPT  (16G)                                         
        34      1024     1  bios-boot  (512K)                                 
      1058         6        - free -  (3.0K)                                   
      1064  33553328     2  freebsd-zfs  (16G)                                 
  33554392         7        - free -  (3.5K)
 
Laut Zahlen ist das nicht korrekt aligned.
Bei mir steht mit oder ohne boot-Partition immer eine 2048 vor der ersten Datenpartition (freebsd-ufs/freebsd-zfs).

Rob
 
Mit `gpart list` kannst Du dir die Sectorsize anzeigen lassen und mit dem Start der Partition multiplizieren. Das ist dann der Start der Partition in Bytes. Wenn Sectorsize 512 ist, dann ist das nur 4k Aligned.
Aber wie kriege ich denn jetzt raus, ob es geklappt hat und die Partitionen aligned sind oder nicht? Hier mal die Ausgaben von diskinfo und gpart

Code:
[root@freenas ~]# diskinfo -v /dev/ada0                                       
/dev/ada0                                                                     
        512             # sectorsize                                           
        17179869184     # mediasize in bytes (16G)                             
        33554432        # mediasize in sectors                                 
        0               # stripesize                                           
        0               # stripeoffset                                         
        33288           # Cylinders according to firmware.                     
        16              # Heads according to firmware.                         
        63              # Sectors according to firmware.                       
        VB6185ef77-08d017dc     # Disk ident.

Code:
[root@freenas ~]# gpart show                                                   
=>      34  33554365  ada0  GPT  (16G)                                         
        34      1024     1  bios-boot  (512K)                                 
      1058         6        - free -  (3.0K)                                   
      1064  33553328     2  freebsd-zfs  (16G)                                 
  33554392         7        - free -  (3.5K)
Es hat also nicht geklappt mit dem Alignment. 2048 wäre der Start des 2. Megabytes auf dem Stick. Versuche auch mal das ZFS ashift auf 20 zu setzen.
 
Erstmal vielen Dank für die Super Hilfe und die rege Beteiligung. Erlebt man nicht oft!

Versuche auch mal das ZFS ashift auf 20 zu setzen.
Kann man das nachträglich machen oder muss das Während der Installation passieren?
Und hier auch: Wie check ich, obs geklappt hat?


OK, jetzt scheints dann zu passen?

Code:
[root@freenas ~]# diskinfo -v ada0                                        
ada0                                                                      
        512             # sectorsize                                      
        17179869184     # mediasize in bytes (16G)                        
        33554432        # mediasize in sectors                            
        0               # stripesize                                      
        0               # stripeoffset                                    
        33288           # Cylinders according to firmware.                
        16              # Heads according to firmware.                    
        63              # Sectors according to firmware.                  
        VB6185ef77-08d017dc     # Disk ident.                            
                                                                         
[root@freenas ~]# gpart show ada0                                        
=>      34  33554365  ada0  GPT  (16G)                                    
        34      1024     1  bios-boot  (512K)                            
      1058       990        - free -  (495K)                              
      2048  33550336     2  freebsd-zfs  (16G)                            
  33552384      2015        - free -  (1.0M)


[root@freenas ~]# gpart list
Geom name: ada0                                                            
modified: false                                                            
state: OK                                                                  
fwheads: 16                                                                
fwsectors: 63                                                              
last: 33554398                                                              
first: 34                                                                  
entries: 128                                                                
scheme: GPT                                                                
Providers:                                                                  
1. Name: ada0p1                                                            
   Mediasize: 524288 (512K)                                                
   Sectorsize: 512                                                          
   Stripesize: 0                                                            
   Stripeoffset: 17408                                                      
   Mode: r0w0e0                                                            
   rawuuid: 9a683978-fa81-11e5-91d8-0800276f5c8c                            
   rawtype: 21686148-6449-6e6f-744e-656564454649                            
   label: (null)                                                            
   length: 524288                                                          
   offset: 17408                                                            
   type: bios-boot                                                          
   index: 1
   end: 1057                                                                
   start: 34                                                                
2. Name: ada0p2                                                            
   Mediasize: 17177772032 (16G)                                            
   Sectorsize: 512                                                          
   Stripesize: 0                                                            
   Stripeoffset: 1048576                                                    
   Mode: r1w1e1                                                            
   rawuuid: 9a6b2fa5-fa81-11e5-91d8-0800276f5c8c                            
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b                            
   label: (null)                                                            
   length: 17177772032                                                      
   offset: 1048576                                                          
   type: freebsd-zfs                                                        
   index: 2                                                                
   end: 33552383                                                            
   start: 2048                                                              
Consumers:                                                                  
1. Name: ada0                                                              
   Mediasize: 17179869184 (16G)                                            
   Sectorsize: 512                                                          
   Mode: r1w1e2
 
Wir sind gespannt ob es was bringt. Du kannst gerne mal grob stoppen wie lange Dein boot jetzt dauert (und wie lange vorher).
 
Eine letzte Frage noch: Warum ashift=20 und nicht ashift=12, wie es überall sonst beschrieben ist (z.B. hier: https://wiki.bsdforen.de/zfs_ashift)? Oder war das n Typo?

Hier mal eine grobe Anleitung, wie man das mit dem Alignment und das ashift auch ohne Neu-Kompilieren von FreeNAS hinbekommt:

Kurzreferenz für benötigte Tasten ;)
Code:
´ für =
- für /
? für _
Ö für :

  • FreeNAS Installer über die CD starten
  • Shell auswählen
  • sysctl vfs.zfs.min_auto_ashift=12 # default ashift setzen
  • vi /etc/install.sh
  • Suchen nach: create_p (/create_p eingeben, dann Enter)
  • In der Zeile mit freebsd-zfs folgendes ersetzen: -a 4k => -a 1m
  • Mit :wq! das Schreiben erzwingen
  • Danach /etc/install.sh wieder aufrufen, normal installieren.


Obs was bringt, poste ich dann in den nächsten Tagen wenn der neue USB-Stick da ist :-)
 
Wie gesagt, für 1MiB Alignment sollte ashift=20 gesetzt werden. 12 entspricht 4kib Alignment.
 
Ok, ich habe das jetzt mal ausprobiert, leider weiß ich nicht so recht, wie ich es schaffen soll, ashift=20 zu setzen. Folgendes führt zu einem Fehler "Invalid value for ...":

Code:
sysctl vfs.zfs.min_auto_ashift=20

gnop ist beim FreeNAS-Installer nicht mit ausgeliefert, da wären größere Anpassungen nötig.

Gibt es noch eine andere Möglichkeit?


Ansonsten würde ich an dieser Stelle vermutlich nicht mehr weiter machen und das ashift auf 12 belassen, in der Hoffnung, dass es etwas bringt. Alternativ vielleicht noch die Partitionen manuell mit FreeBSD 10 erstellen und den create_partitions-Teil aus FreeNAS auskommentieren.
 
FreeNAS ist doch immer noch auf Basis von FreeBSD 9 oder? Dann gibt es die Option so noch nicht. Eine alternative wäre aber NAS4Free. Das basiert auf FreeBSD 10.
 
Vielleicht noch einmal etwas ausgeholt: vfs.zfs.min_auto_ashift gibt die kleinste Blockgröße an, die ein 'zpool create' und ein 'zpool add' automatisch nutzen. vfs.zfs.max_auto_ashift gibt dazu die maximale automatisch genutzt Blockgröße an. Natürlich muss vfs.zfs.max_auto_ashift > vfs.zfs.min_auto_ashift gegeben sein, sonst wäre es unlogisch und funktioniert nicht. In der Praxis machen Blockgrößen von mehr als 4096 Byte (2^12 == ashift 12) aber kaum Sinn. Da die ganze Welt 4096 Byte Blöcke nutzt, ist die Firmware meist darauf optimiert, noch größere Blöcke bringen allenfalls geringe Vorteile. Gleichzeitig steigt der Verschnitt je nach Struktur der Daten aber bis zu exponentiell an, d.h. man verschwendet Speicherplatz ohne Ende.

Und nochmal zur Ausgangsfrage: Ich habe eine minimale Kernelconfig. Das ist wirklich nur exakt das, was zwingend im Kernel sein muss. Alles andere wird per Modul geladen. Wenn da jemand Interesse dran hat, lade ich sie heute Abend mal hoch.
 
Zurück
Oben