D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-323 => Topic started by: pedrone on February 15, 2009, 01:49:25 AM

Title: After format, 14 GB used ... why ??
Post by: pedrone on February 15, 2009, 01:49:25 AM
Hi everyone,
i have just purchased the DNS-323 and i buyed a 1 TB WD caviar green HD.
After the format phase, i have seen that the used space is not 0 Kb (or some MB for system files) but 14 GB  >:(
How is possible? Can i clean the drive and reduce the used space?
Thank you !!
Bye
Title: Re: After format, 14 GB used ... why ??
Post by: pedrone on February 17, 2009, 02:00:14 PM
 :'( :'( nobody know ?
Title: Re: After format, 14 GB used ... why ??
Post by: D-Link Multimedia on February 17, 2009, 04:59:34 PM
:'( :'( nobody know ?

Part of it is OS related, part of it is Swap space, and part of it is because a 1TB drive Isn't actualy a 1TB drive, they lied. =P
Title: Re: After format, 14 GB used ... why ??
Post by: pedrone on February 18, 2009, 09:15:31 AM
I know the "problem" of 1TB=986GB and the SWAP partition but i dont understand why with a 500 GB HD the USED space (so contain files/folder) is 7GB and with a 1TB HD used space is 14 GB ... why double free space means double used space ?
7 GB of OS is not too much ?  ??? ???
Title: Re: After format, 14 GB used ... why ??
Post by: nbkov on January 11, 2010, 03:58:41 PM
It is because your 1TB=1000000000000 Bytes. But in original 1 KB=1024Bytes, 1 MB=1024KB, 1 GB=1024MB, and last 1TB=1024GB. So if you divide the number you can see what its caused it is not a OS used space its a trick done by manufacturers.
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 11, 2010, 04:51:42 PM
That could also be overhead for the file index structures.
Title: Re: After format, 14 GB used ... why ??
Post by: acros on January 14, 2010, 03:22:26 PM
Thats because Linux reserves by default 5% of the diskspace for root. Dlink didn't deactivate this feature although it is totally unnecessary on this device.
You can free the space by inserting the disks into a PC running Linux and executing "tune2fs -m 0 <partition>" on the data partitions. That will free up the space.
Maybe this helps some others after almost a year  :)
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 15, 2010, 05:47:34 AM
Any reason you couldn't use this command from telnet if you have ffp installed?  Is it a problem because we're running off the disks?  Not sure that moving the disks of a RAID-1 array into a Linux machine is going to be all that practical.
Title: Re: After format, 14 GB used ... why ??
Post by: acros on January 16, 2010, 05:02:39 AM
Shure, you could do this on the box if you have the tune2fs binary installed.
Its also no problem with an already mounted disk...
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 16, 2010, 06:43:31 AM
ffp includes tune2fs, at least when I run telnet I get:

Quote
/ # tune2fs
tune2fs 1.41.0 (10-Jul-2008)
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group]
        [-i interval[d|m|w]] [-j] [-J journal_options] [-l]
        [-m reserved_blocks_percent] [-o [^]mount_options[,...]]
        [-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]
        [-M last_mounted_dir] [-O [^]feature[,...]]
        [-E extended-option[,...]] [-T last_check_time] [-U UUID]
        [ -I new_inode_size ] device
/ #

I just didn't want to run this and have it scramble the disk, it takes a whole day to restore all the backed up data on the disk! :D  Any idea if a RAID-1 array is a problem for this procedure?
Title: Re: After format, 14 GB used ... why ??
Post by: acros on January 16, 2010, 05:48:46 PM
There should be no problem doing this on a Raid. You just need to execute it on the whole Raid-Array, not the single partitions.
I don't know what kind of raid D-Link is using, look with mount for the name of the mounted partition and execute the tune2fs command on it.
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 16, 2010, 06:14:43 PM
Well, the root is Volume_1, but I don't see that for any of the devices in the mnt folder.  I see the folders under Volume_1 for one of the devices.

Quote
/mnt # ls -l
drwxrwxrwx   15 root     root         4096 Jan 16 20:56 HD_a2
drwxrwxrwx    6 root     root         1024 Dec 29 15:13 HD_a4
drwxrwxrwx    4 root     root         1024 Dec 29 15:13 HD_b4
drwxr-xr-x    2 root     root         1024 Feb 16  2007 web_page
Not sure which one to pick. :)
Title: Re: After format, 14 GB used ... why ??
Post by: acros on January 17, 2010, 07:33:18 AM
You need to execute the command on the device, not the mounted directory.
Just enter "mount" into the shell and look which device (something under /dev/[...]) is mounted to /mnt/HD_a2.
Then execute the command to that
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 17, 2010, 07:51:39 AM
My lack of Linux knowledge is showing through. :D  Here's what I get for the mount command.

Quote
/ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
proc on /proc type proc (rw,nodiratime)
/dev/loop0 on /sys/crfs type squashfs (ro)
/dev/md0 on /mnt/HD_a2 type ext2 (rw)
/dev/sda4 on /mnt/HD_a4 type ext2 (rw)
/dev/sdb4 on /mnt/HD_b4 type ext2 (rw)
none on /proc/bus/usb type usbfs (rw)
devpts on /dev/pts type devpts (rw)
/ #

Does this seem to be the right commad from that suggestion?

tune2fs -m 0 /dev/md0

I'm curious as to why there are three apparent filesystems here.  Maybe this is starting to be a bad idea? :)
Title: Re: After format, 14 GB used ... why ??
Post by: acros on January 17, 2010, 08:42:45 AM
Yes, thats the right command.
The other partitions are for the DNS-323 OS, printer queue etc, they're 0.1% of the harddisk so you don't need to mind them.
Title: Re: After format, 14 GB used ... why ??
Post by: gunrunnerjohn on January 17, 2010, 09:55:09 AM
Hmm...  Didn't seem to change the capacity any, I guess I'll let sleeping dogs lie. :)