pfSense Support Subscription

Author Topic: Add Second Hard Drive (Solved)  (Read 315 times)

0 Members and 1 Guest are viewing this topic.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Add Second Hard Drive (Solved)
« on: December 06, 2017, 08:57:37 pm »
Last night when I got the issue with the second hard drive sorted, I format it with the v. 2.4.2 installer; however, I didn't think it through when I was doing it. So I got the following...see pic. When I then tried to erase the drive or modify, I keep getting invalid argument or option i not specify, I believe and it doesn't matter whether I do it on the PFSense machine or the webconfigurator. I don't need a boot track nor a swap track. (Correct input should have been: gpart destroy -F ada1)

Should I just leave it as is? if that's okay, then how do I transfer or move all user data (admin) to ada1? These are the files I need to move:

/usr/local/etc/rc.d/c-icap.sh

/usr/local/etc/rc.d/clamd.sh

/usr/local/etc/rc.d/dnsbl.sh

/usr/local/etc/rc.d/sqp_monitor.sh

Of course, I wish there was an official method sticky to address this.
« Last Edit: December 09, 2017, 03:20:14 pm by NollipfSense »

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #1 on: December 07, 2017, 08:09:09 am »
Okay, found this (https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html) and got it set up correctly now...see pic. However, when I executed the final step (/dev/ada1p1   /newdisk   ufs   rw   2   2) I got dev/ada1p1: permission denied.

How to resolve that? I thought I am already the sole root user.
« Last Edit: December 07, 2017, 08:13:08 am by NollipfSense »

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #2 on: December 07, 2017, 09:09:34 pm »
No one...where are the elders? The FreeBSD forum it seems doesn't like or want to answer questions regarding PFSense...I went there for this question: "cam status unconditionally re-queue request" that I also posted here. They helped however, the admin quickly pointed me to their policy since I mentioned Pfsense.

When one is new to PFSense, sometimes the handbook doesn't make sense because one the new to everything...especially, if one is coming from a GUI world such as MacOS.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #3 on: December 07, 2017, 11:20:30 pm »
So, the handbook doesn't make any reference on the disk adding page that one needs to use vi editor to add the new drive...and based on Google I wasn't the only one having problems doing this...sadly.

Now trying to figure out how to use the editor.
« Last Edit: December 08, 2017, 10:01:37 am by NollipfSense »

Offline Grimson

  • Full Member
  • ***
  • Posts: 188
  • Karma: +26/-2
    • View Profile
Re: Add Second Hard Drive
« Reply #4 on: December 08, 2017, 05:44:16 am »
First learn how to use SSH or use the local shell, the WebUI is not meant for this kind of usage.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #5 on: December 08, 2017, 10:00:53 am »
First learn how to use SSH or use the local shell, the WebUI is not meant for this kind of usage.

Thank you Grimson for responding and for the encouraging words!   I used the local shell.  8)

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #6 on: December 08, 2017, 10:38:57 am »
So, I figured out how to add the drive using the vi editor to modify the /etc/fstab file. I found this link very helpful: https://www.tutorialspoint.com/unix/unix-vi-editor.htm

Just remember at the local shell type vi /etc/fstab, then, once you're in the file, at the cursor, type an upper case [O] to add new line, followed by a lower case [i] to enter insert mode. Of course I had forget that initially. I followed what was already in the file...you'll notice a "o" and above the swap, then a "1" for ada0. So, I add "2" then insert new line and get into insert mode to add: dev/ada1p1 /newdisk ufs rw 2 2. You then need to exit insert mode and I found it easy to use the ZZ command to save and exit the vi editor.

Just to be sure everything was saved, I enter the vi editor to see that all was saved. Once you exit the vi editor again, you can mount your drive at the local shell [mount newdisk].

Now, I am trying to figure out how move all those files I mentioned the first post. Here is my file system showing the added drive:
« Last Edit: December 08, 2017, 11:26:27 am by NollipfSense »

Offline marjohn56

  • Sr. Member
  • ****
  • Posts: 543
  • Karma: +52/-2
    • View Profile
Re: Add Second Hard Drive
« Reply #7 on: December 08, 2017, 11:00:48 am »
You'll find nano is a much friendlier editor than vi.

vi is a bit like Marmite, you either love it or hate it, personally I hate it hence the nano.

You will probably have to install nano first though.

pkg install nano

pfSense 2.4.3 on Qotom Q355G4 or APU2C4 - Billion 8800NL (bridge) - ISP Zen U.K.
Please do not PM me for help. I have a life to live too.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #8 on: December 08, 2017, 11:30:27 am »
You'll find nano is a much friendlier editor than vi.

vi is a bit like Marmite, you either love it or hate it, personally I hate it hence the nano.

You will probably have to install nano first though.

pkg install nano

Thank you Marjohn56 for responding...LOL...it's tricky isn't it! Can you help me on how to move all those files in my first post?

Offline marjohn56

  • Sr. Member
  • ****
  • Posts: 543
  • Karma: +52/-2
    • View Profile
Re: Add Second Hard Drive
« Reply #9 on: December 08, 2017, 01:26:53 pm »
Cannot help you with that, as I use single SSD's with zfs.

For me, RAID or anything like that is just not worth it. I use RAM for temp, and I minimise writes where I can, a decent SSD will probably last a minimum of 10 years.

If not, it takes me only a few minutes if needed to insert a new drive, re-install pfSense and restore my configs.

pfSense 2.4.3 on Qotom Q355G4 or APU2C4 - Billion 8800NL (bridge) - ISP Zen U.K.
Please do not PM me for help. I have a life to live too.

Offline Jailer

  • Sr. Member
  • ****
  • Posts: 399
  • Karma: +54/-2
    • View Profile
    • Bored Guy Blog
Re: Add Second Hard Drive
« Reply #10 on: December 08, 2017, 07:45:48 pm »
You'll find nano is a much friendlier editor than vi.

vi is a bit like Marmite, you either love it or hate it, personally I hate it hence the nano.

You will probably have to install nano first though.

pkg install nano

Or just use ee since it's already installed.

Another vi hater here.......

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #11 on: December 08, 2017, 09:41:49 pm »
Cannot help you with that, as I use single SSD's with zfs.

For me, RAID or anything like that is just not worth it. I use RAM for temp, and I minimise writes where I can, a decent SSD will probably last a minimum of 10 years.

If not, it takes me only a few minutes if needed to insert a new drive, re-install pfSense and restore my configs.

Mine is not a raid setup...just a 16GB SSD and a 500GB 2.5 SATA 3 hard drive both with ufs. I was thinking of a single disk SSD with zfs...got cautioned that it's not worth it for a single HDD.

Offline marjohn56

  • Sr. Member
  • ****
  • Posts: 543
  • Karma: +52/-2
    • View Profile
Re: Add Second Hard Drive
« Reply #12 on: December 09, 2017, 02:31:58 am »
Not in the context that if the drive fails completely no, it's not. I had also thought it not worth it, but was advised by someone who has far greater knowledge then I that it is worth it.

Here's a nice thread where I think the benefits of single drive ZFS are discussed, you make your own mind up.

https://forums.freenas.org/index.php?threads/single-drive-zfs.35515/
pfSense 2.4.3 on Qotom Q355G4 or APU2C4 - Billion 8800NL (bridge) - ISP Zen U.K.
Please do not PM me for help. I have a life to live too.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #13 on: December 09, 2017, 01:11:30 pm »
Not in the context that if the drive fails completely no, it's not. I had also thought it not worth it, but was advised by someone who has far greater knowledge then I that it is worth it.

Here's a nice thread where I think the benefits of single drive ZFS are discussed, you make your own mind up.

https://forums.freenas.org/index.php?threads/single-drive-zfs.35515/

Will read up later...for now, I am committed since I already bought two HDD.

Offline NollipfSense

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-0
    • View Profile
Re: Add Second Hard Drive
« Reply #14 on: December 09, 2017, 01:25:11 pm »
So, I found two resources...https://www.freebsd.org/doc/en/books/faq/disks.html#idp59342184 section 8.2; however, after reading, I realized that it's for moving the entire content to another HDD.

Then, this one https://forums.freebsd.org/threads/62272/ which seems to apply to my needs; however, after trying the first command, I get command not found, and if I used just the [sudo -i], I also get command not found,

So, I am a little nervous to try the rest of the command...maybe, I'll try after lunch.  ???