• December 13, 2019, 08:40:09 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Free space/usage discrepancy between du and df  (Read 2712 times)

JimB3

  • Level 1 Member
  • *
  • Posts: 2
Free space/usage discrepancy between du and df
« on: February 07, 2012, 09:18:16 PM »

I've got two identical 1TB Seagate drives in a DNS323 as JBOD. One drive has network shared folders that I back data up on to from multiple clients. I have a rsync cron job set up to mirror the first drive to the second drive daily so the contents of both drives should be identical.

I've had this setup for at least 3 years. I've recently noticed the status web page showing one drive with about 70 GB less free space than the other, even though they should be mirrors. I don't see any difference in listing the files and folders on each volume.

If I SSH into the unit and show the free space, it shows the same 70 GB difference between /mny/HD_a2 and /mnt/HD_b2:

root@DNS323:/mnt# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    9.7M      7.4M      1.8M  80% /
/dev/root                 9.7M      7.4M      1.8M  80% /
/dev/loop0                5.6M      5.6M         0 100% /sys/crfs
/dev/sda2               915.9G    835.2G     80.8G  91% /mnt/HD_a2
/dev/sdb2               915.9G    763.8G    152.1G  83% /mnt/HD_b2
/dev/sda4               486.2M     26.0k    486.2M   0% /mnt/HD_a4
/dev/sdb4               486.2M     17.0k    486.2M   0% /mnt/HD_b4


However, if I show the usage of /mnt/HD_a2 and /mnt/HD_b2, both show the same value:

root@DNS323:/mnt# du -sh /mnt/HD_*2
763.8G  /mnt/HD_a2
763.8G  /mnt/HD_b2


I can't find any hidden files or partitions to explain the difference. Anyone have any ideas?

Thanks!
Logged

cable2

  • Level 3 Member
  • ***
  • Posts: 299
Re: Free space/usage discrepancy between du and df
« Reply #1 on: February 08, 2012, 08:13:49 AM »

Hi JimB3,
I am confused.  Are you sure you are not using Raid1 and not JBOD as you mention.  The reason is that JBOD by definition means "just one big disk" and there is only one Volume displayed.  Nothing is mirrowed on JBOD and as I understand it, and the disks are not balanced regarding space usage.  Anyway, perhaps you could clarify and then maybe some can help sort out the reported space difference.  Thanks
Logged

JimB3

  • Level 1 Member
  • *
  • Posts: 2
Re: Free space/usage discrepancy between du and df
« Reply #2 on: February 08, 2012, 11:24:26 AM »

"Just one big disk" would be JOBD. JBOD is "Just a Bunch Of Disks".

Don't know if things have changed recently, but when I bought this, RAID1 support was scary - never knew what disks it was going to reinitialize if you needed to replace one and rebuild the array. Hence, I have 2 independent disks and have the rsync process set up on a cron job.
Logged

cable2

  • Level 3 Member
  • ***
  • Posts: 299
Re: Free space/usage discrepancy between du and df
« Reply #3 on: February 08, 2012, 01:03:00 PM »

Hi again,
You have 2 "standard" volumes then not a JBOD setup.  I am thinking you are using ffp to telnet into your 323.  If you use the 323's own web interface and / or a windows machine to check drive space, do you get the same discrepancy?  If you go in through a windows machine could you check the properties on some of your larger folders, I had incorrectly setup a backup one time and copyed a whole lot of data "within" the folder that I wanted to sync and didn't catch it for awhile until I went looking for a new file I had added.  Might check for something like that.  Or maybe some else has a better idea.  Good luck
Logged

Steve Pitts

  • Level 2 Member
  • **
  • Posts: 68
  • A twelfth man at silly mid on
Re: Free space/usage discrepancy between du and df
« Reply #4 on: February 12, 2012, 03:38:40 AM »

I think we need to know more about how you've got this set up at the logical level before anyone can make sense of what those commands are showing us at a physical level. If you are using 'JBOD' then I would expect your volumes to be spread across both disks, otherwise you have a 'Standard' setup with a volume defined on each disk, which sounds more like what you're after (ie. you only write to one of those volumes externally and use the other for mirrored backup purposes internally). Please let us have a screenshot of the device info page, or at least a copy and paste of the information in the hard drive info and physical disk info panels of that page, and perhaps also details of the command(s) that get issued by your CRON job.
« Last Edit: February 12, 2012, 03:45:31 AM by Steve Pitts »
Logged
Cheers, Steve

Running a DNS-323 Rev. C1 with FW 1.10b5, fun_plug 0.5 and 1 Western Digital WD20EARS-00MVWB0, 4K aligned by 1.10FW, in Standard mode as a single volume