Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
08-09-2008, 09:28 AM
Post: #1
Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
I have just put in a 1TB HDD into my egreat and formatted it in ext2.

I have installed the ext2 drivers on my PC.

All woks fine

When i connect the egreat t the PC via USB i can see 3 partitions on my PC (Windows XP)

1st Partition - Cant access

2nd Partition - Size is 930 GB but the free space is only 869GB, thats 61GB being used for what?

3rd Partition - NMT apps, size 250mb

SO my question what is the 61GB being used for?

I have tried formatting it twice and i have still have the same 61GB being used.


Any ideas?
Find all posts by this user
08-09-2008, 09:47 AM
Post: #2
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
(08-09-2008 09:28 AM)ajoesmith Wrote:  I have just put in a 1TB HDD into my egreat and formatted it in ext2.

2nd Partition - Size is 930 GB but the free space is only 869GB, thats 61GB being used for what?

For nothing :-)

Sound like blocks reserved for root. I dont know the ext2 driver on Windows works and recognizes the reserved blocks.

If you dont have a Linux, get a Linux live CD, mount the disk and get (almost) rid of the reserved blocks:

Code:
sudo tune2fs -r 0 /dev/whatever

Hope this will work

Cheers,

Gourmand
Find all posts by this user
08-09-2008, 10:15 AM
Post: #3
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
Hi

Thanks for the reply but im a complete NOOB and what you have said makes no sense to me!
Find all posts by this user
08-09-2008, 10:47 AM
Post: #4
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
(08-09-2008 10:15 AM)ajoesmith Wrote:  Hi

Thanks for the reply but im a complete NOOB and what you have said makes no sense to me!

Hmm... maybe this link explains it better: http://www.unixcommand.org/tune2fs/
Find all posts by this user
08-09-2008, 11:38 AM
Post: #5
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
OK ill check the link but is anyone else having the same problem?

Do other people have 61GB missing?
Find all posts by this user
08-09-2008, 01:00 PM (This post was last modified: 08-09-2008 01:03 PM by journey4712.)
Post: #6
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
tune2fs -l /dev/hda3 from my pch:
Code:
/ # tune2fs -l /dev/hda3
tune2fs 1.39 (29-May-2006)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          d3b5eadb-063b-4d5a-934b-ebb8b7a09e0f
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      filetype sparse_super large_file
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              9682944
Block count:              19346276
Reserved block count:     967313
Free blocks:              13768071
Free inodes:              9678169
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16384
Inode blocks per group:   512
Filesystem created:       Sat Jul  5 07:11:45 2008
Last mount time:          Thu Jul 10 13:02:10 2008
Last write time:          Sat Aug  9 11:54:56 2008
Mount count:              42
Maximum mount count:      34
Last checked:             Sat Jul  5 07:11:45 2008
Check interval:           15552000 (6 months)
Next check after:         Thu Jan  1 07:11:45 2009
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Default directory hash:   tea
Directory Hash Seed:      0113d59d-d6c9-4eff-976b-052267465107

so its saying 967313 reserved blocks out of 19346276 total blocks(or 5%) are reserved for root(so to your question, yes everyone experiences this although the number of gigs is different for different size disks). The simplest way to fix this would be to install the openNAS toolkit on your PCH. This will allow you to connect to your PCH(use putty.exe for ssh). the tune2fs command is already a part of openNAS so you will only need to execute one command(as mentioned earlier)
Code:
tune2fs -r 0 /dev/hda3

as to what are reserved blocks? There is a certain portion of the hard disk reserved for one users files. The 61G you are refering to is not lost in any way, it is simply reserved for the super user. Another way to get arround this would be to change the ownership of 61G worth of files to root


journey
Find all posts by this user
08-09-2008, 01:10 PM (This post was last modified: 08-09-2008 02:18 PM by ajoesmith.)
Post: #7
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
OK thanks

Im a complete noob regarding linux etc.

Is there a tutorial on how i can get the 61GB back?
Find all posts by this user
08-09-2008, 10:50 PM
Post: #8
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
Hmm, actualy you dont even need openNAS it looks like tune2fs is on the base system.

Ok, easy as can be, you need to create 2 files

first file: runcmd.cgi Please note that the forum is changing some of the code, anything that says &lt; should be a < and anything that says &gt; should be a >
Code:
#!/mnt/syb8634/server/php
&lt;?php

        echo "Content-Type: text/html\n";
        echo "\n";
        echo ("<html><head><title>Torrentwatch Configuration Interface</title></head><body>");
        echo("<form action='runcmd.cgi'><input type='text' name='exec'></form>");

        $opts = explode("&", $argv[1]);
        foreach ($opts as $i) {
                $piece = explode("=", $i);
                $cmdline[$piece[0]] = urldecode($piece[1]);
        }
        if(isset($cmdline['exec'])) {
                echo("Executing: ".$cmdline['exec']."<br>\n");
                exec($cmdline['exec'], $output, $return);
                echo implode($output, "<br>\n");
        }
        echo("</body></html>");
?&gt;

and then the second file is remove_reserved_blocks.html

Code:
<html><head><title>Remove Reserved Blocks</title></head>
<body><a href="runcmd.cgi?exec=/bin/tune2fs%20-r%200%20/dev/hda3">Remove Reserve from HDA3</a>
</body></html>

put those both on your PCH's hard drive. from ftp issue the command "site chmod 777 runcmd.cgi"
Then access the file remove_reserved_blocks from your PCH's remote. Click on "Remove Reserved Blocks from HDA3"

the output should be something like:
Code:
Executing: /bin/tune2fs -r 0 /dev/hda3
tune2fs 1.39 (29-May-2006)
Setting reserved blocks count to 0

journey
Find all posts by this user
08-10-2008, 06:42 AM
Post: #9
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
(08-09-2008 10:50 PM)journey4712 Wrote:  ..
the output should be something like:
Code:
Executing: /bin/tune2fs -r 0 /dev/hda3
tune2fs 1.39 (29-May-2006)
Setting reserved blocks count to 0

I actually addressed this problem to Syabas quite some time ago and I hope my input will be incorporated in one of the next firmware releases.
There are other issues with file systems, such max-mount-counts and interval-between-checks is not zero. This is not a problem on the device itself since it looks they use a hacked kernel which ignores these parameters.

Maybe it is a good idea to issue
Code:
/bin/tune2fs -r 0 -i 0 -c 0 /dev/hda3
To avoid unnecessary file system checks when mounting the disk on your PC (1TB takes quite some time to be checked!)

Cheers,

Gourmand
Find all posts by this user
09-05-2008, 09:03 PM
Post: #10
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
(08-10-2008 06:42 AM)gourmand Wrote:  
(08-09-2008 10:50 PM)journey4712 Wrote:  ..
the output should be something like:
Code:
Executing: /bin/tune2fs -r 0 /dev/hda3
tune2fs 1.39 (29-May-2006)
Setting reserved blocks count to 0

I actually addressed this problem to Syabas quite some time ago and I hope my input will be incorporated in one of the next firmware releases.
There are other issues with file systems, such max-mount-counts and interval-between-checks is not zero. This is not a problem on the device itself since it looks they use a hacked kernel which ignores these parameters.

Maybe it is a good idea to issue
Code:
/bin/tune2fs -r 0 -i 0 -c 0 /dev/hda3
To avoid unnecessary file system checks when mounting the disk on your PC (1TB takes quite some time to be checked!)

Cheers,

Gourmand



Hi,

i bought also 1tb hard drive for my egreat nmt, had same problem after formatting it into ext2 and following your advices i have managed to disable reserve blocks and also i reduced the percentage to 0 by tune2fs -m 0 /dev/sda3.

Problem is, that when i mount this disk in windows, it still shows that about 14 gb is used but disk is empty. Do you know why is this still happening. Thank you.
Find all posts by this user
09-06-2008, 09:38 AM
Post: #11
RE: Internal HDD 3 partition sizes - 1 partition is using 61GB! why?
It's not really a good idea to use "-m 0".

The filesystem needs a little free space to do housekeeping. It needs some spare space to move things around to reallocate disk blocks.

Think of it this way. Your kitchen table is full up with papers. You want to change the papers around, but there is no room to work.

Then you realize there is an extra leaf for the table underneath. You connect the leaf and suddenly you can move some papers onto the leaf, and it gives you enough room to move around what you need to move on the main table. Whereas if you had no extra leaf, you would have a lot of problems shuffling the papers around on the desktop.

I normally never set minfree (what -m affects) lower than 2 or 3% on any Linux systems I administer. (I work at a US Government Lab with over 50 Red Hat Linux servers and workstations and have been using UNIX® and Linux for 25 years.)
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  how to fsck a partition when the NMT won't boot BSartist 6 3,155 07-25-2010 10:22 PM
Last Post: BSartist
  C200 internal Hard Disk mick 2 2,409 10-04-2009 05:25 PM
Last Post: Willem53
  remove internal HDD 1 TB to internal Hdd 2 TB duramadre 3 1,395 09-22-2009 09:47 AM
Last Post: Gibbo
  Samba server without internal hard disk? kovan 1 1,222 09-13-2009 03:48 PM
Last Post: Gibbo
  duplicate internal disk to USB disk duramadre 1 1,160 09-12-2009 04:26 PM
Last Post: chris57
  What happen during the installation of Application with Internal HD? vincenton 5 1,418 08-26-2009 01:17 AM
Last Post: vincenton
  How to check available MB in PCH internal HD pozihd 3 1,257 08-19-2009 04:33 PM
Last Post: Gibbo
  Buffering with an internal HD? Lyhr 3 1,625 07-15-2009 08:44 AM
Last Post: chris57
  Partition magic re external usb maxx2570 1 1,090 07-12-2009 10:35 AM
Last Post: chris57
  Internal HDD vs Network storage slingshot 8 3,646 06-16-2009 06:17 AM
Last Post: cheaper_popcorn

Forum Jump: