Just to say, I have posted this question on the Raspberry Pi stack exchange, but I think it is a general Linux question (at least on the basic level to which my own knowledge extends), and that people in this community will be able to help with this, so I am asking it here.
I am new to managing filesystems, but am using a Raspberry Pi 3B with a 16GB SD card, and running an InfluxDB database on there. The Pi writes a datapoint every second, to the database which is just in the
I have seen that it is a bad idea for the life of the SD card to be doing lots of writes, and in addition it will just fill up the space on the card after a while. Therefore I have bought an external 240GB solid state drive , and a USB to SATA adapter , and my intention was to mount the drive to
/mnt/ and use it for storage of the database instead of the
/home/ directory. Since I would like to sometimes unplug the drive and read the data on Windows, it would be formatted as NTFS.
However, although this would solve the issue of storage space (the SSD is plenty big enough), in that scenario I would still be using the SD card for the Raspian (Buster Lite) operating system, which would then be writing data to the SSD drive over USB.
My questions are now:
Is this a bad idea?
Would it make more sense to partition the SSD into 2 partitions - one foramtted as NTFS for storage, and a second, smaller one (around 10GB) formatted for Linux (should this be Ext4?) which would just hold Raspian. The data would then be collected using InfluxDB on one partition and transferred to the second one, avoiding any writes on the SD card at all.
If so, what are the general steps to follow (and things to watch out for) to do this?
Is there a more sensible way?