BBS:      TELESC.NET.BR
Assunto:  Re: Adding a hardware swap partition
De:       bp
Data:     Mon, 16 Mar 2026 14:30:01 +1100
-----------------------------------------------------------
Jim Diamond  wrote:
> 
> Yes, but that has nothing much to do with the OP's plan to put /usr on its
> own partition.  He didn't indicate where /home was going, but if he puts it
> on the root partition, he can still fill that up.  And if /var is on /root,
> also problems.
> 
> Which is why I was curious about why he wants to a separate /usr partition.

Since you ask...8-)

On rare occasions my 8GB Pi5 slowed to a crawl. Eventually I realized it was
happening when I had two browsers (firefox and chromium) both running with
too many tabs open. The system was short of memory. It needed swap to cope
this those occasions.

Hardware swap is _supposed_ to be faster than a swap partition, which made it,
at least in principle, more attractive. Also, in principle, a physical swap
partition can be placed _between_ (in the sense of seek stroke) /uar and /,
minimizing the amount of head movevent. This was true in the days of st506
disks, I'm not sure how true it is with SATA. So, I inquired about how this
might be done under RasPiOS. It's not hurgely hard under FreeBSD and
I thought there might be some nifty tools for the purpose in RasPiOS.

The answers received have now led me to question the orignal premises.
No nifty tools have come to light. The relative speed of file-vs-hardware
swap haven't been quantified. The need for occasional swap use remains, but
it's sporadic. Maybe a swapfile is good enough.... it's certainly easier.

It was a surprise to learn that a single partition is somehow required
for RasPiOS to function correctly. If true, it's a good thing to know.
 
> Back in the good old days there were enough programs in /bin (which was an
> actual directory, not a link to /usr/bin) to recover a system with disk
> errors (when possible, anyway).  But now that /bin is a link, I wonder if
> the system will even boot properly, since "user space" would have to mount
> /usr before almost all (all?) programs are available.  Including systemd.

Given that RasPiOS has an /sbin directory, I'm pretty sure the machine
will come up at worst in single-user if /usr can't be mounted normally.
Whether /home/, /var/ and  /tmp/  can be links to /usr is less clear to 
me at this point. 

The original plan would have left the machine with a /root of around
100GB and a /usr of around 800GB so running out of space isn't a problem. 

> OP, where are you... ?

Busy trying to drink from a firehose 8-) And, thanks to those at the pumps!

bob prohaska


--- PyGate Linux v1.5.13
 * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)

-----------------------------------------------------------
[Voltar]