# SSD mix HDD sata



## Ependi Silalahi (Sep 13, 2016)

I have 1 ssd and 1 hdd on my server to be machine
ssd = 170 GB
hdd = 1.0 TB
What is the best way to install freebsdFreeBSD 10.3.
Here is what I have done:
I choose AUTO ZFS but I think I have lost the extra space on my 1.0 TB or have I?

I want to install freebsdFreeBSD on my SSD. Like what I did on Linux I have the OS on SSD  and /home on 1.0 TB.
I want to mirror 170 GB part of my 1.0 TB and use /var on the 1.0 TB. Is this possible
or if I use autozfs and do mirror zfs would give me some extra space on my 1.0 TB?

Or maybe iI just remove my SSD and use one single 1.0TB and make it ZFS.

What do you think?


----------



## ANOKNUSA (Sep 14, 2016)

Ependi Silalahi said:


> I want to mirror 170 GB part of my 1.0 TB and use /var on the 1.0 TB. Is this possible



No. The easy route, if you really want to use ZFS, would be to install to the SSD, and create another ZFS pool on the HDD yourself afterward.

Why would you want /var on the larger disk? Does it really hold that much data?


----------



## Ependi Silalahi (Sep 14, 2016)

ANOKNUSA said:


> No. The easy route, if you really want to use ZFS, would be to install to the SSD, and create another ZFS pool on the HDD yourself afterward.
> 
> Why would you want /var on the larger disk? Does it really hold that much data?


Sorry what I meant was /usr not /var.
But thanks for pointing out though.
So, I am very new to freebsd yet. Do I create zfs pool during installation? if yes could you give me a hint? if it is afterward does this means after installation is finished. Then do you have manual to do that??
So, If I my memory is not mistaken me during installation there is auto zfs and manual, the other two for ufs
do I create stripe or mirror?
I tried auto zfs but it only mirror the size of sdd which 170 then my 1.0 TB left unused. I know zpool is software base right not like RAID hardware

So how do I do:
170 mirror to 1.0 TB using zfs and what ever left on my 1.0 TB I could use for another storage.
When I use part of 1TB what would be the partition name.
Thanks in advance.


----------



## SirDice (Sep 15, 2016)

Ependi Silalahi said:


> do I create stripe or mirror?


Don't stripe or mirror an SSD and HDD. It'll probably work but will be comparatively slow as it would depend heavily on the speed of the HD, so you lose the benefit of the SSD.

Just follow the installer, have it auto-create the system on the SSD only. Don't create a user account during the installation. Once the system is up and running, create a second pool on the HDD and set it to mount on /usr/home/. Then create your users.


----------



## ANOKNUSA (Sep 15, 2016)

You would create a stripe on the SSD first.



Ependi Silalahi said:


> So how do I do
> 170 mirror to 1.0 TB using zfs and what ever left on my 1.0 TB I could use for another storage



Just so we are clear, here: you _can_ do this. It _is_ technically possible. But whatever reason you might have for wanting this, it is not good enough. Mirroring an HDD and SSD in any way will always cause a bunch of problems with no real benefits. A mirror should always consist of two disks of the exact same type and size, and they should run at the same speed. Ideally, they should be the same brand and same model as well. The disks should be as close to identical as possible.



Ependi Silalahi said:


> I know zpool is software base right not like RAID hardware



RAID is not a type of hardware. It is a computer storage concept. ZFS is a form of software RAID, just like gmirror(8), mdraid for Linux, or Storage Spaces for Windows. The policies, practices, and (for the most part) limitations for those forms of RAID, and for hardware RAID schemes, still apply to ZFS.


----------



## kpa (Sep 15, 2016)

"Hardware RAID" is a separate "computer" (often as a separate add-on card or could be an integrated chip on the motherboard) running specialised software (called firmware) that implements the RAID functionality on the drives used. The point of hardware RAID is to offload the RAID processing from the main system leaving more processing power for more important tasks. This sounds nice but in practice the newer CPUs and systems in general are so powerful that implementing the RAID functionality in software is perfectly viable and you're hard pressed to find a hardware RAID controller that could outperform software RAID on small scale arrays.


----------



## debguy (Sep 17, 2016)

read about iMac's fusion drive.  Win10 and OS X support it BSD likely has some equivalent (newly).  I'm a beginner myself and cannot tell you key words for freeBSD support of.

the jist is that the SDD and HDD act as one drive, and a driver moves data between them.  on the outside they appear as one drive, but inside data is moved so that the most frequently accessed data is on the SDD, the fat or lard of the rest on the HDD.  the algorithm to decide what stays on SDD is also selectable.

fusion is done on OS X using partition and mount options when formatting the drives - using bsd partition programs is involved.  i'm unsure if ZFS would be a problem supporting fusion.

one merely selects a partition from each device to be 'fused', and does not have to use the full of either for the 'fusion drive'

i suggest this "all one drive" idea - having many mounted partitions will cost you time later, time you can spend on better bsd worries.

your be better to have one big (if pseudo) partition and then also to have a passport 1TB drive to back up, and not try to manage a set of partitions.  (one exception for advanced use: setting up an emergency recover partition if you cannot boot from flash/thumb drive for the same).  partitions have a way of splitting up and being collected over new drives and becoming a mess, like directories but worse to deal with.

Oh.  fusion is not the same as raid level n "striping".  it is more flexible and manages what goes where differently.  but it also isn't redundant (you need to back up) like raid 2.  (not an option anyway for SDD<>HDD)


----------



## Ependi Silalahi (Sep 18, 2016)

SirDice said:


> Don't stripe or mirror an SSD and HDD. It'll probably work but will be comparatively slow as it would depend heavily on the speed of the HD, so you lose the benefit of the SSD.
> 
> Just follow the installer, have it auto-create the system on the SSD only. Don't create a user account during the installation. Once the system is up and running, create a second pool on the HDD and set it to mount on /usr/home/. Then create your users.


I was able to create pool on SATA HDD
What do you mean mount to "/usr/home"? do I create "/usr/home" dir on second HD?
How do I format the second HD

i tried #mount /dev/ada1 /usr/home 
got message dev/ada1: operation not permitted
Thanks


----------



## Ependi Silalahi (Sep 18, 2016)

SirDice said:


> Don't stripe or mirror an SSD and HDD. It'll probably work but will be comparatively slow as it would depend heavily on the speed of the HD, so you lose the benefit of the SSD.
> 
> Just follow the installer, have it auto-create the system on the SSD only. Don't create a user account during the installation. Once the system is up and running, create a second pool on the HDD and set it to mount on /usr/home/. Then create your users.


Sir Dice
Please correct me if I am wrong
after finish with installation freebsd 10.3 on SSD no new user name created  yet
then I created new zpool name by type "zpool add tank ada1
i am not sure if I have to run "gpart" but then I type
# gpart create -s GPT ada1
# gpart add -t freebsd-ufs -s 932G ada1
# newfs -U /dev/ada1

how do I mount to "/usr/home" or do i need to create "/usr/home" on "/dev/ada1"?
can you please help. this bothering me
I want to have "freebsd-zfs" on second HD what is the b enefit of using ZFS on this case if I dont use miror 
Thanks


----------



## ANOKNUSA (Sep 18, 2016)

Ependi Silalahi, have you read the _Handbook_ chapter on ZFS? You should start there, then move on to the zpool(8) and zfs(8) man pages. ZFS is not something you should be using before understanding the basics.

`zpool add` adds a "virtual device" to an existing pool; `zpool create` creates a new pool. The difference is very important, as running `zpool add` on a single disk can lead to serious vulnerabilities later on. Mountpoints are also managed internally with ZFS, and are created, destroyed, and changed dynamically. It is not like mounting a standard partition. ZFS is a completely new means of managing computer storage; it can take time to really understand how some things work.


----------



## Ependi Silalahi (Sep 19, 2016)

ANOKNUSA said:


> Ependi Silalahi, have you read the _Handbook_ chapter on ZFS? You should start there, then move on to the zpool(8) and zfs(8) man pages. ZFS is not something you should be using before understanding the basics.
> 
> `zpool add` adds a "virtual device" to an existing pool; `zpool create` creates a new pool. The difference is very important, as running `zpool add` on a single disk can lead to serious vulnerabilities later on. Mountpoints are also managed internally with ZFS, and are created, destroyed, and changed dynamically. It is not like mounting a standard partition. ZFS is a completely new means of managing computer storage; it can take time to really understand how some things work.


Ok Thanks ANOKNUSA.


----------



## Ependi Silalahi (Sep 20, 2016)

Ependi Silalahi said:


> Ok Thanks ANOKNUSA.


I am starting to understand after reading many of manuals
When you said this  "Mountpoints are also managed internally with ZFS, and are created, destroyed, and changed dynamically." 
Do you mean using "gpart" ? All I know zpool creating and adding pool 
I am struggling to understand using zfs with single disk
I know I can "stripe" or "mirror" with multiple disks but in my case I have "SSD" and SATA "HDD" 
So what to do after create "zpool create"? after create new pool i run "add [-fn] <pool> <vdev> ..."
but it doesnt like it? it says " "cannot open 'da0': no such pool" and I know my new pool exist and my hd exist.
On my "SSD" i see there is "/usr/home" and I was told to mount my new pool to "/usr/home" which I dont understand the concept of it. Why would I do it to existing path? Would I gain room or would it make double path
I tried the way I understood but still fail. 
I know I can survive in linux but in  freebsd I am just starting this year.


----------



## zshfan (Apr 19, 2020)

SirDice said:


> Don't stripe or mirror an SSD and HDD. It'll probably work but will be comparatively slow as it would depend heavily on the speed of the HD, so you lose the benefit of the SSD.
> 
> Just follow the installer, have it auto-create the system on the SSD only. Don't create a user account during the installation. Once the system is up and running, create a second pool on the HDD and set it to mount on /usr/home/. Then create your users.



Hello!
Why it is necessary to mount in / usr/home? the mountpoint /home is inadmissible?


----------



## ralphbsz (Apr 19, 2020)

A: This is an ancient thread, and you should probably have started a new one, since a lot of the people involved in the original discussion may not be here.
B: Too late now. Your question is here.

C: The original poster in this thread for some reason wanted to use /usr/home. One can both use /home and /usr/home, both work. There are traditions for either. I use /home, but not for any strong reason.


----------



## jmos (Apr 19, 2020)

zshfan said:


> Why it is necessary to mount in / usr/home? the mountpoint /home is inadmissible?



"/home" is by default just a symlink, and "/usr/home" is a real directory (and the target of the symlink):


```
jo@freya ~>  cd
jo@freya ~>  ls -l /home
lrwxr-xr-x  1 root  wheel  8 20 Nov. 19:57 /home -> usr/home
jo@freya ~>  ls -l /usr/home/
total 4
drwxr-xr-x  38 jo  jo  2048 19 Apr. 20:57 jo
jo@freya ~>  pwd
/usr/home/jo
jo@freya ~>  echo $HOME
/home/jo
```


----------

