NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
mrQQ
Jun 19, 2015Apprentice
Please help me understand my used space
Hi,
I have 2 2TB drives in the system.
If I do `du -s /data` I get the used space as 154277424272. If I do a `df` I get used space as 1731570392. The difference is almost 200GB! Where does it go?
I have 2 2TB drives in the system.
If I do `du -s /data` I get the used space as 154277424272. If I do a `df` I get used space as 1731570392. The difference is almost 200GB! Where does it go?
22 Replies
Replies have been turned off for this discussion
- NhellieVirtuosoThe OS of the NAS is saved on the drives, so basically it takes up some space. Also, considering that the drives themselves have their own firmwares , it will also take some space.
- StephenBGuru - Experienced UserDrive firmware is in the drive flash memory, not on the platter. And df /data only reports on the data partition, so it does not include the OS partition.
mrQQ - you are running OS6 on this ultra, correct?
With BTRFS there are a lot of reasons why these numbers might not tie out. I think by default there are two copies of the metadata on the disk, which I think is enough to account for it (esp. if checksums are turned on). You might also add -a to the du command, and make sure it is counting the data in the hidden folders of the \data root.
In addition, snapshots/CoW create a discrepancy (though in the other direction - du reports more than df). Folder compression will also create a discrepancy (again in the other direction). - mdgm-ntgrNETGEAR Employee RetiredWith BTRFS you would want to use e.g.
# btrfs fi df /data - StephenBGuru - Experienced UserYes, that will give you more information than df. If you want to compare with df, you might want to add -k to use KiB units.
# btrfs fi df /data -k - mrQQApprentice
StephenB wrote: Drive firmware is in the drive flash memory, not on the platter. And df /data only reports on the data partition, so it does not include the OS partition.
only /data /home and /apps are shown to be located on /dev/md127? /home and /apps take almost nothing, definitely not 200GB!StephenB wrote: mrQQ - you are running OS6 on this ultra, correct?
yes.StephenB wrote: With BTRFS there are a lot of reasons why these numbers might not tie out. I think by default there are two copies of the metadata on the disk, which I think is enough to account for it (esp. if checksums are turned on). You might also add -a to the du command, and make sure it is counting the data in the hidden folders of the \data root.
-a says that cannot both summarize and show all entries?StephenB wrote: In addition, snapshots/CoW create a discrepancy (though in the other direction - du reports more than df). Folder compression will also create a discrepancy (again in the other direction).
what is CoW? how do I see space taken by snapshots? - mrQQApprentice
mdgm wrote: With BTRFS you would want to use e.g.
# btrfs fi df /data
this shows:
root@nas:~# btrfs fi df /data -b
Data, single: total=1914870562816, used=1771504107520
System, DUP: total=8388608, used=208896
System, single: total=4194304, used=0
Metadata, DUP: total=40265318400, used=1986809856
Metadata, single: total=8388608, used=0
so it still shows that 1.7tb is used, and only 2gb metadata. So where are those 200GB? - mdgm-ntgrNETGEAR Employee RetiredMaybe it would help if I could take a look (sent you a PM about this) and/or if you can send me your logs (see The Sending Logs link in my sig). Probably easier than asking for a series of commands.
Looks like you have a lot of metadata.
I wonder if you are using snapshots. In the web interface you should see any snapshots when you go to Shares and look at the Timeline. - StephenBGuru - Experienced UserAlso, did you confirm that du was processing the hidden files in \data (in particular \data\.apps)?
Note that existing snapshots are not deleted when you turn them off. - mrQQApprenticeI deleted snapshots manually.
I would like to believe du shows correct info, as that is exact same thing I see when looking via samba at /data (as i've said, .apps is around 350MB). - mrQQApprentice
mdgm wrote: Maybe it would help if I could take a look (sent you a PM about this) and/or if you can send me your logs (see The Sending Logs link in my sig). Probably easier than asking for a series of commands.
Looks like you have a lot of metadata.
I wonder if you are using snapshots. In the web interface you should see any snapshots when you go to Shares and look at the Timeline.
I will let you have a look, indeed will be much faster.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!