disable-pool-caching
Prerequisites
Before you can disable pool caching, you must have a storage pool with caching configured and enabled.
You can use the following commands to check if caching is enabled:
-
First, run the
pxctl statuscommand the get the id of your pool:pxctl statusStatus: PX is operationalLicense: Trial (expires in 29 days)Node ID: xxxxxxxx-xxxx-xxxx-xxxx-f929bc658862IP: X.X.X.28Local Storage Pool: 1 poolPOOL IO_PRIORITY RAID_LEVEL USABLE USED STATUS ZONE REGION0 HIGH raid0 128 GiB 8.4 GiB Online default defaultLocal Storage Devices: 2 devicesDevice Path Media Type Size Last-Scan0:0 /dev/sdf STORAGE_MEDIUM_MAGNETIC 128 GiB 20 Sep 19 19:44 UTCtotal - 128 GiBCache Devices:Device Path Media Type Size Last-Scan0:1 /dev/sdc STORAGE_MEDIUM_SSD 70 GiB 20 Sep 19 19:44 UTCCluster SummaryCluster ID: doc-cluster-caching-2.2.0Cluster UUID: xxxxxxxx-xxxx-xxxx-xxxx-70019d925a4aScheduler: noneNodes: 3 node(s) with storage (3 online)IP ID SchedulerNodeName StorageNode UseCapacity Status StorageStatus Version Kernel OSX.X.X.28 xxxxxxxx-xxxx-xxxx-xxxx-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)X.X.X.240 xxxxxxxx-xxxx-xxxx-xxxx-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)X.X.X.32 xxxxxxxx-xxxx-xxxx-xxxx-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)Global Storage PoolTotal Used : 25 GiBTotal Capacity : 384 GiB -
Run the
pxctl service pool cache statuscommand with the id of your storage pool as a parameter:pxctl service pool cache status 0Pool ID: 0Enabled: trueMembers: [/dev/sdc]TotalBlocks: 71660UsedBlocks: 15DirtyBlocks: 0ReadHits: 582ReadMisses: 168WriteHits: 1157WriteMisses: 127BlockSize: 1048576Mode: writebackPolicy: smqTunables: migration_threshold=20480
Disable pool caching
-
Enter pool maintenance mode:
pxctl service pool maintenance --enterPool transition operation will restart PX.Are you sure you want to proceed ? (Y/N): YPool transition request submitted. -
If your cache is running in the default
writebackmode, you must flush your cache before disabling it:pxctl service pool cache flush <pool_id>The following example flushes the cache on a pool with an ID of
0:pxctl service pool cache flush 0Pool 0 has completed flush successfully -
Enter the
pxctl service pool cache disablecommand, specifying the<pool_id>of the pool you want to disable caching for:pxctl service pool cache disable <pool_id>The following example disables caching for a pool with an ID of
0:pxctl service pool cache disable 0Pool 0 detached cache successfully -
Exit pool maintenance mode:
pxctl service pool maintenance --exitPool transition operation will restart PX.Are you sure you want to proceed ? (Y/N): YPool transition request submitted. -
At this point, you can run the
pxctl service pool cache statuscommand to see if caching is disabled:pxctl service pool cache status 0PX Cache Configuration and Status:Pool ID: 0Enabled: falseMembers: [/dev/sdc]TotalBlocks: 0UsedBlocks: 0DirtyBlocks: 0ReadHits: 0ReadMisses: 0WriteHits: 0WriteMisses: 0BlockSize: 1048576Mode: writebackPolicy: smqTunables: migration_threshold=20480