Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 20 Sep 2018, 08:46
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Savefolder without 'mount -o bind' - works
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Tue 28 Oct 2014, 04:26    Post subject:  

pull request ? Wink
_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1542
Location: Brisbane, Australia

PostPosted: Tue 28 Oct 2014, 05:45    Post subject:  

mavrothal wrote:
pull request ? Wink
Yes
gyro
Back to top
View user's profile Send private message 
rg66


Joined: 23 Jul 2012
Posts: 1160
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Thu 30 Oct 2014, 17:33    Post subject:  

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
X-series repo
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Fri 31 Oct 2014, 01:27    Post subject:  

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?

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
rg66


Joined: 23 Jul 2012
Posts: 1160
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Fri 31 Oct 2014, 02:48    Post subject:  

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
X-series repo
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Fri 31 Oct 2014, 04:35    Post subject:  

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.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
rg66


Joined: 23 Jul 2012
Posts: 1160
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Fri 31 Oct 2014, 06:10    Post subject:  

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:
#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:
# free
                     total           used            free    shared       buffers
Mem:       3337224       560364      2776860            0        34896
-/+ buffers:                  525468      2811756
Swap:                 0                0                0

Modded init
Code:
#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:
# free
                     total          used             free    shared       buffers
Mem:       3337224       558476      2778748            0        34664
-/+ buffers:                  523812      2813412
Swap:                 0                0                0

Modded init with savefile
Code:
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
X-series repo
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11156

PostPosted: Sat 01 Nov 2014, 09:27    Post subject:  

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
Back to top
View user's profile Send private message 
rg66


Joined: 23 Jul 2012
Posts: 1160
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Sun 02 Nov 2014, 03:10    Post subject:  

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
X-series repo
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11156

PostPosted: Sun 02 Nov 2014, 05:41    Post subject:  

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 Very Happy

mike
Back to top
View user's profile Send private message 
peebee


Joined: 21 Sep 2008
Posts: 3467
Location: Worcestershire, UK

PostPosted: Sun 02 Nov 2014, 12:10    Post subject: Problem with mechanism to make savefolder names unique  

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

_________________
LxPup = Puppy + LXDE
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Sun 02 Nov 2014, 18:28    Post subject: Re: Problem with mechanism to make savefolder names unique  

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?

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
peebee


Joined: 21 Sep 2008
Posts: 3467
Location: Worcestershire, UK

PostPosted: Mon 03 Nov 2014, 03:22    Post subject: Re: Problem with mechanism to make savefolder names unique  

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

_________________
LxPup = Puppy + LXDE
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Mon 03 Nov 2014, 06:21    Post subject: Re: Problem with mechanism to make savefolder names unique  

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).

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2976

PostPosted: Tue 04 Nov 2014, 05:44    Post subject: Re: Problem with mechanism to make savefolder names unique
Subject description: shutdownconfig fix
 

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:
--- 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
shutdownconfig_fix.pet
Description  fixes empty save file/folder after name clash
pet

 Download 
Filename  shutdownconfig_fix.pet 
Filesize  13.47 KB 
Downloaded  205 Time(s) 

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 9 [132 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0723s ][ Queries: 12 (0.0147s) ][ GZIP on ]