Repurposing my Jails SSD for a boot / jails SSD?

Status
Not open for further replies.

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Is this possible / a good idea? I have a 32GB SSD that I use for my jails storage right now. As I ponder the move to FreeNAS 9.3, my first thought was to find a second SSD for the boot drive. My second thought was that I really don't use much of the space at all on the jails drive. Can I make it both the boot and the jails SSD?

I don't see why it wouldn't work... Thinking of the following migration path...
1) Disable jails on my 9.2.1-8 build.
2) Copy all files from jails volume to another location.
3) Backup my config.
4) Move to FreeNAS 9.3 and use my SSD as the installation target.
5) Create a volume on the boot drive for jails.
6) Copy the data over.
7) Configure jails to point to the new spot.
8) Enable jails.

Reasonable?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
No, the boot device is still exclusively the boot device. In fact, if anything, its a bit more ugly putting your own files on the boot device than it was before. ;)
 
J

jkh

Guest
Here's one possible method, from the advanced class syllabus:

How to use an SSD in FreeNAS for booting and caching

1. Install FreeNAS onto a thumb drive.
2. Reboot, set up system, leave SSD alone.
3. In a terminal window (or ssh session), determine which disk is the SSD and which is the thumb drive.
Let's call the SSD "ada0", and the thumb drive "da0p2" for the purposes of this.
("zpool status freenas-boot" will show the drive, but possibly using it's gptid. That's okay.)
4. Perform the following commands via the command line:

gpart destroy -F ada0
gpart create -s GPT ada0
gpart add -t bios-boot -i 1 -s 512k ada0
gpart add -t freebsd-zfs -i 2 -a 4k -s 32g ada0 # Again, pick size. 32g is good, 64g is probably more than necessary
gpart add -t freebsd-zfs -i 4 -a 4k -s 16g ada0 # Let's say for l2arc cache

5. Now set up the SSD:

/usr/local/sbin/grub-install --modules='zfs part_gpt' /dev/ada0
zpool freenas-boot attach da0p2 ada0p2
zpool add freenas-boot add cache ada0p4 # To add it as a cache

6. After the pool has resilvered, you can remove the thumb drive from the pool:

zpool freenas-boot detach da0p2

7. Ensure your BIOS is set up to boot from the SSD.

(Courtesy of Sean Fagan <sef@ixsystems.com>)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I went ahead and created a copy of the above procedure because when 9.3-Release comes out, this thread will be gone. I'll have to test this out on my test system to see how it can work and if if affects software updates at all.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Just to prove we are never satisfied, would it be possible to add a mirror to said SSD?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I went ahead and created a copy of the above procedure because when 9.3-Release comes out, this thread will be gone. I'll have to test this out on my test system to see how it can work and if if affects software updates at all.


Good point! Did you create a new thread somewhere?
 
S

sef

Guest
Just to prove we are never satisfied, would it be possible to add a mirror to said SSD?
Yes! Go through the same steps (partitioning and installing grub being the most important), and simply use it with the "zpool attach freenas-boot ada0p2 ada1p2" (to pick some).

You could even make a three-way mirror, if you wished.

You can also use this procedure with thumb drives as well, to increase the size of the pool. I've done that to go from an 8g pool to a 32g pool.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Yes! Go through the same steps (partitioning and installing grub being the most important), and simply use it with the "zpool attach freenas-boot ada0p2 ada1p2" (to pick some).

You could even make a three-way mirror, if you wished.

You can also use this procedure with thumb drives as well, to increase the size of the pool. I've done that to go from an 8g pool to a 32g pool.

Thanks. So you just have to make the partitions the same and the new drive gets re-silvered? I suppose you could do the same with the other partition if you wanted that mirrored for e.g. jails?
 
S

sef

Guest
Thanks. So you just have to make the partitions the same and the new drive gets re-silvered? I suppose you could do the same with the other partition if you wanted that mirrored for e.g. jails?
Jails live on the data pool, and are already handled through the UI. (The steps are mostly the same to manually add a disk as a mirror -- this is how I make 3-way mirrors -- but you don't want to install grub on it in those cases.)
 
Status
Not open for further replies.
Top