Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:cache:common_installation:cpanel-shared [2019/01/25 17:36] Lucas Rolff [Setting Cache root to a secondary disk (with CageFS)] |
litespeed_wiki:cache:common_installation:cpanel-shared [2019/01/25 19:37] Lisa Clarke [Setting Cache root to a secondary disk (with CageFS)] Proofreading |
||
---|---|---|---|
Line 157: | Line 157: | ||
For Advanced Cache Configuration info, **[[litespeed_wiki:cache:common_installation:advanced|look here]]**. | For Advanced Cache Configuration info, **[[litespeed_wiki:cache:common_installation:advanced|look here]]**. | ||
- | ===== Setting Cache root to a secondary disk (with CageFS) ===== | + | ===== Setting Cache Root to a Secondary Disk (with CageFS) ===== |
- | In some environments, you might run with normal hard drives for ''/home'', but you want to place your ''lscache'' data on SSDs, such as ''/ssdcache/lscache''. This requires a bit special configuration both within your CacheRoot setting as well as CageFS. | + | In some environments, you might run with normal hard drives for ''/home'', but you want to place your ''lscache'' data on SSDs, such as ''/ssdcache/lscache''. This requires a bit of special configuration both within your CacheRoot setting as well as CageFS. |
Make sure that your secondary disk is mounted on ''/ssdcache'' and that the directory ''lscache'' exists. | Make sure that your secondary disk is mounted on ''/ssdcache'' and that the directory ''lscache'' exists. | ||
Line 168: | Line 168: | ||
</IfModule> | </IfModule> | ||
- | The above 3 lines, will tell LiteSpeed that the vhost level cache corresponds to a dynamic lscache folder matching the user of the VirtualHost, this will ensure that the cache for each customer gets separated. | + | The above 3 lines will tell LiteSpeed that the vhost-level cache corresponds to a dynamic LSCache folder which matches the user of the VirtualHost. This will ensure that the cache for each customer gets separated. |
- | If you're using CageFS, you also need to expose this within the caged environment, luckily it's rather easy to do! | + | If you're using CageFS, you also need to expose this within the caged environment. Luckily, it's rather easy to do! |
In your ''/etc/cagefs/cagefs.mp'' file, you can add the line: | In your ''/etc/cagefs/cagefs.mp'' file, you can add the line: | ||
Line 180: | Line 180: | ||
To apply the above changes, we first rebuild the httpd configuration in cPanel and restart LiteSpeed: | To apply the above changes, we first rebuild the httpd configuration in cPanel and restart LiteSpeed: | ||
- | $ /scripts/rebuildhttpdconf | + | /scripts/rebuildhttpdconf |
- | $ /scripts/restartsrv_httpd | + | /scripts/restartsrv_httpd |
- | Afterwards we have to remount CageFS for all users, so the new path becomes available within CageFS: | + | Afterwards, we have to remount CageFS for all users, so the new path becomes available within CageFS: |
- | $ cagefsctl --remount-all | + | cagefsctl --remount-all |
- | Your lscache data will now be stored on the SSD instead of your hard drive! | + | Your LSCache data will now be stored on the SSD instead of your hard drive! |