[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pi vs swap on flash

Try touch /var/swap so one exists?  Actually I think you're supposed
to dd a few gigs from /dev/zero in there.  I just left the swap file
alone, the reason being that my swap partition is on the end of the
drive which is going to cause head thrashing if it gets used a lot.
So some swap space near where everything else is is good.

Does your /boot/cmdline.txt still refer to the SD card?  Mine now says
root=/dev/sda2 The one on the hard drive that is.

On 7/13/17, Gene Heskett <gheskett@shentel.net> wrote:
> 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.
> Eggzakly. :)
> Thanks Alan.
> 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>

No, I won't  call it "climate change", do you have a "reality problem"? - AB1JX
Impeach  Impeach  Impeach  Impeach  Impeach  Impeach  Impeach  Impeach

Reply to: