Page 1 of 2

Sometimes /home/guest becomes empty

Posted: 09 Jul 2015, 15:39
by Rico Heart
Hello,

This has happened before a few times. It's really scary. =@
All, even the hidden files & folders disappear from /home/guest from time to time.
Pendrive is a brand new Transcend JetFlash 710 64GB formatted to ext4, reboot brings the folder back. Porteus32 XFCE copy2ram. (Can copy2ram be the problem?)

Edit: psinfo re: Memory after a reboot with Firefox and Thunar and info app open:

Code: Select all

Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Number Of Devices: 1
MemTotal:        3234468 kB
MemFree:          884440 kB
MemAvailable:    2227776 kB
Buffers:           80412 kB
Cached:          1659440 kB
SwapCached:            0 kB
Active:           671460 kB
Inactive:        1553220 kB
Active(anon):     486804 kB
Inactive(anon):   247220 kB
Active(file):     184656 kB
Inactive(file):  1306000 kB
Unevictable:          32 kB
Mlocked:              32 kB
HighTotal:       2362440 kB
HighFree:         637968 kB
LowTotal:         872028 kB
LowFree:          246472 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                72 kB
Writeback:             0 kB
AnonPages:        484880 kB
Mapped:           107820 kB
Shmem:            249176 kB
Slab:              87240 kB
SReclaimable:      41804 kB
SUnreclaim:        45436 kB
KernelStack:        2624 kB
PageTables:         2568 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1617232 kB
Committed_AS:    1575348 kB
VmallocTotal:     122880 kB
VmallocUsed:       33936 kB
VmallocChunk:      74248 kB
AnonHugePages:    147456 kB
DirectMap4k:       12280 kB
DirectMap4M:      892928 kB

Today it happened during a 3 GB cut/paste from a FAT32 pendrive to /home/guest. In the middle of it suddenly Thunar started to complain about "read only file system".

Any ideas, advice, info on this?

Re: Sometimes /home/guest becomes empty

Posted: 09 Jul 2015, 17:26
by francois
Welcome on porteus forum Rico!

Did you try with a new persistence or save change folder? Usually linux os works better with linux filesystem ext2, ext3, ext4 for example. :)

Re: Sometimes /home/guest becomes empty

Posted: 09 Jul 2015, 19:22
by Rico Heart
Hello, thanks for welcoming me :)

Porteus is on ext4. (The data pendrive is FAT32.)

My hunch points to copy2ram, so I'll not use it for a while and see if the disappearing of /home/guest/* happens again.

I love Porteus and I want to trust it. So if anyone reading this has any ideas or own experience about this, please write.

Re: Sometimes /home/guest becomes empty

Posted: 09 Jul 2015, 19:42
by beny
hi how much ram you have in system? ok i have seen,you can try other boot option and see if work well or not, guest have permission to cut paste copy and other thunar task?

Re: Sometimes /home/guest becomes empty

Posted: 09 Jul 2015, 21:38
by tome
3 GB cut/paste from a FAT32 pendrive to /home/guest.
copy2ram
that is the problem

Solution:
use ramsize= cheatcode and/or
64bit kernel for booting 32bit ISOs - there is nothing wrong with it (in fact this trick will let you take full advantages of 64bit kernels like better performance and no 4GB RAM limit)
http://forum.porteus.org/viewtopic.php? ... 425#p24383

Re: Sometimes /home/guest becomes empty

Posted: 10 Jul 2015, 04:39
by Rico Heart
Thanks for writing!

@beny

Depends on which PC I use, but 2-4 GB. Yes, I'm not using copy2ram for the time being. Yes, user 'guest' has permissions to copy/cut/paste and other Thunar tasks.


@tome

Thanks for the concrete tips!

* ramsize cheatcode

"Will let you set a custom size for the tmpfs partition which is used as the root (/) of your live filesystem when changes are not saved on a real filesystem (i.e., Always Fresh mode). The default value is 60% of available RAM memory."

Looks like this is only in effect "when changes are not saved on a real filesystem (i.e., Always Fresh mode)". In my case changes are saved to /porteus.

* 64bit kernel for booting 32bit for better performance and no 4GB RAM limit

Sounds like a useful tweak. I want to be able to boot on 32bit CPUs too, and I'm guessing with a 64bit kernel I won't be able to.

* copying files with copy2ram active

I understand that this was the issue, but I don't see why this is inevitable. Copying larger-than-RAM files has never been a problem on any system I used. In this case there were a lot of small files, and the biggest file was 1.4GB, smaller than RAM, only 3GB cumulatively.

Can it be that Porteus with copy2ram is 'thinking' RAM is bigger than it actually is? Or some kind of overflow or logical loop?

Re: Sometimes /home/guest becomes empty

Posted: 10 Jul 2015, 12:19
by Bogomips
Rico Heart wrote:Can it be that Porteus with copy2ram is 'thinking' RAM is bigger than it actually is? Or some kind of overflow or logical loop?
So far no trouble copying movies, having 880 MiB of RAM and copy2ram ramsize=30%

Code: Select all

guest@porteus:~$ df  -h .
Filesystem      Size  Used Avail Use% Mounted on
aufs            265M  9.7M  255M   4% /

Re: Sometimes /home/guest becomes empty

Posted: 10 Jul 2015, 19:43
by tome
Can it be that Porteus with copy2ram is 'thinking' RAM is bigger than it actually is?
Yes, but even if copy2ram is not used.
Current RAM ~= Full RAM - tmpfs + swap
Your temporary filesystem is stored in ram and copied files goes also to ram, unless you use magic changes, symlink to hard drive or pure changes= cheatcode.
You should try copy files to real filesystem - /mnt/sdxY, not to /home/guest.

Re: Sometimes /home/guest becomes empty

Posted: 11 Jul 2015, 14:15
by Rico Heart
@Bogomips

Do you think 'ramsize=30%' protected you from what happened with me?
If what the cheatcodes documentation says is true, then 'ramsize' is only in effect "when changes are not saved on a real filesystem (i.e., Always Fresh mode)". Are you using changes=/porteus? Have you been copying into /home/guest?

aufs... interesting... (I'll be learning about Porteus' ways as I go and have capacity)

@tome

"Your temporary filesystem is stored in ram and copied files goes also to ram, unless you use magic changes, symlink to hard drive or pure changes= cheatcode."

I was hoping to use a big pendrive as I would a HD-installed OS, but I have to learn the limitations and tricks it seems.

"You should try copy files to real filesystem - /mnt/sdxY, not to /home/guest."

Sounds like a good idea!
If I use /mnt/sdxY/porteus/changes/home/guest/ instead of /home/guest, copying will not use RAM in a way that can result in /home/guest becoming empty? Or is this a bad idea?

I still don't understand what actually happened, therefore I'm not sure about how to safeguard against it when the OS itself does not.

Re: Sometimes /home/guest becomes empty

Posted: 11 Jul 2015, 14:39
by Bogomips
Rico Heart wrote:@Bogomips

Do you think 'ramsize=30%' protected you from what happened with me?
If what the cheatcodes documentation says is true, then 'ramsize' is only in effect "when changes are not saved on a real filesystem (i.e., Always Fresh mode)". Are you using changes=/porteus? Have you been copying into /home/guest?

aufs... interesting... (I'll be learning about Porteus' ways as I go and have capacity)
You were not very clear about what you were doing, and I have met this problem on another distro when copying a large file bigger than available RAM from one hard disk partition to another hard disk partition and the copying never ended. Presumably the copy program was trying to allocate a buffer bigger than available memory. Just tried to show that this has not happened on Porteus, if that was what you were trying to do.

Re: Sometimes /home/guest becomes empty

Posted: 11 Jul 2015, 16:53
by donald
@ Rico Heart
I think tome has been very clear:
--> Your temporary filesystem is stored in ram and copied files goes also to ram
You should try copy files to real filesystem <--

I wouldn't put big files into /home/guest, (when saving changes), because they
will be loaded into RAM at every boot.This slows down booting and occupy the RAM.

So what to do?..e.g.create a Folder outside of porteus,(but on your usb-flash),
e.g. /mnt/sdXN/storage, and place / copy large Files direcly into that Folder.

Re: Sometimes /home/guest becomes empty

Posted: 12 Jul 2015, 19:32
by Rico Heart
Thanks guys for the input so far.

I've learned from you that all of /home/guest is loaded into RAM when in copy2ram mode (but not with the default boot, right?). So it's best to keep big files on a separate partition, because when RAM gets full (e.g. while copying large files), the temp filesystem gets unmounted (??? not sure what exactly happens). Also there is no safeguarding against this or a notification or alert, so it will come as a surprise for the naive user like me.

As for the workaround, I already had a separate NTFS partition on the pendrive 'just in case', but I've changed it to EXT4 and made it much larger.

This empty 'data' pendrive partition is auto mounted as root, which is a bit of a problem to solve, as I want to use it as guest.
/etc/fstab says
# Do not edit this file as fstab is recreated automatically during every boot.
# Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount
# drive, filesystem or network share.
And I don't know how to ask Porteus to mount the other pendrive partition as guest instead of root. Searching the forums in 3-4 different queries for this I've found nothing.

But this is arguably off topic. Shall I start another thread about automounting a separate pendrive partition for guest?

Re: Sometimes /home/guest becomes empty

Posted: 12 Jul 2015, 20:00
by Rico Heart
@ Bogomips

The way you quoted me changed the context of my question about automounting as guest instead of root being slightly off topic, as it is about working around the /home/guest becoming empty if copying large files into it (in copy2ram mode only?).

The way you quoted me [in your since deleted comment] makes it look like my questions about when the issue of this thread occurs and what exactly happens were off topic, which is not so.

I really am interested in understanding these, because I find Porteus very useful.

Re: Sometimes /home/guest becomes empty

Posted: 12 Jul 2015, 20:22
by Bogomips
Rico Heart wrote:So it's best to keep big files on a separate partition, because when RAM gets full (e.g. while copying large files), the temp filesystem gets unmounted (??? not sure what exactly happens). Also there is no safeguarding against this or a notification or alert, so it will come as a surprise for the naive user like me
You are announcing that you are a Newbie, or am I mistaken?
Rico Heart wrote:Shall I start another thread about automounting a separate pendrive partition for guest?
To give you some guidance on your question I have suggested that you start the thread under Newbie questions.

Hope that my previous post has now been made crystal clear and devoid of any ambiguities.

Re: Sometimes /home/guest becomes empty

Posted: 13 Jul 2015, 07:11
by Rico Heart
1)
I consider /home/guest becoming empty while copying large files into it a serious bug, stopping that session (reboot). Something that is unintended and needs prevention in some way.
If no systemic prevention is feasible, at least a warning would be nice.
Am I mistaken?

2)
I do not understand how exactly it happens. That could help solve the problem, and I'm genuinely curious. And if it HAS TO happen, why?

3)
My /home/guest was in itself larger than my RAM. I doubt that it was loaded into RAM during boot in copy2ram mode. How?