Savefolder without 'mount -o bind' - works

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#91 Post by mavrothal »

pull request ? :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#92 Post by gyro »

mavrothal wrote:pull request ? :wink:
Yes
gyro

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#93 Post by rg66 »

This is probably not the right place to post this but it's the only thread I could find on save folders.

I was getting dir2sfs errors saying not enough space in /tmp where I was building. I looked at /tmp properties and it's max 854.3 MB. Is /tmp in RAM, and if I'm using a save folder couldn't it use the save partition instead? I'm assuming this is all in the init script but wouldn't know where to start.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#94 Post by mavrothal »

rg66 wrote: I was getting dir2sfs errors saying not enough space in /tmp where I was building. I looked at /tmp properties and it's max 854.3 MB. Is /tmp in RAM, and if I'm using a save folder couldn't it use the save partition instead?
Not sure what is the question.
Do you want to mount /tmp outside RAM (say /mnt/home/tmp) or to somehow increase tmpsf size while in RAM?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#95 Post by rg66 »

mavrothal wrote:
rg66 wrote: I was getting dir2sfs errors saying not enough space in /tmp where I was building. I looked at /tmp properties and it's max 854.3 MB. Is /tmp in RAM, and if I'm using a save folder couldn't it use the save partition instead?
Not sure what is the question.
Do you want to mount /tmp outside RAM (say /mnt/home/tmp) or to somehow increase tmpsf size while in RAM?
Yes, I want /tmp to be a symlink to /mnt/home/tmp so it can use the full partition free space. If my save dir is outside RAM, not sure of the point of using RAM for /tmp other than speed maybe.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#96 Post by mavrothal »

rg66 wrote: Yes, I want /tmp to be a symlink to /mnt/home/tmp so it can use the full partition free space. If my save dir is outside RAM, not sure of the point of using RAM for /tmp other than speed maybe.
/tmp is tmpfs filesystem which is temporary and is not preserved through reboots.
If you want to mount /tmp in another place and still be "tmp" checkout this
However, may be simpler to change your build script to build in a folder in your HD.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#97 Post by rg66 »

mavrothal wrote:
rg66 wrote: Yes, I want /tmp to be a symlink to /mnt/home/tmp so it can use the full partition free space. If my save dir is outside RAM, not sure of the point of using RAM for /tmp other than speed maybe.
/tmp is tmpfs filesystem which is temporary and is not preserved through reboots.
If you want to mount /tmp in another place and still be "tmp" checkout this
However, may be simpler to change your build script to build in a folder in your HD.
I don't need it to be preserved, just use the save partition free space. I think I've sorted it, although /tmp doesn't show as a symlink. /tmp has the same free space as the save partition and is synced to /pathtosavedir/tmp. Making a savefile goes back to tmpfs. The RAM usage is also a little less.

Original init (patched by gyro)

Code: Select all

#df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        74G   17G   54G  24% /initrd/mnt/dev_save
tmpfs           137M  136M 1000K 100% /initrd/mnt/tmpfs
/dev/loop0      136M  136M     0 100% /initrd/pup_ro2
tmpfs            27M   26M 1000K  97% /initrd/mnt/tmpfs4
/dev/loop4       26M   26M     0 100% /initrd/pup_z
tmpfs           1.1M   56K 1000K   6% /initrd/mnt/tmpfs3
/dev/loop3      128K  128K     0 100% /initrd/pup_y
/dev/loop5       30M   30M     0 100% /initrd/pup_ro5
/dev/loop6      132M  132M     0 100% /initrd/pup_ro6
unionfs          74G   17G   54G  24% /
tmpfs           815M  248K  815M   1% /tmp <------------
devtmpfs        1.6G     0  1.6G   0% /dev
shmfs           726M     0  726M   0% /dev/shm

Code: Select all

# free
                     total           used            free    shared       buffers
Mem:       3337224       560364      2776860            0        34896
-/+ buffers:                  525468      2811756
Swap:                 0                0                0
Modded init

Code: Select all

#df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        74G   17G   54G  24% /initrd/mnt/dev_save
tmpfs           137M  136M 1000K 100% /initrd/mnt/tmpfs
/dev/loop0      136M  136M     0 100% /initrd/pup_ro2
tmpfs            27M   26M 1000K  97% /initrd/mnt/tmpfs4
/dev/loop4       26M   26M     0 100% /initrd/pup_z
tmpfs           1.1M   56K 1000K   6% /initrd/mnt/tmpfs3
/dev/loop3      128K  128K     0 100% /initrd/pup_y
/dev/loop5       30M   30M     0 100% /initrd/pup_ro5
/dev/loop6      132M  132M     0 100% /initrd/pup_ro6
unionfs          74G   17G   54G  24% /
devtmpfs        1.6G     0  1.6G   0% /dev
shmfs           726M     0  726M   0% /dev/shm

Code: Select all

# free
                     total          used             free    shared       buffers
Mem:       3337224       558476      2778748            0        34664
-/+ buffers:                  523812      2813412
Swap:                 0                0                0
Modded init with savefile

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        74G   17G   54G  24% /initrd/mnt/dev_save
/dev/loop1      248M   17M  231M   7% /initrd/pup_rw
tmpfs           137M  136M 1000K 100% /initrd/mnt/tmpfs
/dev/loop0      136M  136M     0 100% /initrd/pup_ro2
tmpfs            27M   26M 1000K  97% /initrd/mnt/tmpfs4
/dev/loop4       26M   26M     0 100% /initrd/pup_z
tmpfs           1.1M   56K 1000K   6% /initrd/mnt/tmpfs3
/dev/loop3      128K  128K     0 100% /initrd/pup_y
unionfs         248M   17M  231M   7% /
tmpfs           815M  1.1M  814M   1% /tmp <--------------
devtmpfs        1.6G     0  1.6G   0% /dev
shmfs           727M     0  727M   0% /dev/shm
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#98 Post by mikeb »

Late reply but a tmpfs /tmp is a little mute when using a save partition...just need to remove the bit of code that creates in in rc.sysinit. Not sure if there is still /tmp clearout code in the rc.shutdown... it may need the save folder mode adding to keep it tidy.

Ram usage would vary according to tmpfs//tmp use as its dynamic.

mike

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#99 Post by rg66 »

It's not working as well as I'd hoped. It seems to still be using RAM as well as the directory. I'm now looking at rc.sysinit as something is still mounting tmpfs for /tmp. I can successfully boot into RAM, make /tmp symlink to my chosen dir but it disappears on making a save.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#100 Post by mikeb »

At this point I would do a text search for tmpfs.... will sniff it out...I don't use any recent pups so not 100% where to look though it has to happen early in the boot.

Search with something like searchmonkey unless you want to wait all day :D

mike

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Problem with mechanism to make savefolder names unique

#101 Post by peebee »

Reporting this here as it affects both TahrPup6.0 and Slacko5.9.3

Scenario:

boot pfix=ram
reboot and create savefolder with extra id

boot pfix=ram again
reboot and create savefolder with the same extra id

get pink warning that savefolder will have -1 appended to make it unique

however during shutdown get short flash of message that the savefolder minus the appended -1 is being used

the savefolder with appended -1 is created but is empty after the reboot

if the empty savefolder is subsequently chosen then chaos breaks out as it is empty
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Problem with mechanism to make savefolder names unique

#102 Post by mavrothal »

peebee wrote:Reporting this here as it affects both TahrPup6.0 and Slacko5.9.3

Scenario:

boot pfix=ram
reboot and create savefolder with extra id
Looks like a shutdownconfig issue.
Do you know if the extra id is needed for the folder to be empty?
ie do you see the same with the default names?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Re: Problem with mechanism to make savefolder names unique

#103 Post by peebee »

mavrothal wrote:
peebee wrote:Reporting this here as it affects both TahrPup6.0 and Slacko5.9.3

Scenario:

boot pfix=ram
reboot and create savefolder with extra id
Looks like a shutdownconfig issue.
Do you know if the extra id is needed for the folder to be empty?
ie do you see the same with the default names?
Same problem with default names (no extra id) - tested on Slacko5.9.3 - the savefolder slackosave-1 is created after the pink warning but not written to
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Problem with mechanism to make savefolder names unique

#104 Post by mavrothal »

peebee wrote: Same problem with default names (no extra id) - tested on Slacko5.9.3 - the savefolder slackosave-1 is created after the pink warning but not written to
A fast check suggests that $PUPSAVE is created before the $SAVEFILE and $NAMEONLY are modified because of the name clash so although these variables have the correct name with the added id the, $PUPSAVE which actually determines where the saving will happen does not.
So the data are going into the previous savedirectory.
This is certainly a problem with the modification of shutdownconfig to adopt savedirectory and is not related to the actually method of savedirectory (bind or link).
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Problem with mechanism to make savefolder names unique

#105 Post by mavrothal »

mavrothal wrote: A fast check suggests that $PUPSAVE is created before the $SAVEFILE and $NAMEONLY are modified because of the name clash so although these variables have the correct name with the added id the, $PUPSAVE which actually determines where the saving will happen does not.
So the data are going into the previous savedirectory.
This is certainly a problem with the modification of shutdownconfig to adopt savedirectory and is not related to the actually method of savedirectory (bind or link).
So here is a fix that works for me.

Code: Select all

--- a/usr/sbin/shutdownconfig	2014-11-03 07:03:30.736671557 +0200
+++ a/usr/sbin/shutdownconfig	2014-11-04 06:28:00.323333195 +0200
@@ -874,10 +874,10 @@
 echo "PUPMODE=${PUPMODE}
 SAVEPART='${SAVEPART}'
 SAVEFS='${SAVEFS}'
-PUPSAVE='${PUPSAVE}'
 SAVEFILE='${SAVEFILE}'
 NAMEONLY='${NAMEONLY}'
 SAVEPATH='${SAVEPATH}'
+PUPSAVE='${SAVEPART},${SAVEFS},${SAVEFILE}'
 MYPASSWORD='${MYPASSWORD}'
 SFEXT='${SFEXT}'
 xPDEV='${xPDEV}'
Please test, either by patching or using the attached pet
Attachments
shutdownconfig_fix.pet
fixes empty save file/folder after name clash
(13.47 KiB) Downloaded 303 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Re: Problem with mechanism to make savefolder names unique

#106 Post by peebee »

mavrothal wrote:Please test, either by patching or using the attached pet
Thanks Mav - all AOK in my tests
Cheers
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Re: Problem with mechanism to make savefolder names unique

#107 Post by gyro »

mavrothal wrote:Please test, either by patching or using the attached pet
Works fine on patched TahrPup 6.0.
I just tried using the default name a second time. It found the duplicate, said it was going to use a modified name, and did.

gyro

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#108 Post by mavrothal »

Thanks peebee, gyro
Committed
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#109 Post by mavrothal »

Now available for Puppy 5.2.8 :!: :D
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#110 Post by gyro »

Last edited by gyro on Sun 22 May 2016, 01:56, edited 1 time in total.

Post Reply