Add Second Hard Drive (Solved)



  • 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.
    ![Screen Shot 2017-12-05 at 11.32.25 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-12-05 at 11.32.25 PM.png_thumb)
    ![Screen Shot 2017-12-05 at 11.32.25 PM.png](/public/imported_attachments/1/Screen Shot 2017-12-05 at 11.32.25 PM.png)
    ![Screen Shot 2017-12-05 at 10.08.15 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-12-05 at 10.08.15 PM.png_thumb)
    ![Screen Shot 2017-12-05 at 10.08.15 PM.png](/public/imported_attachments/1/Screen Shot 2017-12-05 at 10.08.15 PM.png)



  • 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.

    ![Screen Shot 2017-12-07 at 7.42.38 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-12-07 at 7.42.38 AM.png_thumb)
    ![Screen Shot 2017-12-07 at 7.42.38 AM.png](/public/imported_attachments/1/Screen Shot 2017-12-07 at 7.42.38 AM.png)



  • 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.



  • 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.



  • First learn how to use SSH or use the local shell, the WebUI is not meant for this kind of usage.



  • @Grimson:

    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)



  • 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 [[color=red]O] to add new line, followed by a lower case [[color=red]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 [[color=red]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:

    ![Screen Shot 2017-12-08 at 11.22.38 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-12-08 at 11.22.38 AM.png_thumb)
    ![Screen Shot 2017-12-08 at 11.22.38 AM.png](/public/imported_attachments/1/Screen Shot 2017-12-08 at 11.22.38 AM.png)



  • 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



  • @marjohn56:

    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?



  • 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.



  • @marjohn56:

    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…....



  • @marjohn56:

    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.



  • 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/



  • @marjohn56:

    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.



  • 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 [[color=red]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.  ???



  • Okay, got it solved by tarfile command to extract the /usr/ direstory…the entire directory from ada0 to the newdisk (ada1). From what I understand the mv command is more effective for single files or group of files.

    So, at the local shell, change to usr directory: cd /usr/
    at the usr diredtory type: tar -C /usr -cf - * | tar -C /newdisk -xvf -

    After the completion, reboot…walla! Hope this helps some one out.

    ![Screen Shot 2017-12-09 at 5.50.47 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-12-09 at 5.50.47 PM.png_thumb)
    ![Screen Shot 2017-12-09 at 5.50.47 PM.png](/public/imported_attachments/1/Screen Shot 2017-12-09 at 5.50.47 PM.png)



  • So I came across this and I know it is a little stale, but thanks for the tips.

    I'm quite comfortable with VI, so that was no issue.

    I was just wondering why you didn't create a symbolic link? I think that would be actually simpler. I'm not clear if that will go away after a reboot, or a firmware/os update. I wanted to offload my Pfblocker data. I set it up yesterday and within a few hours it has filled up my var partition.


 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy