You are not logged in.

#1 2016-02-10 06:27:08

joejoejoe
Banned
Registered: 2015-08-14
Posts: 32

[SOLVED] Many folders have size 0 bytes.

I noticed that recently many of my directories have a size of 0. For example:

 ❯ ll client                                                                [22:19:55]
total 9
drwxr-xr-x 1 trusktr trusktr    0 Feb  7 12:45 common/
drwxr-xr-x 1 trusktr trusktr    0 Feb  8 12:41 home/
drwxr-xr-x 1 trusktr trusktr    0 Jan 10 02:52 lib/

I tried running fsck at boot with `fsck.mode=force` but that didn't fix anything.

My filesystems (the relevant ones are sda4,6,8):

 ❯ sudo fdisk -l                                                            [22:21:23]
[sudo] password for root:
Disk /dev/sda: 931.9 GiB, 1000555581440 bytes, 1954210120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 78ABA1DB-86F7-43A9-AE60-C53A1D9B9932

Device          Start        End   Sectors   Size Type
/dev/sda4   531555872  594470431  62914560    30G Linux filesystem
/dev/sda6  1020192288 1020403231    210944   103M EFI System
/dev/sda8  1022500864 1954209791 931708928 444.3G Microsoft basic data

 ❯ sudo lsblk                                                               [22:22:05]
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.9G  0 disk
├─sda4   8:4    0    30G  0 part /
├─sda6   8:6    0   103M  0 part /boot
└─sda8   8:8    0 444.3G  0 part /home

 ❯ sudo file -sL /dev/sda*
/dev/sda4: Linux rev 1.0 ext4 filesystem data, UUID=59cde88d-6a2c-47f3-aa53-3a52ef070027 (needs journal recovery) (extents) (large files) (huge files)
/dev/sda6: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", Media descriptor 0xf8, sectors/track 63, heads 255, hidden sectors 1020192288, sectors 210944 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 1623, reserved 0x1, serial number 0x58187021, unlabeled
/dev/sda8: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS    ", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, hidden sectors 1022500864, dos < 4 .0 BootSector (0x80), FAT (1Y bit by descriptor); NTFS, sectors/track 63, sectors 931708920, $MFT start cluster 4, $MFTMirror start cluster 31095807, bytes/RecordSegment 2^(-1*246), clusters/index block 1, serial number 027b4569f538f319d; contains Microsoft Windows XP/VISTA bootloader BOOTMGR

You can see that sda8 is on NTFS. Any thoughts on what might be happening here and what to possibly do to find out?

Last edited by joejoejoe (2016-02-10 09:10:46)

Offline

#2 2016-02-10 08:39:39

phw
Member
Registered: 2013-05-27
Posts: 318

Re: [SOLVED] Many folders have size 0 bytes.

The affected folders are all on the NTFS partition? I think a directory on ext4 always takes 4096 bytes, but I know that the directories on NTFS get reported with different sizes, sometimes 4096, sometimes 0, on my system I even see one with a size of 152. I don't know exactly why this is the case, but in http://serverfault.com/questions/538952 … ng-ntfs-3g there is a theory.

If everything is working I wouldn't worry too much about the sizes, this is just an ntfs or ntfs-3g implementation detail. It really depends on how much metadata a directory requires, and that is file system specific.

Offline

Board footer

Powered by FluxBB