Re: pi vs swap on flash
On Thursday 13 July 2017 12:00:43 Alan Corey wrote:
> Mine looks like:
> proc /proc proc defaults 0 0
> /dev/sda1 /boot vfat defaults 0 2
> /dev/sda2 / ext4 defaults,noatime 0 1
> /dev/sda3 none swap sw 0 0
Reading the manpage, I used:
/dev/sda2 none swap sw,defaults
And after a reboot, htop shows swap at 2099 megs. That includes the 100
meg swapFILE in /var. To turn that off:
sudo dphys-swapfile swapoff
or sudo dphys-swapfile swapon
I just turned it off. That I think can be put into /etc/rc.local as it
runs as root. But I can't make that work, without or with a sudo in
front of it. So where can I put it?.
I turned it off, then removed /var/swap. Won't reboot. WTH? THere isn't
anything in fstab but what I added, and nothing in /boot/config.txt or
cmdline.txt about swap. I can recover, but the most recent edits in the
linuxcnc tree haven't been backed up, damn!!!!! I'll try a full
powerdown before I swap cards to begin the recovery.
> And when you reboot you should see it in top as an increase in swap.
> The only downside I've found is that piclone doesn't know to ignore
> it. I put mine at the end of 320 GB, now I can't use piclone for
> backups to SD anymore. But there's been discussion that swap will
> wear out an SD fast, they're rated by read/write cyccles.
Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>