TWE(4)

πŸ’– TWE(4) β€” the 3ware RAID driver, bestie edition πŸ’–

okay so welcome to the TWE(4) page, part of the Kernel Interfaces Manual (iykyk, the section 4 girlies). this is the whole scoop on twe, the driver for 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapters. grab a strawberry, we're going in πŸ“


✨ NAME ✨

twe β€” 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapter driver


🌸 SYNOPSIS 🌸

so if you wanna bake this driver into the kernel, drop these lines in your kernel configuration file:

device pci
device twe

OR, if you'd rather be a lowkey icon and load it as a module at boot time, put this line in loader.conf(5):

twe_load="YES"

πŸ¦‹ DESCRIPTION πŸ¦‹

the twe driver gives you support for AMCC's 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapters. these adapters used to be called "3ware Escalade" β€” yes, the rebrand era, we love a glow up ✨

these devices can hold 2, 4, 8, or 12 ATA disk drives, and they do RAID0 (striping) and RAID1 (mirroring). that's the whole vibe.


πŸ‘‘ HARDWARE πŸ‘‘

the twe driver supports these PATA/SATA RAID controllers, no cap:

  • AMCC's 3ware 5000 series
  • AMCC's 3ware 6000 series
  • AMCC's 3ware 7000-2
  • AMCC's 3ware 7006-2
  • AMCC's 3ware 7500-4LP
  • AMCC's 3ware 7500-8
  • AMCC's 3ware 7500-12
  • AMCC's 3ware 7506-4LP
  • AMCC's 3ware 7506-8
  • AMCC's 3ware 7506-12
  • AMCC's 3ware 8006-2LP
  • AMCC's 3ware 8500-4LP
  • AMCC's 3ware 8500-8
  • AMCC's 3ware 8500-12
  • AMCC's 3ware 8506-4LP
  • AMCC's 3ware 8506-8
  • AMCC's 3ware 8506-8MI
  • AMCC's 3ware 8506-12
  • AMCC's 3ware 8506-12MI

πŸ’€ DIAGNOSTICS πŸ’€

this is the part where the kernel tells you what's wrong. buckle up, bestie, some of this is giving main character crisis.

πŸŽ€ Controller initialisation phase πŸŽ€

twe%d: microcontroller not ready

the controller's onboard CPU is not reporting that it's ready. this could be a board failure or a system failure, either way it's not the vibe. initialisation has failed.

twe%d: no attention interrupt
twe%d: can't drain AEN queue
twe%d: reset not reported
twe%d: controller errors detected
twe%d: can't drain response queue
twe%d: reset %d failed, trying again

the controller is not responding correctly to the driver's attempts to reset and initialise it. this whole process gets retried several times, so it's giving "we're trying again, bestie" energy.

twe%d: can't initialise controller, giving up

several attempts to reset and initialise the controller have failed. initialisation has failed and the driver will not attach to this controller. it's over, it's giving final girl, we're moving on 😭

πŸŽ€ Driver initialisation/shutdown phase πŸŽ€

twe%d: register window not available
twe%d: can't allocate register window
twe%d: can't allocate parent DMA tag
twe%d: can't allocate interrupt
twe%d: can't set up interrupt
twe%d: can't establish configuration hook

a resource allocation error happened while initialising the driver. initialisation has failed and the driver will not attach to this controller.

twe%d: can't detect attached units

fetching the list of attached units failed. initialisation has failed.

twe%d: error fetching capacity for unit %d
twe%d: error fetching state for unit %d
twe%d: error fetching descriptor size for unit %d
twe%d: error fetching descriptor for unit %d
twe%d: device_add_child failed
twe%d: bus_generic_attach returned %d

creating the disk devices failed β€” either because of communication problems with the adapter, or because of a resource shortage. attachment of one or more units may have been aborted. not slay.

πŸŽ€ Operational phase πŸŽ€

twe%d: command completed - %s

a command was reported completed with a warning by the controller. the warning might be one of:

  • redundant/inconsequential request ignored
  • failed to write zeroes to LBA 0
  • failed to profile TwinStor zones
twe%d: command failed - %s

a command was reported as failed by the controller. the failure message might be one of:

  • aborted due to system command or reconfiguration
  • aborted
  • access error
  • access violation
  • device failure
  • controller error
  • timed out
  • invalid unit number
  • unit not available
  • undefined opcode
  • request incompatible with unit
  • invalid request
  • firmware error, reset requested
the command will be returned to the operating system after a fatal error. fr fr, it's coming back to you.
twe%d: command failed submission - controller wedged

a command could not be delivered to the controller because the controller is unresponsive. it's just... not answering. ghosting the driver πŸ’€

twe%d: AEN: <%s>

the controller reported a change in status using an AEN (Asynchronous Event Notification). these AENs may be reported:

  • queue empty
  • soft reset
  • degraded mirror
  • controller error
  • rebuild fail
  • rebuild done
  • incomplete unit
  • initialisation done
  • unclean shutdown detected
  • drive timeout
  • drive error
  • rebuild started
  • aen queue full

AENs are also queued internally for use by management tools. so like, they're doing double duty, iconic.

twe%d: error polling for signalled AENs

the controller reported that one or more status messages are ready for the driver, but trying to fetch one of them returned an error. so close yet so far πŸ™ˆ

twe%d: AEN queue overflow, lost AEN <%s>

a status message was retrieved from the controller, but there's no more room to queue it in the driver. the message is lost (but it will be printed to the console).

twe%d: missing expected status bits %s
twe%d: unexpected status bits %s

a check of the controller's status bits indicates an unexpected condition. not the vibe check we wanted.

twe%d: host interrupt

the controller signalled a host interrupt. this serves an unknown purpose and is ignored.

twe%d: command interrupt

the controller signalled a command interrupt. this is not used, and it will be disabled.

twe%d: controller reset in progress...

the controller is being reset by the driver. typically this happens when the driver has determined the controller is in an unrecoverable state.

twe%d: can't reset controller, giving up

the driver has given up on resetting the controller. no further I/O will be handled. periodt.

controller reset done, %d commands restarted

the controller was successfully reset, and the outstanding commands were restarted. we love a comeback story πŸ’–


🫢 AUTHORS 🫢

the twe driver and manual page were written by Michael Smith <msmith@FreeBSD.org>.

extensive work done on the driver by Vinod Kashyap <vkashyap@FreeBSD.org> and Paul Saab <ps@FreeBSD.org>. absolute legends, every one of them 🌈


🌸 BUGS 🌸

the controller cannot handle I/O transfers that are not aligned to a 512-byte boundary. to support raw device access from user-space, the driver will perform alignment fixup on non-aligned data. this process is inefficient, so if you want the best performance, user-space applications accessing the device should do it with aligned buffers. no cap, align your buffers bestie πŸ’…


and that's the whole page, mwah πŸ’œ this was the TWE(4) manpage from the Debian-flavored Kernel Interfaces Manual, dated August 15, 2004 β€” a vintage queen serving RAID knowledge since the early aughts. love that for us πŸŽ€βœ¨

πŸ“¦ where this page comes from