Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2012 10:44:12 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-hackers@freebsd.org, rozhuk.im@gmail.com
Subject:   Re: proper newfs options for SSD disk
Message-ID:  <alpine.BSF.2.00.1206191036560.6080@wojtek.tensor.gdynia.pl>
In-Reply-To: <20120619070846.GA1283@tiny.Sisis.de>
References:  <4fb7dfd6.736a980a.186d.ffff902f@mx.google.com> <20120519180901.GA1264@tiny> <20120525183006.GA1259@tiny> <alpine.BSF.2.00.1205252240260.31165@wojtek.tensor.gdynia.pl> <20120525225839.GA7347@server.rulingia.com> <alpine.BSF.2.00.1205261550110.70207@wojtek.tensor.gdynia.pl> <20120527082745.GA2591@tinyCurrent> <alpine.BSF.2.00.1205301938070.17367@wojtek.tensor.gdynia.pl> <20120616185822.GA1253@tiny.Sisis.de> <alpine.BSF.2.00.1206172115070.40513@wonkity.com> <20120619070846.GA1283@tiny.Sisis.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> future disk layout.
>
> /dev/ada0p1    freebsd-boot
> /dev/ada0p2    freebsd-ufs /boot     256 Mbyte
> /dev/ada0p3    freebsd-ufs /private  3.5 GByte (geli encrypted)
>
over 200 MB wasted for /boot. what do you want to but there?

except this it is all right.


> /dev/ada1p1    freebsd-boot
> /dev/ada1p2    freebsd-ufs /        14.0 GByte (/ /usr /var ... all
>                                               in one file system and unencrypted)
>
nonsense here. why partitions AT ALL?

just
/dev/ada1 - /, no partitions

> commands:
>
> # gpart destroy -F ada0
> # gpart create -s gpt ada0
> # gpart add -t freebsd-boot -s 512k ada0
> # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0
> # gpart add -t freebsd-ufs -b 1m -s 256m ada0
> # gpart add -t freebsd-ufs ada0

i cannot help here as i am not really gpart user. i use bsdlabel 
everywhere for now.

> # newfs /dev/ada0p2
> # newfs /dev/ada0p3

don't waste space, read newfs manual and add good options. on flash disks 
don't fear to use smallest (4KB) block size and smallest (512) fragment 
size.

on any disk don't overallocate inodes as newfs do. You know how many files 
you have so i can't help you.

newfs -i 16384 means over 1% locked space, on hard disks i usually use -i 
65536 and it still result in most inodes unused.
on small flash disks 16384 or 32768 is usually fine but YOU know how much 
files you store.

on private system do not fear -m 0, even more on flash media where 
fragmentation doesn't hurt.

and you definitely forgot -U option.



REALLY - read out newfs manual carefully and make optimal filesystem 
layout every time.

newfs defaults are certainly non optimal, but universal and mostly safe.

> # newfs /dev/ada1p2
> # mount /dev/ada1p2 /mnt
>
> start the mouse daemon (only for cut&paste:
>
> # /etc/rc.d/moused onestart
>
>
> # echo /dev/ada1p2 / ufs rw 1 1      > /mnt/etc/fstab

rw,noatime

always worth using, definitely on flash disks.



the rest is quite complex for me. i would rather back up all your existing 
filesystem to something external, make new partitioning and restore.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1206191036560.6080>