Quantcast

UFS2 space usage

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

UFS2 space usage

Rafael Henrique Faria
Hi.

I'm transferring a disk from my MacBook to my FreeBSD server, it's a 500GB
3,5" disk in an USB enclosure.
As I was using it in MacOS, it was formated with HFS+. So I transfered all
data from it to an second disk.
Then I reformatted the disk inside the FreeBSD 9.0, using GPT, and using
all disk (with HFS+ there was a EFI partition, plus a free space in the
beginning and in the end of the disk).
I used this options for newfs: "-U2 -o space".

The 500GB disk in HFS+, was with 2GB free, so 498GB in use. (Apple, uses 1
K as 1000 Bytes, and 1 M as 1000 K, so you really see 500GB of free space
and occupied).

After trying to move the data back to the 500GB disk formated in UFS2, 44GB
couldn't be transferred. There is no free space for all the data.

In FreeBSD it says that the disk have 458GB, and is using 415GB, and have
6.2GB free. But I still have 48GB of data to transfer to it.

Is HFS+ more optimized to store files then UFS2? There is something that I
can do to get more space for data?

Thanks in advance.

--
Rafael Henrique da Silva Faria
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: UFS2 space usage

Simon-14

Take a look at man tunefs and the option -m Your issue is likely related to this.
Besides that, UFS possibly uses more space to store metadata, etc... Haven't
looked into this in long time, your inode size probably also affects total space
available.

When you were copying your data, were you doing it as root as normal user?
Normal user won't be able to go beyond the reserved 8% (default), but root
can, although this is bad a idea long-term.

-Simon

On Wed, 6 Jun 2012 11:32:50 -0300, Rafael Henrique Faria wrote:

>Hi.

>I'm transferring a disk from my MacBook to my FreeBSD server, it's a 500GB
>3,5" disk in an USB enclosure.
>As I was using it in MacOS, it was formated with HFS+. So I transfered all
>data from it to an second disk.
>Then I reformatted the disk inside the FreeBSD 9.0, using GPT, and using
>all disk (with HFS+ there was a EFI partition, plus a free space in the
>beginning and in the end of the disk).
>I used this options for newfs: "-U2 -o space".

>The 500GB disk in HFS+, was with 2GB free, so 498GB in use. (Apple, uses 1
>K as 1000 Bytes, and 1 M as 1000 K, so you really see 500GB of free space
>and occupied).

>After trying to move the data back to the 500GB disk formated in UFS2, 44GB
>couldn't be transferred. There is no free space for all the data.

>In FreeBSD it says that the disk have 458GB, and is using 415GB, and have
>6.2GB free. But I still have 48GB of data to transfer to it.

>Is HFS+ more optimized to store files then UFS2? There is something that I
>can do to get more space for data?

>Thanks in advance.

>--
>Rafael Henrique da Silva Faria
>_______________________________________________
>[hidden email] mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-fs
>To unsubscribe, send any mail to "[hidden email]"



_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: UFS2 space usage

Julian H. Stacey-3
"Simon" wrote:
>
> Take a look at man tunefs and the option -m Your issue is likely related to this.
> Besides that, UFS possibly uses more space to store metadata, etc... Haven't
> looked into this in long time, your inode size probably also affects total space
> available.

Apart from how many spare inodes you have, & the spare (root only
accesible), mainly think block sizes (eg fsize bsize as shown by
disklabel - though I see mine are now zero)  efficiency depends on
data type, a directory full of news & mail needs lots of little
files, so use small blocks, films=movies are more efficient with
large blocks.

man tunefs # -b
man newfs


>
> When you were copying your data, were you doing it as root as normal user?
> Normal user won't be able to go beyond the reserved 8% (default), but root
> can, although this is bad a idea long-term.
>
> -Simon
>
> On Wed, 6 Jun 2012 11:32:50 -0300, Rafael Henrique Faria wrote:
>
> >Hi.
>
> >I'm transferring a disk from my MacBook to my FreeBSD server, it's a 500GB
> >3,5" disk in an USB enclosure.
> >As I was using it in MacOS, it was formated with HFS+. So I transfered all
> >data from it to an second disk.
> >Then I reformatted the disk inside the FreeBSD 9.0, using GPT, and using
> >all disk (with HFS+ there was a EFI partition, plus a free space in the
> >beginning and in the end of the disk).
> >I used this options for newfs: "-U2 -o space".
>
> >The 500GB disk in HFS+, was with 2GB free, so 498GB in use. (Apple, uses 1
> >K as 1000 Bytes, and 1 M as 1000 K, so you really see 500GB of free space
> >and occupied).
>
> >After trying to move the data back to the 500GB disk formated in UFS2, 44GB
> >couldn't be transferred. There is no free space for all the data.
>
> >In FreeBSD it says that the disk have 458GB, and is using 415GB, and have
> >6.2GB free. But I still have 48GB of data to transfer to it.
>
> >Is HFS+ more optimized to store files then UFS2? There is something that I
> >can do to get more space for data?
>
> >Thanks in advance.
>
> >--
> >Rafael Henrique da Silva Faria

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below not above, cumulative like a play script, & indent with "> ".
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
        Mail from @yahoo dumped @berklix.  http://berklix.org/yahoo/
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: UFS2 space usage

Stefan Esser-3
In reply to this post by Rafael Henrique Faria
Am 06.06.2012 16:32, schrieb Rafael Henrique Faria:

> Hi.
>
> I'm transferring a disk from my MacBook to my FreeBSD server, it's a 500GB
> 3,5" disk in an USB enclosure.
> As I was using it in MacOS, it was formated with HFS+. So I transfered all
> data from it to an second disk.
> Then I reformatted the disk inside the FreeBSD 9.0, using GPT, and using
> all disk (with HFS+ there was a EFI partition, plus a free space in the
> beginning and in the end of the disk).
> I used this options for newfs: "-U2 -o space".
>
> The 500GB disk in HFS+, was with 2GB free, so 498GB in use. (Apple, uses 1
> K as 1000 Bytes, and 1 M as 1000 K, so you really see 500GB of free space
> and occupied).
>
> After trying to move the data back to the 500GB disk formated in UFS2, 44GB
> couldn't be transferred. There is no free space for all the data.
>
> In FreeBSD it says that the disk have 458GB, and is using 415GB, and have
> 6.2GB free. But I still have 48GB of data to transfer to it.
>
> Is HFS+ more optimized to store files then UFS2? There is something that I
> can do to get more space for data?

1. What is the average file size?

With small files, you should adjust the block size (possibly down to
4096/512) and may want to use UFS1 (smaller inode). With large files,
you should specify the average file size in bytes as newfs option (-i).
The block and fragment size is set with the -b and -f options of newfs
and the fragment size must be a power of 2 larger than the sector size,
while the block size is 8 times the fragment size for best results.

2. You probably do not want to use "-o space".

Optimizing for Space hardly any effect for large files, since it only
affects the allocation of fragments (and those are only relevant for
files with less than 13 blocks). Since the file system switches from
"-o time" to "-o space" when it fills, you probably do not want to
override this setting.

3. You may want to reduce the reserved space down from 8%.

Depending on your planned use of this disk, a lower reservation may or
may not be acceptable. The higher the amount of free blocks, the better
the allocation of blocks for a newly written file. If you do not plan to
write many large files when the disk is nearly full, then you may adjust
this value down without adverse effects.

Regards, STefan
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "[hidden email]"
Loading...