Menu Close

Raid5 intel contro singoli dischi

 

 Con l’arrivo di nuovi hard disk e con il continuo spostamento di cartelle da un disco all’altro del server per gestire lo spazio disponibile ho deciso finalmente di crearmi un RAID5 sfruttando il controller intel P55 integrato nella scheda madre del server (una Asus P7P55D-E).
Informandomi prima in rete, sembrava che le prestazioni dei controller integrati non fossero cosi buone, con esperienze di gente che parlava di 20, massimo 30mb/s in scrittura. Decisamente poco!!
Ho deciso comunque di rischiare, e cosi domenica sera ho creato tramite l’utility del bios della Intel un RAID5 formato da 4 dischi Western Digital Green da 2TB l’uno.
Con una configurazione RAID5, lo spazio a disposizione è di Ndischi-1, quindi con 4x2tb dovrebbe essere 6TB.
C’è però da tenere conto che una volta formattato il volume, lo spazio a disposizione sarà di 5.5TB circa (fate i vostri conti sulla convenienza).

Impedire ad un computer di accedere alla LAN


Mi è capitato recentemente di avere necessità che un pc all’interno di una LAN possa utilizzare regolarmente internet ma non possa visualizzare ne cartelle condivise ne siti internet offerti dagli altri dispositivi nella stessa LAN (pagine di configurazioni di router, siti web interni ecc).

Prima di tutto mi sono occupato di limitare l’accesso alle cartelle condivise.

Per evitare che il pc possa accedere agli altri computer in rete ho disattivato l’opzione “Client per reti Microsoft”.

Questa opzione disabilita la possibilità al computer  di vedere gli altri pc della LAN, ma permette comunque agli altri computer di vedere le cartelle condivise da questa macchina.

[Continua…]

 

PHP Session Locks – How to Prevent Blocking Requests

by konrness.com

php[1]Many people are aware that modern browsers limit the number of concurrent connections to a specific domain to between 4 or 6. This means that if your web page loads dozens of asset files (js, images, css) from the same domain they will be queued up to not exceed this limit. This same problem can happen, but even worse, when your page needs to make several requests to PHP scripts that use sessions.

Problem

PHP writes its session data to a file by default. When a request is made to a PHP script that starts the session (session_start()), this session file is locked. What this means is that if your web page makes numerous requests to PHP scripts, for instance, for loading content via Ajax, each request could be locking the session and preventing the other requests from completing.

The other requests will hang on session_start() until the session file is unlocked. This is especially bad if one of your Ajax requests is relatively long-running.

log cron jobs

If you need to check what is the output from every cron job (instead of see only when start and stop it in var/log/syslog)

you can append to your cron command this text:

 2>&1 >> /var/log/myjob.log

and here you can see a working example:

rsync -avz /home/www/ /mnt/ububackup/SITE_BACKUP 2>&1 >> /var/log/backupUbu.log

This cron sync my www folder to another server and log the output to backupUbu.log .

 

Certificati SSL su vhost multipli

Con il passaggio di dominio ad uno personalizzato mi si è reso necessario la creazione di un certificato SSL per permettere l’utilizzo di comunicazioni HTTPS sul mio dominio.

Ho però necessità di certificare piu vhost (sottodomini) con ognuno funzionalità diverse.

Esistono dei certificati SSL chiamati WildCard che permettono per l’appunto di certificare piu sottodomini con un’unico certificato SSL, questi però vanno da circa $80/anno fino anche a $400-$500/anno! Non mi sembra il caso per un sito “amatoriale”.

Ho provato quindi a certificare ogni vhost con un SSL diverso, pagando per ognuno circa 2€ l’anno, ecco com’è andata!

 

Gestione IpFire e Firewall Linux

 

IPFire Fails to make ADSL Connection

 

Have you checked the Link status of you network cable?

If you don’t get a lease it is normal that red0 was disabled.

Check with “ifconfig -a”

go to console and Press ALT+F12 to see the systemlog (or use tail -f /var/log/messages over ssh)

 

Check the Syslog (/var/log/messages) or in the WebIF (kernel and red)

 

cat /var/ipfire/ethernet/settings

 

“eth0: link is not ready” but device is present

Looks like the cable is not connected or it is damaged. (No Link)

You can double check with ethtool.

 

Quote:
sudo ethtool eth0

 

How to Change the Hostname of a Linux System

by ducea.com

Normally we will set the hostname of a system during the installation process. Many peoples don’t care about this, and don’t change the hostname even if for example this was set to something really stupid by the datacenter that installed the system (most likely they will set this to “debian” on any debian installation, etc). For me, it is important to see on each one of the ssh screens I will have open at any time a different hostname that is relevant and will give me quickly the information on what system I am logged in.

Change Ubuntu Server from DHCP to a Static IP Address

by howtogeek.com

If the Ubuntu Server installer has set your server to use DHCP, you will want to change it to a static IP address so that people can actually use it.

Changing this setting without a GUI will require some text editing, but that’s classic linux, right?

Let’s open up the /etc/network/interfaces file. I’m going to use vi, but you can choose a different editor

sudo vi /etc/network/interfaces

SOLUTION: 1215n Windows 8 Upgrade Causes Hotkeys to Stop Working (Missing Asus ACPI Driver)

I recently purchased an Asus 1215n equipped with Windows 7 64bit. The first thing I did was upgrade to Windows 8 since Microsoft is offering a promotional price of $15 until January 2013. Doing so led to some Hotkey driver compatibility issues though (missing Asus ACPI driver error + no working hotkeys), which were a pain to resolve to say the least. I was unable to find a solution on the web anywhere (one that worked anyways), so I had to figure things out myself. I’m posting my solution here in the hopes that it will be useful to others doing an upgrade to windows 8. I imagine that the solution would also apply to other 1215x models (1215b for example) that came with Windows 7 64bit. Im not sure if this solution is applicable to 32bit Windows 7 versions, though you should definitely still give it a try.

Problem Description:

After installing windows 8 and logging in for the first time an error message window popped up:

“Missing Asus ACPI Driver.”

 

When to use $_SESSION vs $_COOKIE

by buildinternet.com

A critical feature in web programming is the ability to seamlessly pass data from one page load to the next. It’s used most commonly when dealing with user logins, but also for passing error messages, shopping carts, etc.

Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. The purpose of this article is to give a brief look into the differences between cookies and sessions, when it’s better to use one versus the other, and the pros and cons of the two.

The difference is in how each store data. Cookies store data locally in the user’s browser, while sessions store data on the webserver.