The Raspberry Pi computer is fast overtaking all other devices and is now second only to Android based smartphones. Most Raspberry Pi devices run the Raspberry Pi OS on microSD cards. How much space do you need for the operating system and other parts of your project?
Who uses the Raspberry Pi OS?
There are about a billion Raspberry Pi devices out in the world and most use the Raspberry Pi OS for education, small to medium projects, and general office use in small businesses. Home media projects might use an alternative like LibreELEC with KODI. In most cases people use the Pi OS first then they may experiment with something else for a specific use. As an example, they may use a Raspberry Pi 3B as an experiment to build a router then switch to something like OpenWrt on a smaller Pi, perhaps a Pi Zero.
What is Raspberry Pi OS?
Raspberry Pi OS is a distribution of Linux, which means it has a core of Linux then other things added on. You might compare a Linux distribution to a Lotus car. Lotus do not make engines so they buy engines from Renault, Ford, Mercedes, whoever. A Linux distribution is an operating system with a Linux engine.
Raspberry Pi have three versions of their OS, the standard 32 bit version for all Raspberry Pi devices, a new 64 bit version for later models, and a Raspberry Pi Desktop OS for AMD/Intel based computers. I am looking at the most common version, the 32 bit version, as I have several models of the Raspberry Pi.
The various models of the Pi have ARM processors, the same as your smartphone, tablet, television, and are ARMv6, ARMv7, or ARMv8. All the standard Pi software is compiled for ARMv6 and runs across all devices. Some add-on software is compiled for ARMv7 which means it will not run on my Pi Zero.
The user interface, the GUI, is LXDE which is lighter in weight than most of the other GUIs available for Linux. LXDE works on my smallest Pi, the Zero.
When would you worry about disk space?
The Raspberry Pi uses a microSD card as the system disk. When I purchased my first Pi, the Pi people recommended an 8 GB card. I found the card filled up too fast for general projects. For my next Pi, I used a 16 GB card and did not have to worry about space. Now high quality fast 16 GB cards are almost the same price as 8 GB cards and 32 GB cards are fast dropping in price.
You can download the Pi OS as "full", "lite", or the regular version. The full version fills 8 GB before starting anything. Start with a 32 GB card for the full version. Use 16 GB cards for the regular and lite versions.
After you develop a project, you can delete anything you are not using then look at the space used. You might be able to recycle an old small card for a less demanding project. If start with the lite version of the OS and your project logs small amounts of data, your project might log for a year before it fills an 8 GB card. Given the small price difference, I cannot be bothered worrying about what might happen.
For anything bigger, you are better off adding a USB disk for the data or shipping logged data to a central file server.
Did you add a camera? The Pi projects often feature a camera and there are add-on cameras with higher resolution. I good image can be over 1 MegaByte. My photographs, when edited down to 2K television size, are in the range of 1.2 MB up to 1.6 MB. Set up a monitoring system to take one photograph per hour. You are using from 29 MB up to 38 MB per day. That is 1.2 GigaByte per month. Now multiply by the minimum of six cameras I would need to monitor my garden for growth, glowering, fruit, and pests. Over 7 GB per month. I need up to two months for travel.
Now add faster monitoring when there is movement, perhaps one image per minute for the hour that a possum might eat flowers in the garden. an extra 6 GB. A possum and a cat? You can see how it quickly adds up over 32 GB. An upgrade to 4K would make that 128 GB.
Just one camera monitoring seedling growth to produce a slow motion video could produce more than 2 GB per day. There goes another 64 GB. A 128 GB SSD left over from a notebook upgrade might not be big enough.
Where do you look for disk space usage?
This page is one place. The space mentioned here is the space you need for the first boot into your new system. You can then look at the file manager to see ongoing usage and free space.
You need to check the usage for each application you use. Applications log usage. For most, it is just tiny amounts. Some dump huge amounts or create big backups on a regular basis. Check the space used each day for a week then each week for a month then each month. If the overall increase is slow, there is nothing to worry about.
For a medium speed increase, shop around for a bigger card on sale. For a fast increase, plug in a USB SSD.
Why would you over allocate space?
Why install far more space than you need? Lets start with program code. The Pi OS full version has lots of educational software that doubles the space used by the OS. When you install a program, it can be huge compared to the trim software supplied with the regular OS. A tiny program can request lots of other packages including hundreds of megabytes of Java. Ouch!
Any program can write logs of activity and data. They are usually small. Across a year and multiplied by dozens of programs, they can fill a small card. Do you want your garden watering system to fail when you go on holidays just because you saved $3 by using a smaller card?
Anything that creates images or videos will flood the biggest card. You need to set the system to delete the oldest files on a regular basis. The system can still expand due to missed items or a slight increase in the frequency of recording.
Think about an automated security camera recording only movement. You set it up and it runs reliably for a few months. You forget about it. A cat moves into the neighbourhood and sets off your camera recording for hours each night.
When you add a disk, magnetic or SSD, the work and cost involved is significant. The important thing is the work does not increase no matter how big the disk. A 2.5" magnetic disk could be 1 TeraByte or 5 TB, the installation and setup are the same. The cost is often not much different. Our local shots sometimes have 2 TB USB disks on sale for the same price as their 1 TB disks. In the same range, 4 TB disks are often on sale as there is so much competition. SSDs are in the same price fight for anything less than 2 TB.
If you are not in a rush, you can often buy twice the size for just a few dollars more. The extra space might mean you can relax on holidays for several months instead of a few weeks, your plants will be watered perfectly.
Way?
Way to create space? Way to maintain space. You need a plan.
Creating microSD card space is easy, buy bigger. You can buy up to 1 TB. Those big cards are expensive. Watch the items on sale. I am about to buy a 64 GB card because a fast quality card is on sale at half price and I will have it for my next project.
Adding another USB storage device is more work. You have to buy the storage device and an enclosure or a device in an enclosure. You need a cable if not supplied. You might need a USB hub to expand the range of USB ports. You have to plug the device in then configure the OS to direct data onto the device. You have to test. What happens when the device is unplugged?
Your external storage could be a USB flash memory stick but they are no faster or more useful or cheaper than a bigger microSD card. In fact the plugged in stick can be bumped, breaking your Raspberry Pi computer. Plugged in sticks should be on an extension lead or in a hub. Recycling an old USB stick also means you get the slower speed of the old sticks plus less reliability.
A USB magnetic disk makes the most sense from 1 TB up as the disks are cheap. The Pi 3B, 3B+, and 4 can power a 2.5" disk. The Pi 4 can power 2 of those disks. Local office supply shops always have at least one brand on sale as there is so much competition. They may require a Y cable to run off USB 2 ports as USB 2 ports provide only half the power of USB 3 ports.
The biggest disadvantage of magnetic disks is the way they die when bumped. Magnetic disks are good in desktop computers because desktops are no bumped off your desk onto the floor. I would only use a rotating rust device in a Pi project if the project was built into a solid box that will not move.
SSDs use less power and most can run off a USB 2 port. SSDs below 1 TB are always on sale. Plus there are lots of SSDs left over from upgrades to larger SSDs. The left overs are mostly mSATA and there are really low cost mSATA enclosures. You can also buy bare boards for the mSATA drive or just leave off the enclosure case when your project will be enclosed.
Worth?
Last time I purchased a microSD card, the shops had dropped 8 GB cards and moved 16 GB down to the same price. Today I found quality fast 64 GB cards for the same price. Skimping on the microSD card space is no longer worth the effort for anything less than the new Raspberry Pi 4 model.
The Raspberry Pi models up to the 3B+ all have USB2 connections. The Pi 4 has USB3. With USB3, you can make use of fast SSDs for managing large amounts of data. When anyone upgrades an SSD for more space, the old SSD can plug into a Pi 4 for really fast data access compared to a microSD card. I suggest a Pi 4 with more than 64 GB of data should use an SSD for the data, not the microSD card.
The original mSATA drives on notebook computers were 128 GB. Many of those notebooks are falling apart but have perfectly good SSDs ready to recycle into your next Pi project. Many of those 128 GB SSDs were replaced with 512 GB or larger SSDs. An mSATA to USB 3 enclosure is only a few dollars. The result is cheaper than a fast 128 GB microSD card.
Conclusion
Plan ahead. Shop around. Buy far bigger than what you need for your first project. After the project passes all testing and you have more experience, you can downsize to smaller storage and recycle the big storage for the next project.
- Log in to post comments