Sometimes /home/guest becomes empty

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Sometimes /home/guest becomes empty

Post#1 by Rico Heart » 09 Jul 2015, 15:39

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?

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Sometimes /home/guest becomes empty

Post#2 by francois » 09 Jul 2015, 17:26

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. :)
Voltaire: Le mieux est l'ennemi du bien.

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#3 by Rico Heart » 09 Jul 2015, 19:22

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.

beny
Full of knowledge
Full of knowledge
Posts: 723
Joined: 02 Jan 2011, 11:33
Location: italy

Re: Sometimes /home/guest becomes empty

Post#4 by beny » 09 Jul 2015, 19:42

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?

tome
Contributor
Contributor
Posts: 562
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Sometimes /home/guest becomes empty

Post#5 by tome » 09 Jul 2015, 21:38

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)
viewtopic.php?f=48&t=3425#p24383

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#6 by Rico Heart » 10 Jul 2015, 04:39

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?

Bogomips
Full of knowledge
Full of knowledge
Posts: 2539
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Sometimes /home/guest becomes empty

Post#7 by Bogomips » 10 Jul 2015, 12:19

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% /
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

tome
Contributor
Contributor
Posts: 562
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Sometimes /home/guest becomes empty

Post#8 by tome » 10 Jul 2015, 19:43

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.

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#9 by Rico Heart » 11 Jul 2015, 14:15

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

Bogomips
Full of knowledge
Full of knowledge
Posts: 2539
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Sometimes /home/guest becomes empty

Post#10 by Bogomips » 11 Jul 2015, 14:39

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.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

donald
Full of knowledge
Full of knowledge
Posts: 1158
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Sometimes /home/guest becomes empty

Post#11 by donald » 11 Jul 2015, 16:53

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

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#12 by Rico Heart » 12 Jul 2015, 19:32

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?

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#13 by Rico Heart » 12 Jul 2015, 20:00

@ 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.
Last edited by Rico Heart on 13 Jul 2015, 07:14, edited 1 time in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2539
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Sometimes /home/guest becomes empty

Post#14 by Bogomips » 12 Jul 2015, 20:22

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.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Rico Heart
White ninja
White ninja
Posts: 17
Joined: 24 Jun 2015, 13:14
Distribution: Porteus 3.1 XFCE
Location: Europe

Re: Sometimes /home/guest becomes empty

Post#15 by Rico Heart » 13 Jul 2015, 07:11

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?

Post Reply