Freeing up HDD Reserve Space on an Ext3 HDD

From NMTWiki

Revision as of 15:34, 5 September 2010 by Atvoogt (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Image:Yellowvsmall.jpg Medium difficulty requiring some technical skills, or some parts require more than basic knowledge.

This guide shows you how to free up harddisc drive (HDD) space that is usually reserved. Reserved space is required for a bootable partition but not for media backup and so can be safely removed.

Applicable only for the following:
PCH NMT models: A100/110/B110
Others NMT's: HDX/eGreat

Contents

HDD reserved space

To most linux users this may seem like a simple process but to windows users it can be somewhat of a dark art. This guide should help you to easily free up 5% of your drive space. On a 1.5TB HDD that's 70GB more space for films!

Recent releases of the NMT firmware now have two tools to perform this operation directly on the NMT player. If you find your NMT does not have the necessary tools, you will need to use the Linux boot CD method.

Freeing up space (using NMT tools)

This is the quicker method of the two although it may look more complicated at first sight.

Installing telnet

First, install the 'telnet' package using the Community_Software_Installer. Once that is done, open a dos prompt and type

telnet ip.address.of.nmt

E.g.

telnet 192.168.1.10

Checking 'tune2fs' command

Now check the tune2fs command is present. Just type 'tune2fs' and press return. If you get something similar to the following output you can continue with this method.

tune2fs 1.39 (29-May-2006)
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group]
       [-i interval[d|m|w]] [-j] [-J journal_options]
       [-l] [-s sparse_flag] [-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[,...]] [-T last_check_time] [-U UUID] device

If you get

/bin/sh: tune2fs: not found

Then you must use the Linux CD method. In the latter case type 'exit' to leave telnet and continue with the Linux CD method #Freeing up space (using Linux Boot CD ).

Assuming 'tune2fs' command is present...

Finding the partition name

Now find the partition you want to change, by typing 'df' to list the partitions.

# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda1               252960    252960         0 100% /mnt
/dev/hda3            960681352 780946256  82135404  90% /opt/sybhttpd/localhost.drives/HARD_DISK
192.168.88.13:/space 201582240 174188064  17154368  91% /opt/sybhttpd/localhost.drives/NETWORK_SHARE/space
/dev/sda1               978672    653888    324784  67% /opt/sybhttpd/localhost.drives/USB_DRIVE_A-1


The partition names are listed in the first column. In the above example, there are 4 locations,

  1. NMT apps (/mnt) - we don't want to touch this
  2. The main Internal share - /opt/sybhttpd/localhost.drives/HARD_DISK
  3. A network share - shares cannot be changed over the network.
  4. A USB share - USB shares *can* be changed if they are ext2 or ext3 partitions.

In most cases the one of interest is the internal HDD partition, identified by the '/opt/sybhttpd/localhost.drives/HARD_DISK' path in the last column. The first column, indicates this is partition '/dev/hda3'

Modifying drive space

Type 'tune2fs -m 0 /dev/hda3'

# tune2fs -m 0 /dev/hda3
tune2fs 1.39 (29-May-2006)
Setting reserved blocks percentage to 0% (0 blocks)

Check the results 'df /dev/hda3'

# df /dev/hda3
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda3            960681352 780983760 179697592  81% /opt/sybhttpd/localhost.drives/HARD_DISK

Note there is now only 81% usage rather than 90%

type 'exit' to finish.


Freeing up space (using Linux Boot CD )

To carry out this operation you will need a PC, a linux boot CD or USB pen (you can boot into GParted which can be used for this process) and your HDD connected to the PC be it inside your NMT or via SATA or USB.

This guide will be written from the view of undertaking this task inside GParted

Drive labels

Once inside GParted use the drop down drive selection box to discover the drive labels of your drives. These will be in the form, for example

/dev/sda1

where sda is the drive and 1 is the partition number.

Warning! If carrying out the procedure on your NMT internal drive, do not remove the reserve space for anything other than the media partition! Do not touch the bootable partitions.

Terminal

Load the terminal by clicking on 'Terminal'. This should bring up a 'command prompt' style window for command line syntax.

Modifying drive space

At this stage you can now modify the reserve space to regain HDD space that is reserved, but not required for bootup. In the terminal windows type

tune2fs -m 0 /dev/sda1

where /dev/sda1 is the drive label modify this label to suit the drive that you wish to change. This modifies the reserve space to 0% where the number after -m specifies the %, ie

-m 1

would hold 1% for a reserve space.

Check Disc

It is now recommended to run fsck to check the drive. In the terminal type

fsck.ext2 /dev/sda1

where /dev/sda1 is the drive label. This process can take up to half hour for a 1.5TB drive in my experience.

You are now done, you may repeat this process on as many drives as you wish.

You can exit the terminal by typing

exit

Then reboot the PC by clicking exit, and then removing the GParted cd when prompted. You will now see that when you press the info button on your NMT remote when the drive is attached you now have an extra 5% available for media storage.

Personal tools