Welcome, Guest! Log In | Create Account

FAQ (Advanced Questions)

FAQ (Advanced Questions)

Postby al562 » Wed Jun 17, 2009 2:49 pm

User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 3:59 am

Q: Can I automatically backup my data to external, USB drives that mount automatically?
A: Yes, but since you want everything to be automatic you will have to learn about scripting. You can start by taking a look at: You want encryption with that? It's already in there too!
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Advanced FAQs - Software RAID

Postby al562 » Wed Aug 19, 2009 4:07 am

Q: Can I grow a softwareRAID array from FreeNAS GUI?
A: No.

Q: Can I grow a softwareRAID array from FreeNAS CLI?
A: Possible but not suggested, !! Not Safe !!.

Q: Can I grow a UFS filesystem from FreeNAS GUI?
A: No.

Q: Can I grow a UFS filesystem from FreeNAS CLI?
A: Possible but not suggested , up to 2TB !! Not Safe !!. Reference: Grow filesystem on EFI/GPT partition.

Q: Can you move/transfer/migrate the same 3 or 4 or 5, RAID5 drives to another FreeNAS server and still maintain the data? Can you do this for SoftRAID1?
A: Yes! The software RAID is not tied to anything except what is on those disks and the software itself. Remember to backup your configuration file before you start. You can use it as a reference and in case of emergency. You should also backup your data unless you really know what you are doing.
Start by reading the following for background on how/what to expect and do.

Q: What is the best, safe way to enlarge a SoftwareRAID array?
A: The safe way is the hard way:
  1. Backup your data
  2. Destroy your original array
  3. Add new disk(s), don't forget to format the disk's SoftwareRAID
  4. Create new SoftwareRAID array
  5. Format & mount the array.
  6. Restore data from backup.
  7. For a couple of other possible options see: Is there any way to expand/grow a RAID array without having to backup and restore all my data?

Q: How can I identify which /dev is which physical hard drive? Which drive is which?!?
A: This is an especially good thing to know when you are trying to replace a failed drive in a SoftRAID array!
  1. Know your disks' unique serial number
    Image
  2. Run the following one liner in WebGUI > Advanced|Execute command
    Code: Select all
    for i in $(sysctl -n kern.disks);do printf  "%s\t%s\n" $i "$(smartctl -a /dev/$i | grep "Serial Number")";done | sort
    This will output a list of all disks' assigned /dev's and serial numbers.
  3. Find which disks are members of your Software RAID array by using geom status command or looking at WebGUI > Diagnostics|Information|Software RAID page.
  4. Identify the bad disk.
  5. Replace the bad disk in the SoftRAID array with a new one of equal OR greater size.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 4:10 am

Q: Can I upgrade from the Embedded 32bit version, installed on a hard drive, to 64bit version?
A: Yes. Here's how:
  • Short version(thanks to Volker)
    1. CREATE a backup of your configuration via WebGUI 'System|Backup/Restore'
    2. Open /etc/platform file and change i386-embedded to amd64-embedded
    3. Go to 'System|Firmware' and upload the AMD64 img file
      This is the hardcore upgrade version, so use it on your own risk.
  • Long version(thanks to Dan)
    1. Download same version/revision FreeNAS embedded IMG file and FreeNAS LiveCD AMD64 ISO.
    2. Upgrade FreeNAS using IMG file.
    3. Backup the configuration.
    4. Shutdown, open the box and disconnect data only disk if any, just for safety.
    5. Burn LiveCD AMD64 ISO and boot from LiveCD (FreeNAS AMD64). Possible LiveCD will pick the configuration from disk.
    6. Select "(6) Shell" from menu and umount the hard disk.
      umount -f /cf && exit
    7. Select "(9) Install" & install on HDD. Here you can opt for 3 partitions , system+data+swap.
    8. Shutdown.
    9. Connect data only disk removed in Step #4 and boot from HDD(ad0).
    10. Set network configuration(menu 1 & 2).
    11. Backup the new configuration ... just in case.
    12. Restore old configuration from backup(step 3).
    13. Reboot.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 4:13 am

Q: How come my script works in shell when invoked manually but not in CRON?
A: In FreeNAS, CRON does not have a user profile set. When you run a script or command manually it runs using your user profile/settings/privileges, (root usually). CRONs’ settings/privileges are not the same as roots’. To make sure your script/command works properly, you need to fully specify all path names and ensure non-root access to files, folders and processes. You can also set a profile for CRON with root credentials, but this is not recommended for security reasons.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 4:15 am

Q: How do I upgrade/replace/clone my USB Flash drive/CF card running Embedded Installation?
A: If your new USB FLash/CF is equal or bigger than original Flash/CF you can just copy from old one to new one. There are a couple of ways to do this.
First way(thanks to Dan)
  1. Boot from old Flash/CF if FreeNAS is down.
  2. Insert the second/new Flash/CF stick.
    • Old FLash/CF stick should be da0
    • New FLash/CF stick should be da1, check your dmesg log.
  3. Copy old to new.
    Code: Select all
    dd if=/dev/da0 of=/dev/da1 bs=16k
  4. Shutdown and remove old FLash/CF
  5. Boot from new FLash/CF

Second way(thanks to Lorne)
  1. Burn a LiveCD with the same FreeNAS version you are running now on USB#1
  2. backup freenas configuration.
  3. install USB#2 and boot from Live CD.
  4. install FreeNAS to USB#2, use same options as previous install to USB#1.
  5. boot from USB#2, assign interfaces and setup network.
  6. restore saved configuration and reboot.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 4:16 am

Q: How to enable serial console on FreeNAS?
A:
See: Re: Serial Console in .7-4653
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 4:18 am

Q: Why are manual changes to configuration files (like SMB.CONF) not saved after a reboot?
A: Because FreeNAS settings are managed from the WebGUI and all configuration information is stored in a single, monolithic configuration file that recreates each service configuration file upon service restart OR system reboot. That makes FreeNAS different from FreeBSD and other *nix distributions. Manual changes to configuration files like SMB.CONF in FreeNAS are NOT permanent under any installation/platform. The only way to ensure custom settings remain in effect after a service is restarted, or the system is booted, is to enter them in the "Auxiliary Parameters" box provided on most WebGUI services configuration pages.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Wed Aug 19, 2009 5:36 am

Q: How do I mount/map a CIFS/SMB/SAMBA/Windows share/shared folder on my FreeNAS server?
A: For FreeNAS 0.69.2 but should also work for some older and newer versions.
First make sure all hosts/clients are communicating properly on your network. Then you need to create a mount point on the FreeNAS server using the CLI, WebGUI > Advanced|Execute command, SSH or console shell to execute the following:
Code: Select all
mkdir /mnt/YourShareName
You could also use Quixplorer if you are unfamiliar with the other interfaces.

Then you mount the remote share with this command:
Code: Select all
mount_smbfs //RemoteUserName@RemoteServerName /mnt/YourShareName
You will be prompted for the user's password, enter the correct one and the remote shared files & folders should now appear in the /mnt/YourShareName directory/mount point you created.

Would you like to do that without having to enter a password? Here's how:
  • Create an SMB configuration file in your home directory and enter your server/login information:
    Code: Select all
    nano ~/.nsmbrc
    [default]
    domain=Your Windows/SAMBA Domain or Workgroup name.

    [RemoteServerName]
    addr=RemoteServer IP Address

    [RemoteServerName:RemoteServerUserName]
    password=RemoteUserPassword

    ^X
    Y
  • Note: RemoteServerName and RemoteServerUserName generally need to be capitalized (at least that was my experience with Windows XP shared folder).
  • Use the same mount_smbfs command and this time it will find the SMB config file and use the settings you entered. Your remote share should mount without prompting for a password.
If you have trouble and can't get the above to work, before you ask for help, please check your network settings and make sure your computers can communicate with each other. If the network is good then please read and understand mount_smbfs. If you still can't get it working, then ask for help.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A

Re: FAQ (Advanced Questions)

Postby al562 » Sat Aug 22, 2009 6:03 am

Q: Is there any way to get the functionality of dRobo or XRaid2 or UnRAID in FreeNAS?
Q: Is there any way to expand/grow a RAID array without having to backup and restore all my data?

A: Nice idea, very old story, few options as of 2009/08.
FreeNAS 0.7.4919 i386-full; 510MiB RAM; Asus P4P800-VM; P4 CPU 2.4GHz; Promise SATA300-TX4; 2.5Tb+ storage. Plus a bunch of others.
Test system: FreeNAS 0.7.4919 i386-embedded; DELL Dimension 4600i; P4 CPU 2.66GHz 255MiB RAM; any IDE/SATA disks I can get.
User avatar
al562
Moderator
 
Posts: 1509
Joined: Sun Mar 29, 2009 3:35 am
Location: U.S.A


Return to Forum Rules & FAQ

Who is online

Users browsing this forum: No registered users and 1 guest