pbm size of files in ls

General support questions including new installations
globalsi
Posts: 7
Joined: 2012/09/27 12:02:47

pbm size of files in ls

Postby globalsi » 2013/02/26 10:36:37

Hello,

I have a problem with some files on my centos 4.
When I list some files with 'ls', I'v got a strange result... (huge different sizes on line 4->8 ) :-o

Code: Select all

-bash-3.00# ls -lsah /home/e-smith/files/users/smeuser3/home/
total 4,8G
4,0K drwxr-xr-x  4 smeuser3    smeuser3    4,0K feb 25 13:29 .
4,0K drwx------  5 smeuser3    smeuser3    4,0K jan 30 13:39 ..
1,5G -rw-rw----  1 smeuser3    smeuser3    1,5G mai 22  2012 Outlook 2012-05-22 21;00;41.pst
   0 -rw-rw----  1 smeuser3    smeuser3    2,2G aou 15  2012 Outlook 2012-08-15 21;00;46.pst
   0 -rw-rw----  1 smeuser3    smeuser3    2,2G aou 16  2012 Outlook 2012-08-16 21;00;44.pst
   0 -rw-rw----  1 smeuser3    smeuser3    2,2G aou 17  2012 Outlook 2012-08-17 21;00;45.pst
   0 -rw-rw----  1 smeuser3    smeuser3    2,2G aou 30 21:00 Outlook 2012-08-30 21;00;45.pst
   0 -rw-rw----  1 smeuser3    smeuser3    2,2G aou 31 21:00 Outlook 2012-08-31 21;00;44.pst
3,3G -rw-rw----  1 smeuser3    smeuser3    3,3G feb 21 18:10 Outlook 2013-02-21 21;00;48.pst

with 'du'

Code: Select all

-bash-3.00# du --max-depth=1 -h  /home/e-smith/files/users/smeuser3/home/
4,8G   /home/e-smith/files/users/smeuser3/home/

'df' is coherent with 'du'

Code: Select all

-bash-3.00# df -h
Sys. de fich.         Tail. Occ. Disp. %Occ. Mont(r) sur
/dev/mapper/main-root
                      365G  335G   12G  97% /
/dev/md1               99M   28M   67M  30% /boot
none                 1013M     0 1013M   0% /dev/shm

-bash-3.00# du --max-depth=1 -h /
214M   /lib
4,0K   /initrd
62M   /root
4,4M   /bin
0   /sys
899M   /proc
216K   /dev
0   /selinux
4,0K   /service
17M   /sbin
35M   /etc
4,0K   /srv
4,0K   /command
16K   /lost+found
23M   /boot
16K   /tmp
20K   /mnt
1,4G   /opt
12K   /media
1,1G   /var
331G   /home
1,1G   /usr
260K   /package
336G   /


If I copy these files to another server, they take their full size (16 Go...)
I ran a fsck during a reboot but the partition seems clear.

Do you have any idea what's going on?

Thanks's

User avatar
TrevorH
Forum Moderator
Posts: 21174
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

pbm size of files in ls

Postby TrevorH » 2013/02/26 10:48:58

Looks to me like they are sparse files. If you do not specify the correct switch to cp when copying then sparse files will be copied and take up their entire nominal space allocation.

You are aware that CentOS 4 has been out of support for almost exactly one year now? You should consider migrating to a supported version.

globalsi
Posts: 7
Joined: 2012/09/27 12:02:47

Re: pbm size of files in ls

Postby globalsi » 2013/02/26 14:37:17

This files are backup of outlook (pst file) ; I doubt they are sparse files : the first files were full and the last too.
I wonder if the problem wasn't a full partition problem.

and, yeah, i work on the migration :-P