Showing posts with label Own NAS Box. Show all posts
Showing posts with label Own NAS Box. Show all posts

Thursday, July 4, 2019

XPEnology : DS disappears - "Recoverable" loop fix

Xpenology/ Synology : 
DS disappears - "Recoverable" loop fix

I had a problem where my baremetal (6.1.3-8) became undiscoverable on the network following a reboot and would not pick up an ip address (according to the router).  Putting in a newly created bootloader USB made the device discoverable through Synology Assistant and find.synology.com, but was listed as "recoverable".  Clicking "recover" (the only option) started an immediate reboot which caused the diskstation to become undiscoverable again.  
 
Symptoms:
1.  Diskstation disappears from network and is undiscoverable (no IP address) - possibly associated with an update.  
2.  New USB bootloader makes DS reappear but is marked as "RECOVERABLE"
3.  Hitting recover causes an immediate reboot where DS returns to symptom #1 (disappears from the network)
4.  Going to an older bootloader version shows the DS as "migratable" but refuses to install the associated .PAT due to the older version
5.  Going to a newer bootloader version shows as "recoverable", returns to symptom #1

Causes
- Not sure but likely a corrupted or mismatch in the DSM software on the volume.

Fix (following the synology data migrate process for 5.x)
1.  Remove ALL HDDs associated with the DS
2.  Prepare new USB bootloader using the established processes.  Must be the same version of your old volumes or later
3.  Plug in blank temporary HDD by itself (I used an 80GB laptop HDD so anything will do)
4.  Go through normal installation process.  Setup as per old DSM settings (can use config backup files).  Test with a restart or two
5.  Shutdown DS, unplug temp HDD, reconnect HDDs
6.  Power-on.  Find using find.synology.com or Synology Assistant.  Should be shown as "Migratable"
7.  Chose "Fresh Install, Keep my data".  Go through normal process.
8.  Setup however you like.  Success!!
 
I'm not advanced enough of a user to know if there are other methods of repairing this problem; this is the one that worked for me.


Monday, July 18, 2016

[Quick Install: NAS-XPEnology]: XPEnology - NAS Box setup

XPEnology - NAS Box setup

XPEnology.me

Download from : http://xpenology.me/downloads/

DSM

The heart of the device is its Synology operating system DSM (Disk Station Manager), which is used in all devices produced by Synology. It is a well-optimized Linux kernel, most of the changes which aims to work with hard disk drives (full list of compatible discs) and Raid arrays. As well it is composed of many Open source packages, details of which you will find just the manufacturer’s website. Let respects the company’s Sinology! They did a great job – their products are the best and we will tell why. Thanks to them!
DSM loved by many, but unfortunately Sinology not released a version for PC, the operating system is not compatible with the hardware of many PCs and servers are not produced by Synology.

WARNING

Despite the fact that the development team was able to release the bootloader, allowing DSM run on almost any computer, we strongly recommend that you refrain from using a bootloader on production and buy it from the above-mentioned original products from Synology.
Use it at your own risk! we will not be held responsible for any data loss or broken machine.

What is XPEnology

DSM is loaded on a synology Device with USB flash drive, soldered on the motherboard, the operation system and all applications located are in special slice of the hard disk drives (on each) this method allows to increase the service life of the boot flash and increase productivity.
XPEnology is a bootloader as IMG image. XPEnology compiled from the source code provided Sinology under license GNU. XPEnology and does not contain the operating system.
In addition to the kernel in the boot loader included some scripts and driver packages to work on most particular hardware platforms.
XPEnoboot is published by a team of contributors:
  • Vortex
  • Sancome
  • Kali
  • Jman
  • Poechi
XPEnoboot is similar with Nanoboot, but added more drivers and fix some problems, the most important is that it support DSM5.1 installation (special thanks to Vortex).
You can download it from Sancome website nanoboot.eu.org, or this website. Also Poechi website xpenology.nl

Friday, November 13, 2015

[FreeNAS]: Hardware Compatibility and naming Conventions

Hardware Compatibility and naming Conventions

 What is the hardware naming convention under FreeNAS(FreeBSD)?


ad0 is the first hard-drive, the Operatin System drive. ad1,ad2,ad3 .... ad999 are the second et .......storage drives.
ad0s1 is the first partition on the first drive, and ad5s4 is the fourth partition of the sixth drive. 
fd0 is the first flopy drive.
acd0 is the first ATAPI (IDE) CDROM drive.
cd0 is the first SCSI CDROM drive.
da0 is the first SCSI direct access disk-drive(can be USB drive).
da0s1 is the first partition on the first SCSI direct access disk-drive, and da5s4 is the fourth partition of the sixth SCSI direct access disk-drive. 

Warning: Drive names may change as drives are added or removed.

---------------------------------------------------------------------------------------------------------------------------------------

What is the best hardware solution for your own FreeNAS server?


Before you do the math:
Think about your data storage requirements
► How important it is to you (personal or business data)
► Can it be easily replaced or is it replicated elsewhere?
► How often you access/change the information
► What is the expected growth rate of data (will I max out the storage media and how do I expand it?)
The Performance
  • How many users access the information
  • What your network infrastructure is (the old 10/100/1000 debate)
  • Cables,
  • Switches (and hubs),
  • Routers
  • (some have multiport routers with wireless and are talking about GigE (why? wirless does not do GigE and the switch ports will more than likely be 10/100)
  • Accessability and Security
  • Will you be accessing the data locally, or via a WAN?
            and finally
The budget
Do I have any/some/no existing hardware that can be used to build my FreeNAS platform?
How much money have I got to spend?
 
Note: by draggaj


Hard Drive
Replacement: Hard drives are the most important parts of data storage devices.If the drive fails there are no replacements 
Performance: Size, drive speed, transfer speed, buffer memory, brand and model are just some characteristics on witch depend your system performance.
Failure: If your system breakdown you can replace the failed parts, reinstall FreeNAS or move the hard drive to a different system to recover your data. If your hard drive die, the information on the drive is lost forever.
Size: You can use hard drives up to 2TB under FreeNAS(FreeBSD ), but you must keep in mind that you need a hard drive supported buy BIOS to boot FreeNAS from hard drive.
Motherboard
Replacement: Motherboards can be replaced or upgraded without any data lost. 
Performance: 
    P2 motherboards
    P3 motherboards are the good choice, old but not too old.
    P4 motherboards

Processor
Replacement: Processors can be replaced or upgraded without any data lost. L1 and L2 cache size of the processor can make a difference.
Performance:
    P2
  • P3 it’s a good choice, for the server reliability and SoftwareRAID.
    P4
    Multi-Processors
RAM
Replacement: memory can be replaced or upgraded without any data lost.
    128MB:
  • 256MB: can be a good decision for small system < 1 TB.
    512+MB :
Network Cards
Replacement: Network cards can be replaced or upgraded without any data lost. 
    10Mb
  • 100Mb NIC’s, cheap cables and switches are the best solution for the money.
    1Gig
                What is the point of having one single gigabit connection to one single computer on your LAN?
                Full upgrade to gigabit include industrial grade cables (home made cables are too noisy), gigabit switches, gigabit routers, gigabit NIC’s, in one word the whole network.
                Once you upgrade everything, you wrongfully believe that your network will work at Gigabit speed? Wrong!
                If your workstation access the internet you must setup the maximum MTU to 1500, like that you can’t take advantage of higher “jumbo frames” MTU 9000. If your server use MTU 9000 and your workstations use MTU 1500,  packet fragmentation will slow down your network.
                What about the hard drives transfer speed? 

If you don't have a need for more speed than 100BaseT gives you, there's no reason to spend bigger bucks for gigabit upgrade.
Here is the math calculation:

1 x 1 x 1 x 0 x 1 x 1 x 1 x 1 = 0
For any zero in your formula the network upgrade results will be zero.


[FreeNAS acces freeNAS console remotely]: Can I acces freeNAS console remotely over the network?

Can I access freeNAS console remotely over the network?


You can access the console remotely using Putty or .. ssh client on your *Nix system.

1. On FreeNAS   WebGUI :Services: SSH enable SSHd service
  1. Enable SSH service
  2. Set the port , default port is 22 however you should consider using a different port between 10000 and 65535, see http://www.iana.org/assignments/port-numbers.
  3. For the beginning allow 'root' login if you are behind a router/firewall but consider to disable 'root' login in the future.
  4. Enable keyboard-interactive authentications, make sure that you have a complex admin/root password .
  5. Not cover by this howto.
  6. Enable compression. For internet transfer only.
  7. Server Private key. Not cover by this howto.
  8. When you finish click on "Save and Restart" to apply changes.
  9. If everything is OK you should receive the message that "changes have been applied successfully"


2. Download PuTTy (ssh client)  from : http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe


3. Run PuTTy and set the connection parameters and click Open.
  1. Enter FreeNAS IP or FreeNAS host name, on this example we use the default IP 192.168.1.250
  2. FreeNAS SSHd port, on this example we use the default port 22
  3. Select SSH protocol
  4. You can save the session now or later for future use. I chose to save the session under "freenas" name.
  5. If you chose the save the session click "Save"
  6. Now to open a remote connection  click  "Open"
  7. Latter you can get back and set advanced connection option, please read the PuTTy  manual. Not cover by this howto.



4.  First time when you connect to a remote server you will see a similar pop-up box. If you accept to connect to the server click Yes. The server key will be cached for future use.




5. On this example we use the user 'root' (the super user or Administrator).




6. The password is the FreeNAS admin password ( the WebGUI password).




7. If everything is OK you should get the shell prompt.


[FeeeNAS]: Can I mount a FreeNAS server(slave) to a second FreeNAS server(master)?

Can I mount a FreeNAS server(slave) to a second FreeNAS server(master)?



Yes.
On the slave FreeNAS (10.10.10.2) you have to:
a. enable the NFS server.
b. map all user to root: NO
c. authorised network: 10.10.10.1 & netmask /1. 

On your master FreeNAS(10.10.10.1) box from WebGUI -> Diagnostics -> Commands:
a. mkdir /mnt/MyShare/slave
b. mount -t nfs 10.10.10.2:/mnt/YourShare /mnt/MyShare/slave
c. ls /mnt/MyShare/slave

Warning: FreeNAS startup script don't include the support of mounting NFS share at boot time.

[FreeNAS Disable "Opportunistic Locking".]: Disable "Opportunistic Locking".

Disable "Opportunistic Locking".


smbd[xxx]: read_data: read failure for 4 bytes to client XXX.XXX.XXX.XXX Error = Connection reset by peer

Did you see this error message in your log's?


What Operating Systems are Affected?

All server computers running Windows operating systems in the NT family, Windows NT, Windows 2000, Windows XP and Windows 2003 Server.

All workstation computers running Windows operating systems in the 9X family , this includes Windows 98 and Windows ME.

Link : 
Solutions:

1. Server side(FreeNAS )
The safe way will be the server side(FreeNAS), however not confirmed for the moment.
On WebGUI : Services: CIFS /SMB : Settings > “Auxiliary parameters” you can add:
Dave suggested on this thread https://sourceforge.net/forum/message.php?msg_id=4849132  , that setting only  oplocks = no fix the problem for him (clients Win XP and 2003).

level2 oplocks = no 
kernel oplocks = no

Note:
  • Changing the configuration on the server side will affect all clients connected to that specific server(CIFS/SMB only).
  • No restart required.
  • Safer that editing window registry.

2. Client side(Windows only).

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry see: http://support.microsoft.com/kb/256986/

Disabling Read Caching on Windows Workstations (All Windows operating systems in the 9X family) 

The Windows registry entry that controls read caching on Windows network clients is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VxD\VREDIR
DiscardCacheOnOpen REG_BINARY 0 or 1
Default: 0 (not disabled)
To disable read caching, the value of DiscardCacheOnOpen must be set to 1.

You can verify (or change or add, if necessary) this Registry value using the Windows Registry Editor (regedit.exe).
If you do change this Registry value, you will have to reboot the PC to ensure that the new setting goes into effect.

Please read the Microsoft disclaimer regarding editing of the Windows registry here.

STEPS:

1. Start > Run > Regedit.exe
2. Click on the + (plus sign) next to HKey_Local_Machine
3. Click on the + (plus sign) next to System
4. Click on the + (plus sign) next to CurrentControlSet
5. Click on the + (plus sign) next to Services
6. Click on the + (plus sign) next to VxD
7. Click on the VREDIR entry on the left-hand side of Registry Editor

8. If the DiscardCacheOnOpen registry value already exists (on the right-hand side of Registry Editor), ensure that its value is 1

9. If the DiscardCacheOnOpen value already exists but its value is not 1, double-click on DiscardCacheOnOpen to change its value to 1

10. If the DiscardCacheOnOpen entry does not exist, right-click in the white space of the right-hand side of Registry Editor
11. Select New > Binary value
12. Rename the value to DiscardCacheOnOpen
13. Double-click on DiscardCacheOnOpen to change its value to 1

Disabling Opportunistic Locking on Windows Servers ( Windows NT, Windows 2000, Windows XP and Windows 2003 Server).

There are 2 Windows registry entries that control opportunistic locking (oplocks) on Windows network servers:

1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOpLockForceClose
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOplocks

1. EnableOpLockForceClose

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
EnableOpLockForceClose REG_DWORD 0 or 1
Default: 0 (not disabled)

To disable oplocks, the value of EnableOpLockForceClose must be set to 1.

You can verify (or change or add, if necessary) this Registry value using the Windows Registry Editor (regedit.exe).
If you do change this Registry value, you will have to reboot the PC to ensure that the new setting goes into effect.

Please read the Microsoft disclaimer regarding editing of the Windows registry here.

STEPS:

1. Start > Run > Regedit.exe
2. Click on the + (plus sign) next to HKey_Local_Machine
3. Click on the + (plus sign) next to System
4. Click on the + (plus sign) next to CurrentControlSet
5. Click on the + (plus sign) next to Services
6. Click on the + (plus sign) next to LanManServer
7. Click on the Parameters entry on the left-hand side of Registry Editor

8. If the EnableOpLockForceClose registry value already exists (on the right-hand side of Registry Editor), ensure that its value is 1

9. If the EnableOpLockForceClose value already exists but its value is not 1, double-click on EnableOpLockForceClose to change its value to 1

10. If the EnableOpLockForceClose entry does not exist, right-click in the white space of the right-hand side of Registry Editor
11. Select New > DWORD value
12. Rename the value to EnableOpLockForceClose
13. Double-click on EnableOpLockForceClose to change its value to 1

[FreeNAS Slow Network]: Slow Network

Slow Network FreeNAS

502. Slow network.

 
Views: 15800
Votes: 8
Posted on Tuesday, December 19, 2006 by Tim Fehlman
http://www.dailycupoftech.com/category/freenas /

I had deployed a new network with a server and a number of workstations. Everything worked fine and the network connectivity was there but everything was painfully slow. All the network applications took forever to come up and file transfers were ridiculous. After about two weeks, I finally discovered the problem.

When I created the images for the workstations, I built the image with the network card set to a speed of 100 Mbits and full duplex. At the last minute, we switched from a managed switch to an unmanaged switch. Most unmanaged switches have their speed duplexing set to autonegotiation. It was at this point that I made a bad assumption.

And I assumed that since the network cards on each workstations were hard coded to 100/full, the switch would automatically recognize this and set each port to 100/full as well. In reality, I had created a duplex mismatch. Essentially, the network cards were looking for a 100/full link on the other end of their patch cable while the switch was expecting an autonegotiation session. Neither got what they were looking for and trouble ensued!

The long and the short of it is that you have to be sure that what is on one end of a patch cable is the same on the other end of the patch cable. That also goes for autonegotiation. Both devices need to be set to autonegotiation. If only one is set that way, then you will experience all types of network slowdowns! So remember:

10 to 10
100 to 100
1000 to 1000
half to half
full to full
auto to auto
Make sure that all of your speed and duplex match on all of your devices.
Quick Summary

  • Auto-negotiation is not 100% reliable, but it does generally work.
  • Links with a duplex mismatch will operate, but will generate large numbers of errors, and can slow down busy networks.
  • For most interfaces, both speed and duplex need to be set to auto for full auto-negotiation to work.
  • Forcing a Catalyst switch port to a specific speed disables auto-negotiation for the duplex setting.
  • Full-duplex mode can be achieved only if both sides of the link are either set to auto-negotiate or manually configured to use full-duplex.
  • Full-duplex will work only if a host is connected directly to a switch or other device, with no repeaters or hubs in-between.
  • If auto-negotiation is enabled on only one side of the link, it will always default to half-duplex, regardless of what the other side of the link is forced to.
  • If one side of a link is forced to full duplex and the other is set to auto-negotiation, a duplex mismatch will occur.
  • You can force a new auto-negotiation by simply unplugging a host cable for 10 seconds.
  • Most 10 Mb interfaces can run only in 10Mb half-duplex mode.
  • Most 10/100 Mb interfaces can do auto-negotiation. Most 10/100 Mb interfaces with RJ-45 twisted pair jacks can run in full-duplex mode.
  • Any network connected via an AUI port (with an external transceiver, for example) can run only in 10Mb half-duplex mode.

[FreeNAS Boot Failure]: If the boot device, HHD or USB drive, fails, how do you get FreeNAS up?

If the boot device, HHD or USB drive, fails, how do you get FreeNAS up?



► Power Off the system.

►
 Disconnect your boot drive and all data hard-drives from the system.

► Connect only your new boot drive, setup the drive on BIOS and reinstall FreeNAS on the new drive (hard drive, compact flash, USB ).

► Reboot the system and check if the FreeNAS installation is OK.

► Power Off the system, connect you data hard-drives back on the system.

► Start FreeNAS.
► If you have a back-up configuration file, you can restore it but you must remove the old mount point for your first drive/second partition and remove the old first drive.
► If you don’t have a back-up configuration file, just add all your drives, YOU DON’T NEED TO FORMAT ANY DRIVES and create the mount points for each drive.
Software RAID : If previously you use Software RAID, just add your drives on disks management, DON’T FORMAT THE DRIVES, built your Software RAID in the same way as before (DON’T FORMAT THE RAID ARRAY) and create the mount point for the RAID array.
► Setup the groups, users, services and you are back online.


[FreeNAS]: Easy Automated Snapshot-Style Backups with FreeNAS and Rsync

 Easy Automated Snapshot-Style Backups with FreeNAS and Rsync


For extra information about this script and before asking me any questions pleas read Mike Rubel page.
http://www.mikerubel.org/computers/rsync_snapshots/

► You can run this script as cron job or manually from the shell.

► This script was made to run on FreeNAS , I tested myself, and works as expected.





Download rsync_snap_d2d.sh

[FreeNAS Alert]: Setting up FreeNAS to alert for Raid Failure via e-mail.

Setting up FreeNAS to alert for Raid Failure via e-mail.


The scope of this script is to check the disk status on schedule and to send a SMS(like) e-mail to sysadmin only if Only if something is MISSING.

Now everything you need is on one file, using the PHPMailer code implemented on FreeNAS .
The image below shows you the information’s that you have to change in order to make the script working for you.





Once you finish customizing the script with your email configuration, you have to set a “cron job”(scheduled task) to check the disks status at predetermined time.

The image below shows an example for a “cron job” scheduled to run every hour at 10 minutes after hour. 





An example (old) of the script in action. 
As you can see the script collect only important information, the host name (computer name, test250.mod in this example), and the disk status(ONLINE in this example, was running in test mode(old style, now even the test-mode will show MISSING)), date and time.



Download emailalert_2.1.tgz

Or from FreeNAS shell:
#fetch http://www.freenaskb.info/kb_upload/File/scripts/emailalert_2.1.tgz
#tar xzf emailalert_2.1.tgz
#nano emailalert.php