1

Why is the / proc / kcore file so large? 128T, and when the disk snapshot is taken, the capacity of the snapshot is not the right size.

Shark Deemo
  • 19
  • 1
  • 2
  • `/proc` is the mount point of `procfs`, which is a virtual file system. Nothing you see there is actually taking up any disc space – entropy Mar 16 '19 at 05:42
  • I know it doesn't take up disk space, but why is the snapshot size incorrect when using Google cloud's disk snapshot feature? I only used 20G/200G, but the snapshot size is 178G, which should be the space occupied by the kcroe files. – Shark Deemo Mar 16 '19 at 06:49

1 Answers1

0

This may have something to do with how files are deleted in linux. When you delete a file in linux, the data isn't really deleted. Instead, the file system essentially marks the associated inode and the blocks where the data was stored, as unused.

This is done to avoid the overhead of actually zeroing (i.e. writing the blocks with 0s), and is also the reason why you can recover deleted files.

What's probably happening is the snapshot is also accounting for memory blocks that were marked as unused/deleted. The files you see inside /proc/ aren't real files and will not affect your disc usage.

entropy
  • 840
  • 6
  • 16
  • Yes, it doesn't take up disk space, but I used the kill command to clean up the process of taking up files that have been deleted, but it still doesn't work, and the disk snapshot is still large – Shark Deemo Mar 16 '19 at 09:22
  • Killing any processes will not affect your disc usage. The only way to clear up the space is to do a deep format of the disc/partition – entropy Mar 16 '19 at 09:49