Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adding RAW disk cache with udev rule example

...

  1. What Platforms does Traffic Server support
  2. 'sudo make install' fails with '/usr/bin/install: invalid group nobody'
  3. How do I enable forward proxy mode?
  4. How do I access POST data in a Traffic Server plugin
  5. How do I enable DNS lookups?
  6. How do I enable SSL between Client/ATS/Origin end points?
  7. What happens if Traffic Server crashes?
  8. Do you have any sample configuration files?
  9. How do I profile Traffic Server's performance?
  10. How do get detailed logs for particular requests served by Traffic Server?
  11. How to enable cache inspector and others in http_ui?
  12. How do I setup a RAW disk cache?
  13. More questions?

Anchor
platforms
platforms

...

  1. add these remap rules to remap.config, you may need to replace localhost to your own hostname
    Code Block
    titleremap.config
    borderStylesolid
        map http://localhost/cache-internal/ http://{cache-internal}
        map http://localhost/cache/ http://{cache}
        map http://localhost/stat/ http://{stat}
        map http://localhost/test/ http://{test}
        map http://localhost/hostdb/ http://{hostdb}
        map http://localhost/net/ http://{net}
        map http://localhost/http/ http://{http}
    
  2. enable http_ui from records.config, we use command line tool here:
    Code Block
    titlecommand
    borderStylesolid
        traffic_line -s proxy.config.http_ui_enabled -v 3
        traffic_line -s proxy.config.http.enable_http_info -v 1
    
  3. get traffic_server aware of the change:
    Code Block
    titlecommand
    borderStylesolid
        traffic_line -x
    
  4. testing with nc:
    Code Block
    titlecommand
    borderStylesolid
        echo -e "GET http://localhost/stat/ HTTP/1.0\r\n\r\n" | nc -i 1 localhost 8080
    

Anchor
raw-disk
raw-disk

How do I setup a RAW disk cache?

RAW disk cache is specified in storage.config using the physical /dev device with no additional parameters provided you run a recent kernel.

Code Block
titlestorage.config
borderStylesolid

    /dev/dm-2

You must also ensure the trafficserver user owns the device and has block-level access. To do this we utilize udev rules. This must be a physical device and not an LVM mapping:

  1. /etc/udev/rules.d/50-ats.rules
    Code Block
    title50-ats.rules
    borderStylesolid
    
        # Apache Traffic Server owns disk for RAW access
        KERNEL=="dm-2", OWNER="trafficserver"
    

Anchor
more
more

More Frequently Asked Questions?

...