Create volume - 8% space used right away ?

Status
Not open for further replies.

Child

Dabbler
Joined
Sep 25, 2011
Messages
44
Hi guys,

I'm just setting up a freeNAS machine. Now I think there's an issue which I'm not able to resolve by myself.

I want to create a volume of a 500 GB (~488 GiB) HD. File format should be UFS. It works fine and all. But the size of the volume is just way of as you can see in the picture.

Capture.JPG

But it's not so much the total size I'm wondering about. It's more the amount available and that there's already 8% used from the start.

Anyone any suggestions?
 

Child

Dabbler
Joined
Sep 25, 2011
Messages
44
Thx for your answer Brand.
As stated in my post I was just wondering because it just seems a bit odd. Is there any reason why it is designed that way? If you imagine someone setting up like 12 TB HD space and losing 8% right from the beginning. That's a large junk of storage space.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
By default UFS will reserve 8% on the disk for root - apparently it's so that defective sectors can be reallocated automatically.

You can change the reserved percentage at the command line using tune2fs, something like:

Code:
tune2fs -m 6 /dev/sda1


would change the reserved percentage to 6% - it won't affect any data already on the disk.

It's not recommended to set the reserved percentage to 0%, but a percentage as low as 3% should still be OK.
 

ACGS

Cadet
Joined
Oct 3, 2011
Messages
7
Thxs, Milhouse. I have a 5.37 TB RAID arrray on an NAS holding 1.7 TB data. Windows shows space used as 2.1 TB. I wanted to reduce that difference and your post gave me the solution.

Would 2% be a safe setting. If not, I will use 3% per your previous 9-28-2011 post.
 

Child

Dabbler
Joined
Sep 25, 2011
Messages
44
hm ... I did a check:

Code:
~# egrep 'ada[0-9]|cd[0-9]' /var/run/dmesg.boot
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST2000DL003-9VT166 CC32> ATA-8da0 at umass-sim0 bus 0 scbus6 target 0 lun     0
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)


and then tried this command:

Code:
~# tune2fs -m 4 /dev/ada0


but I only get an error:

Code:
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: Operation not permitted while trying to open /dev/ada0
Couldn't find valid filesystem superblock.
 
D

delphij

Guest
For data disks it should be Okay to just set reserved space to 0%.

The point of having reserved space is primarily based on two considerations: a) any rotating disk file system, including UFS, needs to avoid so-called "file fragmentation" (not the UFS "fragment", which is the smallest allocation unit in UFS and thus different concept), and no algorithm can work well when the available space drops to a certain level. Having reserved space makes users aware of the problem before the situation became very bad; and b) if system log is written to that file system, the "root" user still can write while non-privileged users are blocked from writing new data, allowing the system to write down critical log data in emergency case.
 
D

delphij

Guest
tune2fs is for ext2fs, are you sure it's the case?

I think the following might work for you in your case (note that you need to operate on the special file containing the file system, which is not likely be a whole device):

tunefs -m 0 /dev/ada0p2

Note that the above example tunes reserved space to 0%.
 
Status
Not open for further replies.
Top