Hard Drive Storage - Interesting problem

I am wonderring if this is a bug and may need to be posted in the developer forum. If so, please advise.

Here is what is happening. I have Haiku installed on an 11gig partition - dual booted with linux. It boots and everything works perfectly except for one small problem. The storage space decrease for no apparent reason. I just did a fresh install of A2 last night. after the install it said the OS was using 609mb and that I had 10gigs free. Without installing or downloading anything I rebooted and the OS now said it was taking 4GB? Same thing today, I rebooted and now the OS is using 7.2GB? So I wonder if there is a file responsible to identify the storage space used and available that is getting updated incorrectly or something? Any ideas? The space seem to be just disappearing after each reboot and nothing more. Any tests I can perform to troubleshoot? I appreciate any suggestions. Thanks

Try these out.

  1. Check if virtual memory is on or off (in your Preferences).
  2. Use ls in terminal to check the size of /boot/common/var/swap file.
  3. in terminal, type df to see total & free space
  4. in terminal, type checkfs /Haiku

Could be you have virtual memory on, that is 1) & 2) will check. 3) will check how much space is being used by Haiku on the partition. 4) will check for any corruption of the partition and try to fix it too. (should be all zeros if good).

Report back to let us know what happened.

Haiku has a neat GUI app that graphically shows used space to. Forget the name.

DiskUsage

  1. Use ls in terminal to check the size of /boot/common/var/swap file.

Make that ls -l /boot/common/var/swap

[quote=tonestone57]Try these out.

  1. Check if virtual memory is on or off (in your Preferences).
  2. Use ls in terminal to check the size of /boot/common/var/swap file.
  3. in terminal, type df to see total & free space
  4. in terminal, type checkfs /Haiku

Could be you have virtual memory on, that is 1) & 2) will check. 3) will check how much space is being used by Haiku on the partition. 4) will check for any corruption of the partition and try to fix it too. (should be all zeros if good).

Report back to let us know what happened.[/quote]

OK so you were correct. The virtual memory was enabled and the swap file was 6.5gig. So I disabled virtual memory and I set the requested swap file size (using the virtual memory gui from preferences) to 50mb and rebooted - No more space lost - but none regained. My question now - is there a way to flush the swap file (or if I simply delete it will it cause problems or will it auto recreate itself) to reclaim that space?

df shows that 7gig is used - though the swap file is 6.5 gig of that… and checkfs reports fine - all zeros.

Thanks to everybody for the responses and the help.

[quote=linuxluvr][quote=tonestone57]Try these out.

  1. Check if virtual memory is on or off (in your Preferences).
  2. Use ls in terminal to check the size of /boot/common/var/swap file.
  3. in terminal, type df to see total & free space
  4. in terminal, type checkfs /Haiku

Could be you have virtual memory on, that is 1) & 2) will check. 3) will check how much space is being used by Haiku on the partition. 4) will check for any corruption of the partition and try to fix it too. (should be all zeros if good).

Report back to let us know what happened.[/quote]

OK so you were correct. The virtual memory was enabled and the swap file was 6.5gig. So I disabled virtual memory and I set the requested swap file size (using the virtual memory gui from preferences) to 50mb and rebooted - No more space lost - but none regained. My question now - is there a way to flush the swap file (or if I simply delete it will it cause problems or will it auto recreate itself) to reclaim that space?

df shows that 7gig is used - though the swap file is 6.5 gig of that… and checkfs reports fine - all zeros.

Thanks to everybody for the responses and the help.[/quote]

OK I simply deleted the swap file and reclaimed all my space. So I assume that it would just be recreated if I turned on virtual memory again. Thanks all.

That is one thing that I think they should fix in Haiku. I know the standard way of doing the swap file, is to make it 2 1/2 times the size of memory in the system. But these days with people having 2 to 8 gigs of memory on average. The swap file size is getting HUGE

Maybe its time to go 1X the size of memory installed ?

On a second note, the swap file tool, you use to change the swap file size, has a slider, that doesn’t really work correctly, and is a little hard to understand

Wouldn’t it be better to have radio buttons, that say something like

  • same size as memory, * half size of memory, * twice the size of memory, * Off,
    Or * Set Manually, * Auto, etc

Then you could just click and reboot, rather then trying to slide that thing to the size you want, That will just keep getting bigger over the next few years, IE, the higher the number, the harder it is getting to zero in the slider on a small number

If nothing else, the slider has to go, and a number box replace it ?

Maybe this is something that needs to be talked about in a separate thread
Does anyone else feel that the swap file tool needs some work ?

[quote=tsteve]That is one thing that I think they should fix in Haiku. I know the standard way of doing the swap file, is to make it 2 1/2 times the size of memory in the system. But these days with people having 2 to 8 gigs of memory on average. The swap file size is getting HUGE

Maybe its time to go 1X the size of memory installed ?

On a second note, the swap file tool, you use to change the swap file size, has a slider, that doesn’t really work correctly, and is a little hard to understand

Wouldn’t it be better to have radio buttons, that say something like

  • same size as memory, * half size of memory, * twice the size of memory, * Off,
    Or * Set Manually, * Auto, etc

Then you could just click and reboot, rather then trying to slide that thing to the size you want, That will just keep getting bigger over the next few years, IE, the higher the number, the harder it is getting to zero in the slider on a small number

If nothing else, the slider has to go, and a number box replace it ?

Maybe this is something that needs to be talked about in a separate thread
Does anyone else feel that the swap file tool needs some work ?[/quote]

Ya this is probably one for the developer forum.

The problem still persists in Haiku Alpha 3. The difference being that if you delete the SWAP file, space isn’t regained. Something to do with inodes not refreshing correctly.

I’m also having the same problem with Alpha 3 as well. Any solutions?

I’m also having the same problem with Alpha 3 as well. Any solutions?

delete, go into setting/kernel/virtual memory and make sure it is set to ZERO in the text file. then run checkfs haiku from terminal and that should clean it up for you