----------------------------------------------------------------------------------
@MSGID: 3:633/10 6d83f224
@REPLY: 3:633/10 b38243cc
@PID: PyGate 1.5.13
@TID: PyGate/Linux 1.5.13
@CHRS: ASCII 1
@TZUTC: 1100
@REPLYADDR: bp@www.zefox.net
@REPLYTO: 3:633/10 UUCP
@RFC-Message-ID: <10pfjuo$bhl2$1@dont-email.me>
Jim Diamond <
zsd@jdvb.ca> wrote:
> On 2026-03-15 at 19:53 ADT,
bp@www.zefox.net <
bp@www.zefox.net> wrote:
>> Jim Diamond <
zsd@jdvb.ca> 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-)
>
> Thanks. :-)
>
>> 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.
>
> So far, I follow you.
>
>> 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.
>
> Assuming you are using a mechanical disk (I don`t think you said anywhere,
> did you?), there is some (a smallish?) gain to be had for minimizing head
> movement. If you are using an SSD through some SATA-USB dongle, then you
> can completely forget about worrying where on the disk to put swap... the
> end is fine.
>
If I was going to set up swap it seemed prudent to make it as fast
as I reasonably could. I didn`t (and so far still don`t) have a clear
idea how much difference a swap file versus a swap partition makes.
> Carrying on with the assumption that you are using a mechanical disk...
>
> Someone else already pointed out that /sbin is (on Raspberrry Pi OS and
> many others) just yet another sym link. On current systems where /bin is
> just a link to /usr/bin, except for occasional updates for log files, I
> doubt that your system would be accessing / (the "without /usr" version of
> /) very often. (Unless your /tmp is not a tmpfs and you are using /tmp a
> lot, for whatever reason.)
>
I`m a little embarassed to admit I didn`t know /sbin was merely a link.
/sbin is part of / on FreeBSD and I never thought to check RasPiOS.
> You also didn`t tell us where /home is going to be. Were you thinking
> of having it on its own partition? That decision may be more significant
> than any possible benefit from separating /usr from /.
>
Typically I put home on /usr/home when I`m setting up a machine by
hand. In this case I planned to leave it in /, supposing it wasn`t
important to the question at hand.
>> 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.
>
> That is true.
>
>> 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.
>
> You mean "a single partition for / and /usr" ?
> I`m not sure that it is required, but I wouldn`t be surprised if having
> /usr on its own partition caused problems. But I`m happy to be educated
> about that!
>
>>> 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.
>
> See above.
>
Point taken 8-)
>> Whether /home/, /var/ and /tmp/ can be links to /usr is less clear to
>> me at this point.
>
> /home certainly can, and if /usr gets mounted "early enough" during boot,
> maybe /var and /tmp can be too. But if you do that, you now have a
> minuscule amount of stuff sitting there by itself on /, and I can`t imagine
> the benefit of having swap between "almost nothing" and "almost everything".
>
>> 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.
>
> OK. I thought it your original message you said something about making /
> as small as possible.
>
The plan was to resize / to what`s occupied now, add a 16GB swap partitiion,
add another partition after that and copy the contents of usr to the new
partition. The next step would be to clean out the old /usr tree and mount
the new usr partition on the old mountpoint. That would free space in /.
Since /sbin isn`t a freestanding directory, this seems impossible without
booting from a separate root device, likely a microSD. I didn`t see this
hurdle coming, at all. It isn`t a fatal blunder, but it`s a blunder.
In the meantime it has developed the machine has a swapfile, but it
was limited to 2GB, which on an 8GB machine makes little sense. The
limit is now removed and the machine has about 16GB swap.
It`ll take some time to see how the machine behaves. At the moment
YouTube seems quite sluggish with only 80MB swap in use. Perhaps
my notion that lack of memory was the main culprint is mistaken.
>>> OP, where are you... ?
>
>> Busy trying to drink from a firehose 8-)
>
> Tricky to not drown. Although I`ve seen dogs trying to drink from garden
> hoses, it might just be a matter of scale.
I`ve definitely gotten a snootful, but have learned at lot in the bargain.
Thanks for writing,
bob prohaska
--- PyGate Linux v1.5.13
* Origin: Dragon`s Lair, PyGate NNTP<>Fido Gate (3:633/10)
SEEN-BY: 19/10 50/109 153/757 218/840 840 220/70
221/1 6 360 226/17 100
SEEN-BY: 229/426 240/1120 267/800 301/1 113 812
310/31 335/364 341/66 463/68
SEEN-BY: 633/10 280 414 416 418 420 422 509 2744
712/848 770/1 3 100 340 350
SEEN-BY: 772/210 220 230 5019/40 5020/715 848 1042
4441 12000 5030/49 722
SEEN-BY: 5030/1081 1474 5053/55 5061/133 5075/128
@PATH: 633/10 280 770/1 218/840 221/6 301/1
5020/1042 4441