1"use strict";(self.webpackChunkpxdocs_docusaurus=self.webpackChunkpxdocs_docusaurus||[]).push([[14002],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>m});var n=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){o(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function l(e,t){if(null==e)return{};var a,n,o=function(e,t){if(null==e)return{};var a,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},s=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(a),m=o,h=u["".concat(c,".").concat(m)]||u[m]||d[m]||r;return a?n.createElement(h,i(i({ref:t},s),{},{components:a})):n.createElement(h,i({ref:t},s))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,i=new Array(r);i[0]=u;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var p=2;p<r;p++)i[p]=a[p];return n.createElement.apply(null,i)}return n.createElement.apply(null,a)}u.displayName="MDXCreateElement"},58751:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var n=a(87462),o=(a(67294),a(3905));const r={title:"Enable pool caching",keywords:["storage pool, pool caching, px-cache"],sidebar_class_name:"auto-sidebar-hide",sidebar_position:400},i=void 0,l={unversionedId:"shared/hidden/pool-caching/enable-pool-caching",id:"shared/hidden/pool-caching/enable-pool-caching",title:"Enable pool caching",description:"Prerequisites",source:"@site/docs/portworx-enterprise/shared/hidden/pool-caching/enable-pool-caching.md",sourceDirName:"shared/hidden/pool-caching",slug:"/shared/hidden/pool-caching/enable-pool-caching",permalink:"/portworx-enterprise/shared/hidden/pool-caching/enable-pool-caching",draft:!1,tags:[],version:"current",lastUpdatedAt:1690526583,formattedLastUpdatedAt:"Jul 28, 2023",sidebarPosition:400,frontMatter:{title:"Enable pool caching",keywords:["storage pool, pool caching, px-cache"],sidebar_class_name:"auto-sidebar-hide",sidebar_position:400},sidebar:"pxEnterpriseSidebar",previous:{title:"Configure a storage pool's caching properties",permalink:"/portworx-enterprise/shared/hidden/pool-caching/configure-caching-drive"}
1,next:{title:"Flush a pool's cache",permalink:"/portworx-enterprise/shared/hidden/pool-caching/flush-pool-cache"}},c={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Enable pool caching",id:"enable-pool-caching",level:2}],s={toc:p};function d(e){let{components:t,...a}=e;return(0,o.kt)("wrapper",(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,o.kt)("p",null,"Before you can enable pool caching, you must have a storage pool with caching configured but currently disabled."),(0,o.kt)("p",null,"You can use the following commands to check if caching is disabled:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Run the ",(0,o.kt)("inlineCode",{parentName:"p"},"pxctl status")," command the get the id of your pool:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"pxctl status\n")),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-output"},"Status: PX is operational\nLicense: Trial (expires in 29 days)\nNode ID: abb4723e-efa3-432d-ad27-f929bc658862\n IP: 70.0.79.28\n Local Storage Pool: 1 pool\n POOL IO_PRIORITY RAID_LEVEL USABLE USED STATUS ZONE REGION\n 0 HIGH raid0 128 GiB 8.4 GiB Online default default\n Local Storage Devices: 2 devices\n Device Path Media Type Size Last-Scan\n 0:0 /dev/sdf STORAGE_MEDIUM_MAGNETIC 128 GiB 22 Sep 19 14:48 UTC\n total - 128 GiB\n Cache Devices:\n Device Path Media Type Size Last-Scan\n 0:1 /dev/sdc STORAGE_MEDIUM_SSD 70 GiB 22 Sep 19 14:48 UTC\nCluster Summary\n Cluster ID: doc-cluster-caching-2.2.0\n Cluster UUID: e5d79039-1333-4ac9-adf4-70019d925a4a\n Scheduler: none\n Nodes: 3 node(s) with storage (3 online)\n IP ID SchedulerNodeName StorageNode UseCapacity Status StorageStatus Version Kernel OS\n 70.0.79.28 abb4723e-efa3-432d-ad27-f929bc658862 N/A Yes 8.4 GiB 128 GiB Online Up (This node) 2.2.0.0-328a043 4.20.13-1.el7.elrepo.x86_64 CentOS Linux 7 (Core)\n 70.0.78.240 9ddf713b-0dbc-4e7b-bd6e-2ae648891072 N/A Yes 8.4 GiB 128 GiB Online Up 2.2.0.0-328a043 4.20.13-1.el7.elrepo.x86_64 CentOS Linux 7 (Core)\n 70.0.79.32 0e466c6a-fef0-4752-b133-9bf257e9973a N/A Yes 8.4 GiB 128 GiB Online Up 2.2.0.0-328a043 4.20.13-1.el7.elrepo.x86_64 CentOS Linux 7 (Core)\nGlobal Storage Pool\n Total Used : 25 GiB\n Total Capacity : 384 GiB\n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Run the ",(0,o.kt)("inlineCode",{parentName:"p"},"pxctl service pool cache status")," command with the id of your storage pool as a parameter:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"pxctl service pool cache status 0\n")),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-output"},"PX Cache Configuration and Status:\nPool ID: 0\n Enabled: false\n Members: [/dev/sdc]\n TotalBlocks: 0\n UsedBlocks: 0\n DirtyBlocks: 0\n ReadHits: 0\n ReadMisses: 0\n WriteHits: 0\n WriteMisses: 0\n BlockSize: 1048576\n Mode: writeback\n Policy: smq\n Tunables: migration_threshold=20480\n")))),(0,o.kt)("h2",{id:"enable-pool-caching"},"Enable pool caching"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Enter pool maintenance mode:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"pxctl service pool maintenance --enter\n")),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-output"},"Pool transition operation will restart PX.\nAre you sure you want to proceed ? (Y/N): Y\nPool transition request submitted.\n")))),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Enter the ",(0,o.kt)("inlineCode",{parentName:"p"},"pxctl service pool cache enable")," command, specifying the ",(0,o.kt)("inlineCode",{parentName:"p"},"<pool_id>")," of the pool you want to disable caching for:"),(0,o.kt)("p",{parentName:"li"},(0,o.kt)("inlineCode",{parentName:"p"}
1,"pxctl service pool cache enable <pool_id>")),(0,o.kt)("p",{parentName:"li"},"The following example enables caching for a pool with an ID of ",(0,o.kt)("inlineCode",{parentName:"p"},"0"),":"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"pxctl service pool cache enable 0\n")),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-output"},"Pool 0 attached cache successfully\n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Exit pool maintenance mode:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"pxctl service pool maintenance --exit\n")),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-output"},"Pool transition operation will restart PX.\nAre you sure you want to proceed ? (Y/N): Y\nPool transition request submitted.\n"))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"At this point you can run the ",(0,o.kt)("inlineCode",{parentName:"p"},"pxctl service pool cache status")," command to see if caching is enabled:"),(0,o.kt)("pre",{parentName:"li"},(0,o.kt)("code",{parentName:"pre",className:"language-text"},"PX Cache Configuration and Status:\nPool ID: 0\n Enabled: true\n Members: [/dev/sdc]\n TotalBlocks: 71660\n UsedBlocks: 10\n DirtyBlocks: 6\n ReadHits: 13\n ReadMisses: 10\n WriteHits: 14\n WriteMisses: 8\n BlockSize: 1048576\n Mode: writeback\n Policy: smq\n Tunables: migration_threshold=20480\n")))))}d.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.