Migrate USB install to SSD?

Status
Not open for further replies.

Joo Chung

Dabbler
Joined
Dec 17, 2013
Messages
16
Hi all!

I've been running my FreeNAS server from a USB flash drive for a while, but just put in a 120GB SSD yesterday. I'd like to migrate my FreeNAS installation from the USB Flash Drive to the SSD. Whats the best approach? Should I just save the config from the USB flash drive, install fresh on the 120GB SSD, and then restore the config? Or is there another way to just migrate everything over? Could I just 'dd' the USB flash drive to the SSD?

Thanks!

Joo

P.S. My build...
  • Intel Core i3-4330
  • Supermicro MBD-X10SAT-O
  • 2 x 8GB DDR 1600 ECC SDRAM
  • 2 x IBM ServeRAID M1015 (crossflashed to IT mode)
  • 12 x 2TB SATA drives (Mix of WD and Samsung)
  • 16GB USB Flash Drive to boot FreeNAS
  • 120GB Kingston SSDNow V300
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
The first question is why?

FreeNAS loads everything to RAM and then only touches the stick for config changes. You will see almost zero improvement from using that SSD over flash.

You'd be better off using it for ZIL or L2ARC, though those aren't always recommended either.
 

Joo Chung

Dabbler
Joined
Dec 17, 2013
Messages
16
Not really looking for an "improvement" other than its in the case and more permanent. Less likely to be dislodged by some stray bump or what not. Also, I'd personally prefer to get some stuff off of the big zfs volume and move some stuff to the boot disk, e.g. custom scripts.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
My understanding is that the FreeNAS install takes over the full drive and you won't be able to use the extra space.

Also, your motherboard likely has a USB header (if not an actual port) that you can can next a USB cable to internally. That would allow moving the stick inside.
 

Joo Chung

Dabbler
Joined
Dec 17, 2013
Messages
16
So the install from CD takes over the entire drive? I know the USB flash drive image only takes 2GB, which leaves a lot of space left over which I imagine could be partitioned and mounted. But this isn't the case for an install from CD?

The USB flash drive isn't meant for lots of writes. IIRC, the root filesystem is mounted read-only by default on the USB flash drive to prevent performance problems and wearing out the flash drive prematurely. Wouldn't be a problem with the SSD. Does the install from CD configure the root filesystem to be mounted read-only as well? Would I still have to keep remounting as r/w, make the change, then remount as r/o again?

I was under the impression these items wouldn't be an issue with an install from CD onto an HDD or SSD.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
It doesn't matter what you install it on, it works the same way. You are wasting the ssd if you go that route

Sent from my Nexus 5
 

Joo Chung

Dabbler
Joined
Dec 17, 2013
Messages
16
So... after doing some more research... looks like the answer is that the freeness image defines all 4 primary partitions. While its possible to manually rearrange and resize the partitions so that you can create additional extended partitions, its not guaranteed it will survive an upgrade of FreeNAS. I am a bit disappointed as NAS4Free has the option to install the software AND create an additional data partition using the remaining space. But I don't debate the merits of either approach here.
 

hmviking

Cadet
Joined
May 3, 2014
Messages
9
There may be a variety of reasons to go to an SSD instead of a USB stick. One reason is that the / partition is at 97% capacity leaving little room to add your favorite editor for example. Another reason is that the USB subsystem is flaky. Every now and then the USB stick does not boot up. The reason for the problem may have to do with the Intel USB XHCI host on my Supermicro motherboard. I really want 5Gb/s USB to move tera bytes of data instead of at 0.5Gb/s.

So regarding the original question about moving the USB to SSD. It is as far as I know a manual process. I went with MBR instead of GPT since it seemed logical at first to match the USB format.
1. Create MBR on the SSD
2. Create boot partition on the SSD.
3. Copy boot partition from USB to SSD with dd
4. If larger space is needed run gpart resize to increase the partition size.
5. Create alternate system partition.
6. Duplicate steps 3 and 4 with the alternate partition on the USB stick.
7. Create a third partition. It's 1.5M, but I'm unclear what it is for.
8. Copy with dd from the USB stick the 1.5M partition. I kept the partition the same size on the SSD as on the USB stick.
9. Create a fourth partition of 20 M for /data.
10. Copy with dd from the USB the fourth partition to SSD.

Now before rebooting mount the SSD rw so that changes can be made outline below.

At this point there are hard coded references to ufs/FreeNAS to be changed in the files below to the drive name for the SSD. In my case ada0
/conf/base/etc/nanobsd.conf
/conf/base/etc/fstab
/conf/default/etc/remount
/usr/local/www/freenasUI/middleware/notifier.py
/etc/nanobsd.conf
/etc/fstab

Notifier.py tries to find the boot drive. In my case it fails for a reason I'm not clear on. The xml file created describing the disk system does not include my SSD
in the list under LABEL so that the _find_root_dev function can find it. If someone can give me a pointer it would be appreciated. For now I hard coded to get around
that problem until I have more time understanding it.

Installing from CD may be an easier route. I have not tried that since my system does not have a CD player.
I don't believe it is possible to add more partitions unless one uses GPT. It would be preferred as I discovered having gone through the above exercise due to the fact that all four primary partitions
are used and I can't add anything.
 
Status
Not open for further replies.
Top