Opened 13 years ago

Last modified 7 years ago

#7550 assigned bug

persistent swap file

Reported by: wretched_dutchman Owned by: leavengood
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/alpha2
Keywords: persistent swap file Cc:
Blocked By: Blocking:
Platform: x86

Description

I currently have set up a virtual machine via iso (hrev41641) on a 5 gig virtual harddisk and 2gig internal memory.

After installation I noticed that the hard disk is still as almost just as full as when I would use a 750 meg harddisk. I found that the installer created a swap-file of 4 gigabyte, which, in my opinion isn't necessary. I tried to shrink or delete the swap-file to create more space, but this doesn't seem possible. I've tried the following options: Use the VirtualMemory application to a low value and re-disable it altogether. rm /boot/common/var/swap shred /boot/common/var/swap

Non of these options seems to free the diskspace. du shows that after deletion still only +/- 470Meg is used, but df and the DiskUsage utility both give me a free space of 618 meg In other words, when the file is removed it doesn't free it's inode on the file-system.

Change History (5)

comment:1 by leavengood, 13 years ago

Owner: changed from axeld to leavengood
Status: newassigned

Taking ownership.

comment:2 by Cypress, 13 years ago

Having the same issue in Haiku Alpha 3, istalled on it's own partition. Same issues as above. I even edited /boot/home/config/settings/kernel/drivers/virtual_memory manually and specified a partition size in plaintext. Now it created a swap file the specified size, but there's still no free space left on my 4GB partition. Same problem with inodes as above.

comment:3 by Cypress, 13 years ago

To reclaim the lost "ghost" space after deleting the SWAP file, run

checkfs /Haiku

This does the trick in Haiku Alpha 3.

comment:4 by wretched_dutchman, 13 years ago

it works, but it requires a reboot. At least after a clean install and removing on first boot.

comment:5 by axeld, 7 years ago

Component: File Systems/BFSSystem/Kernel

BFS cannot free up the space as long as the file is in use, which is obviously the case here. There is little one can do about that, though, besides letting the kernel close that file in time.

Note: See TracTickets for help on using tickets.