# Gcache.page file location

**URL:** <https://forums.percona.com/t/gcache-page-file-location/16526>\
**Category:** Uncategorized\
**Created:** [July 12, 2022, 12:59pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526 "2022-07-12T12:59:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 12, 2022, 12:59pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/1 "2022-07-12T12:59:40Z")

</div>

Can the gcache.page files save to a different location. Currently they are in the datadir but i would like to store them in another mount.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 12, 2022, 2:22pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/2 "2022-07-12T14:22:13Z")

</div>

`wsrep_provider_options="gcache.dir=/path/to/dir"`

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 12, 2022, 2:40pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/3 "2022-07-12T14:40:14Z")

</div>

Thanks. How to auto purge those files? My datadir filled up with the files and my cluster failed. I am moving the gcache.page to another directory. The 5 node cluster was in sync.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 12, 2022, 2:42pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/4 "2022-07-12T14:42:51Z")

</div>

Shutdown MySQL, delete them, change the variable, start mysql. They are just cache files and transactions will be fetched if the local node does not have them.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 12, 2022, 4:36pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/5 "2022-07-12T16:36:12Z")

</div>

I am getting the following error

```auto
2022-07-12T16:34:01.211301Z 0 [ERROR] [MY-000000] [Galera] deque::_M_new_elements_at_back
2022-07-12T16:34:01.211442Z 0 [ERROR] [MY-000000] [Galera] Failed to create a new provider '/usr/lib/galera4/libgalera_smm.so' with options 'gcache.size = 5G; gcache.dir = /db2/cache;socket.ssl_key=/etc/mysql/percona-cert/server-key.pem;socket.ssl_ca=/etc/mysql/percona-cert/ca.pem;socket.ssl_cert=/etc/mysql/percona-cert/server-cert.pem': Failed to initialize wsrep provider
2022-07-12T16:34:01.211477Z 0 [ERROR] [MY-000000] [WSREP] Failed to load provider
2022-07-12T16:34:01.211505Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-12T16:34:01.211748Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26-16.1) Percona XtraDB Cluster (GPL), Release rel16, Revision b141904, WSREP version 26.4.3.

```

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [July 12, 2022, 4:53pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/6 "2022-07-12T16:53:22Z")

</div>

Can the mysqld user access the new directory?

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 12, 2022, 5:07pm UTC](https://forums.percona.com/t/gcache-page-file-location/16526/7 "2022-07-12T17:07:20Z")

</div>

Yes the mysql user can access the new directory.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 13, 2022, 11:43am UTC](https://forums.percona.com/t/gcache-page-file-location/16526/8 "2022-07-13T11:43:12Z")

</div>

I deleted the `galera.cache` file which allowed the nodes to join the cluster.

---

<div class="post-metadata">

**Author:** ![danarashad](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@danarashad](https://forums.percona.com/u/danarashad)\
**Post date:** [July 13, 2022, 11:47am UTC](https://forums.percona.com/t/gcache-page-file-location/16526/9 "2022-07-13T11:47:24Z")

</div>

Is there a way to have them auto purge or limit how many I keep? They are filling up HD space fast, which will lock up my system again.
