Add commit=600 to fstab?

Technical issues/questions of an intermediate or advanced nature.
Post Reply
nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#1 by nanZor » 16 Apr 2019, 22:19

If I wanted to change the commit time to say every ten minutes (commit=600) to the /etc/fstab, (danger Will Robinson) how would I go about it?

I know you can't edit that file directly, and wonder what the best procedure for Porteus is?

Ed tipped me off to using the EXIT cheatcode, and that works fine for write-on-exit, but I'm wondering about something in between?

User avatar
Ed_P
Contributor
Contributor
Posts: 4855
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Add commit=600 to fstab?

Post#2 by Ed_P » 16 Apr 2019, 23:21

You can manually save your changes with the save-session command.
Ed

nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#3 by nanZor » 22 May 2019, 00:37

Ah, a followup as I was thinking about using the mopt cheatcode - but be forewarned:

Cheatcode mopt=commit=1 blows up Porteus. Suggestions?

Seems only applicable to ext3/4, and you'd have to edit your linuxrc inside initrd.xz to do so.

For now, think I'll just stick to the EXIT:/ cheatcode to cover all the filesystems in use...

and make a cron job for save-session every 10 minutes or whatever I feel is necessary. Sneaky teach' Ed_p. :)

nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#4 by nanZor » 22 May 2019, 02:32

** SOLVED **

Egads - fanthom is always just one little step ahead of me all the time! :) I'll edit original thread later.

save session [Solved]

But instead of the graphical save-session, I'll use the dump-session command as root instead in a cron job. How about 10 minutes after each hour?

As root:

Code: Select all

crontab -e
Added this to the crontab file activated by crontab -e

Code: Select all

10 * * * * /usr/bin/dump-session
Even though /usr/bin/dump-session is a link to the script in /opt/porteus-scripts, this way when I refer to the doc in the future, and if the actual script location changes in the future, this will still work. Ideally.

What makes this so cool is that by using the EXIT: cheatcode, along with a cron timed dump-session, I can finely tune how much I write to an ssd for example with the least amount of hassle.

Ok fanthom, enough Kiosk fun. Time to come back bro. :)

nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#5 by nanZor » 22 May 2019, 03:01

OT: This EXIT: and cronjob combo solves an issue for me in regards to cheap hardware ...

Some of the no-name boxes out there may advertise as having in internal ssd, when in fact all they are is micro sd-cards soldered down and show up as mmcblk devices. Reducing writes to those, especially when they aren't vetted for performance and reliability should benefit from reduced writes - yet at the same time I want *some* writes to happen periodically instead of waiting for shutdown.

OR, just avoid purchasing such devices in the first place. :)

User avatar
Ed_P
Contributor
Contributor
Posts: 4855
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Add commit=600 to fstab?

Post#6 by Ed_P » 22 May 2019, 04:52

Don't forget you can tweak what gets saved when shutting down with the changes-exit.conf file.

These are what I have added to my file:

Code: Select all

!/var/run
!/var/tmp
!/home/guest/.cache/thumbnails/normal
!/home/guest/.cache/mozilla/firefox/dxsqumip.default/thumbnails/
!/home/guest/.mozilla/firefox/Crash?Reports/pending/
!/home/guest/.mozilla/firefox/dxsqumip.default/storage/default/
!/home/guest/.mozilla/firefox/dxsqumip.default/datareporting/archived
!/home/guest/.java/deployment/cache/6.0/
I have no idea if these apply to save-sessions/dump-sessions.
Ed

nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#7 by nanZor » 22 May 2019, 07:49

Super sweet! I guess I'd have to check if this is an "exit:" only option and not part of the dump session. Then again, it is browser stuff which may not be too critical, unless it's like an education kiosk or something.

Interesting - thanks for the reminder.

nanZor
Samurai
Samurai
Posts: 132
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 4.0 64-bit Xfce
Location: Los Angeles

Add commit=600 to fstab?

Post#8 by nanZor » 28 May 2019, 00:09

nanZor wrote:
22 May 2019, 07:49
Super sweet! I guess I'd have to check if this is an "exit:" only option and not part of the dump session. Then again, it is browser stuff which may not be too critical, unless it's like an education kiosk or something.
Aha! It is specifically mentioned in the changelog for 2.1 rc2 I believe ..
- added 'dump-session' script for saving live session on a request when 'changes=EXIT' cheatcode is used
The release announcement and changelogs are fun to read. The zeal and excitement for the project really shows through. Makes ya' feel good about using Porteus!

User avatar
Ed_P
Contributor
Contributor
Posts: 4855
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Add commit=600 to fstab?

Post#9 by Ed_P » 28 May 2019, 01:33

:good: Good research namZor.
Ed

Post Reply