LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   impossible large file on filesystem (https://www.linuxquestions.org/questions/linux-general-1/impossible-large-file-on-filesystem-4175530552/)

cdvries 01-09-2015 12:13 PM

impossible large file on filesystem
 
One file on my filesystem is larger than my volume.
My SSD in my laptop is only 128G big but the file /var/lib/libvirt/images/Windows7.img is 256G
How is this possible? Anyone?

Code:

energize images # pwd
/var/lib/libvirt/images
energize images # ls -hal
total 32G
drwx--x--x 2 root        root 4,0K jan  5 21:53 .
drwxr-xr-x 8 root        root 4,0K nov 16 20:47 ..
-rw------- 1 libvirt-qemu kvm  256G jan  9 19:01 Windows7.img
energize images # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2            110G  55G  49G  53% /
none                  4,0K    0  4,0K  0% /sys/fs/cgroup
udev                  3,9G  4,0K  3,9G  1% /dev
tmpfs                785M  1,6M  784M  1% /run
none                  5,0M    0  5,0M  0% /run/lock
none                  3,9G  2,0M  3,9G  1% /run/shm
none                  100M  28K  100M  1% /run/user
/dev/sda1            511M  3,4M  508M  1% /boot/efi
/home/chris/.Private  110G  55G  49G  53% /home/chris
/dev/sdc1            1,8T  96G  1,7T  6% /media/chris/144e75c7-04c0-4965-aad2-7bb75155c611
energize images #


veerain 01-09-2015 12:39 PM

Because it may be using sparse file. In sparse file the space is not allocated fully but grows as data is filled.

cdvries 01-09-2015 12:57 PM

Quote:

Originally Posted by veerain (Post 5298304)
Because it may be using sparse file. In sparse file the space is not allocated fully but grows as data is filled.

Thank you. I didn't know sparse files existed. Never heared of those kind of files.
I looked it up...
http://en.wikipedia.org/wiki/Sparse_file

Habitual 01-09-2015 02:01 PM

Don't look at /proc/kcore then!

replica9000 01-10-2015 10:41 AM

Quote:

Originally Posted by Habitual (Post 5298352)
Don't look at /proc/kcore then!

Code:

# ls -lh /proc/kcore
-r-------- 1 root root 128T Jan 10 10:12 /proc/kcore

I can get my M$ friends jealous of how much storage space I have :D


All times are GMT -5. The time now is 02:48 AM.