2

I'm using Ubuntu Server 22.04. The server has an HDD in it, and I'd like to be able to speed up disk access for that HDD. My system boots from an SSD, so my idea is that maybe I can use space on the SSD as a disk cache for the HDD. So I would have a file /home/ThisFileOnSsd that would act as a disk cache for /mnt/ThisSlowHDD.

I have a large amount of data on the HDD already, and the SSD is a boot drive as explained earlier, so I am unable to format or make dangerous changes to either drive.

Is there a way to do this?

Nmath
  • 12,105
  • 8
  • 25
  • 54
  • 1
    Somewhat unrelated, but you mention that you are unable to format either drive. You do have a backup system in place, right? If not, you should probably seriously consider putting a good backup system in place so that you don't lose your data in the event of a catastrophe (disk failure, file corruption, tornado, etc.). – ArrayBolt3 Aug 20 '22 at 00:21
  • You may want to examine [fs_setcachesize](https://manpages.ubuntu.com/manpages/jammy/man1/fs_setcachesize.1.html), as there are some options available if you’re using disk caching (as opposed to memory caching) – matigo Aug 20 '22 at 01:20
  • 2
    The kernel utilizes free RAM for disk cache automatically, and that is the best there is given your suggested use case … Other use cases like https://askubuntu.com/q/1418874 might benefit from utilizing that SSD … but not your suggested use case IMHO. – Raffa Aug 20 '22 at 05:11

0 Answers0