Archive

Posts Tagged ‘solaris’

Installing Squid on ZFS

March 24, 2010 1 comment

The recommended filesystem for Squid on OpenSolaris is ZFS: http://wiki.squid-cache.org/BestOsForSquid

It is also recommended to disable the atime property on the filesystem holding the cache, and you may want to avoid using any type of RAID.

To achieve this on Nexenta (or OpenSolaris, whatever), first create the ZFS filesystem:

# zfs create -o atime=off -o mountpoint=/var/spool/squid3 syspool/squidcache

Then install Squid (here for version 3.x, as you might have noticed from the command). On Nexenta Core Platform 3 (NCP3):

# apt-get install squid3

To further improve the setup, use the aufs storage. To do this, just enable and update option cache_dir in /etc/squid3/squid.conf to read aufs instead of ufs (and further modify that line to best suit your real cache usage).

À propos de NAS

May 31, 2009 Leave a comment

Un NAS est un Network-Attached Storage. C’est-à-dire un serveur de fichiers, mais qui ne fait vraiment que cela (enfin, au départ, puisqu’on verra ensuite que ça peut se compliquer beaucoup).

Au départ, c’est seulement une solution abordable pour remplacer en Ethernet les SAN (Storage Area Network), qui font la même chose mais sur de la fibre optique, bien plus chère à l’usage (pour diverses raisons[1]). Il existe même du matériel qui fait les deux (SAN + NAS, par exemple en Ethernet pour les longues distances ou le grand nombre de clients et en Fiber Channel pour les plus courtes).

Dans les deux cas, le but est de rassembler la problématique du stockage en un seul endroit, et ainsi pouvoir l’allouer de manière plus souple, plus fiable,
plus économique, et plus gérable (exemple: simplification des backups). La virtualisation par exemple en bénéfie très rapidement et très naturellement.

Un certain nombre de protocoles ou de technologies, viennent rapprocher les deux systèmes.
Je pense ici à des protocoles comme iSCSI, AoE[2], qui font passer à travers le réseau un protocole standard utilisé d’habitude pour les disques locaux. Et
l’OS s’en accomode d’habitude bien, souvent à travers une implémentation ad-hoc dans le kernel.

Enfin, tout un tas de protocoles exotiques existent, souvent orientés vers un OS ou un type de matériel Multimédia, mais pas toujours, permettent d’augmenter
l’utilisabilité du tout. Je pense en particulier à uPNP, DLNA, TFTP, FTP, SMB, NFS, rsync, …

Souvent, la sécurité n’est pas gérée au niveau du NAS, mais au sein du reste de l’infrastructure.

Puisque ses fonctionnalités sont supposées être plutôt restreintes, on attendra d’un NAS une fiabilité et des performances exceptionnelles. On y trouvera donc
souvent des systèmes de redondance (RAID, alimentations électriques, load-balancing réseau, …) ainsi que des systèmes pour améliorer (aggrégation de liens réseau, fine-tuning des disques et des NIC, …) et/ou diagnostiquer les performances de tous les éléments (disques, contrôleurs, OS, réseau, client, …).

Et il en existe maintenant pour tous les budgets. Depuis les systèmes prévus pour être installés sur des PC de récupération jusqu’aux NAS d’entreprise avec
support, redondance complète (haute disponibilité) et sélection de tout le matériel le plus cher en passant par des systèmes hyper économes en énergie pour
le salon de Monsieur Tout Le Monde (qu’on appelle alors souvent Media Server).

Linux, de par sa légerté proverbiale et ses fonctionnalités est assez intéressant pour ce genre d’usage, tout comme FreeBSD.
Solaris (et OpenSolaris), toutefois apporte des avantages non négligeables sous la forme de ZFS (avec snapshots, compression et déduplication) et DTrace (notamment).

Et ce n’est pas fini…

Read more…

HOWTO Install and maintain free software easily under Solaris: pkg-get

July 14, 2008 Leave a comment
This article was first written in August 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/161).

pkg-get is somewhat a rewrite of the apt-get of to Sun’s Solaris.

It is a script that uses wget and the pkg suite [1] of tools from Solaris to install, upgrade, and uninstall free software easily on Solaris.

The list of packages available is already impressive: http://www.blastwave.org/packages.php.

To update the list of available packages on your system:

# pkg-get -U

To download and upgrade the packages already installed:

# pkg-get -u

[1] pkgadd, pkgrm, …

HOWTO Manually set NIC speed on Sun Solaris

July 10, 2008 Leave a comment
This article was first written in July 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/143).

Here is how to set manually speed and duplex parameters on network interfaces in Sun Solaris.
Adding the following code (comment lines start with ‘*’) to you /etc/system file and rebooting will put your hme type interfaces to 10 Mbits/s Half-Duplex:

*
* set hme driver modes
*
*set hme:hme_adv_100T4_cap = 0
*set hme:hme_adv_100fdx_cap = 1
*set hme:hme_adv_100hdx_cap = 0
*set hme:hme_adv_10fdx_cap = 0
set hme:hme_adv_10hdx_cap = 1
set hme:hme_adv_autoneg_cap = 0

The same for eri type interfaces:

*
* set eri driver modes
*
*set eri:adv_100T4_cap = 0
*set eri:adv_100fdx_cap = 1
*set eri:adv_100hdx_cap = 0
*set eri:adv_10fdx_cap = 0
set eri:adv_10hdx_cap = 1
set eri:adv_autoneg_cap = 0

See also Manually setting nic speed / duplex problem Solaris 9 for a complete reference.

Categories: English, Tech Crunch Tags: , ,

Running PostgreSQL on Solaris 8

July 2, 2008 Leave a comment
This article was first written in February 2004 for
the BeezNest technical website (http://glasnost.beeznest.org/articles/107)

The default values for Shared Memory in Sun’s Solaris (starting from 2.6, at least) are set too low to run.

Here is how to change it (see also PostgreSQL’s Admin Guide, Managing Kernel Ressources):

The relevant settings can be changed in /etc/system, for example:

set shmsys:shminfo_shmmax=0x2000000 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=256 set shmsys:shminfo_shmseg=256 set semsys:seminfo_semmap=256 set semsys:seminfo_semmni=512 set semsys:seminfo_semmns=512 set semsys:seminfo_semmsl=32

You need to reboot to make the changes effective.

See also http://www.sunworld.com/swol-09-1997/swol-09-insidesolaris.html for information on shared memory under Solaris.


								
Categories: English, Tech Crunch Tags: , ,

HOWTO Patch Solaris using Sun PatchPro 2.2

July 2, 2008 Leave a comment
This article was first written in February 2004 for
the BeezNest technical website (http://glasnost.beeznest.org/articles/105)

Here is HOWTO patch Sun’s Solaris using Sun PatchPro 2.2. It has been tested on Solaris 8/SPARC.

  • login as root (you may want to use sudo instead)
  • change directory to where you put PatchPro (unless you already put smpatch in your path):
cd /export/home/jwarnier
  • execute the following:
./pproSunOSsparc5.8jre2.2/SUNWpmgr/reloc/usr/sadm/bin/smpatch update

Complications are possible if some of the patches are to be installed interactively (it will tell you, though will not tell you how to fix it). In this case, you have to follow this procedure for the patches needing it:

  • login as root (again, you may want to use sudo instead)
  • change directory to mine (again, I will probably change it soon,though):
cd /export/home/jwarnier
  • execute the following (with xxxxxx-xx being the patch number):
./pproSunOSsparc5.8jre2.2/SUNWpmgr/reloc/usr/sadm/bin/smpatch download -i xxxxxx-xx
  • change directory to /var/sadm/spool:
cd /var/sadm/spool
  • there should be a file called xxxxxx-xx.jar
  • unzip the xxxxxx-xx.jar file:
unzip xxxxxx-xx.jar
  • there should now be a xxxxxx-xx directory
  • issue the following command:
patchadd /var/sadm/spool/xxxxxx-xx
  • delete the 2 directories created (xxxxxx-xx and META-INF):
rm -r xxxxxx-xx META-INF
Categories: English, Tech Crunch Tags: , ,

HOWTO Determine which application is listening on a network port under Solaris

July 11, 2007 Leave a comment
This article is incomplete and was first written in July 2007
for the BeezNest technical website (http://glasnost.beeznest.org/articles/362).

Netstat on Solaris (at least until 10 04/06) is not able to list which application is listening to which network ports but you sometimes need this.

A simple script just doing the job Though, this script is pretty rough, and very slow. It uses informations about PIDs found in /proc.

A better alternative would be to use lsof from Sunfreeware.com:

lsof -i|grep port

or this might work as well

lsof -i :port
Categories: English, Tech Crunch Tags: ,

Sun Solaris

February 21, 2006 Leave a comment
This article was first written in February 2006 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/326).

Sun Solaris is probably today’s most-used UNIX OS around, probably due to its security and high-performance approach. It has been traditionally running mostly on SPARC, a little on Intel platforms, but is now happily running on AMD64 also.

Lately, Sun decided to opensource it, and everybody should probably be happy of this move. The Open Source version’s name is OpenSolaris, and various distributions [1] (or variants) already exist.

[1] like Nexenta, Schilix or Belenix

Categories: English, Tech Crunch Tags: , ,

Sun Useful Links

June 23, 2005 Leave a comment
This article was first written in June 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/279).

The following links proved to be really useful when dealing with Sun hardware and software:

Sun BigAdmin

SunFreeware

OpenSolaris

and of course: Sun

Categories: English, Misc Tags: , ,

HOWTO Netboot a Sun machine using RARP

June 7, 2005 Leave a comment
This article was first written in June 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/271).

This article will explain how to netboot a Sun machine using RARP with a Debian/GNU Linux server.

Install package rarpd:

$ sudo apt-get install rarpd

Configure your TFTP server:

Adapt the options in /etc/init.d/rarpd to match the directory where you TFTP server delivers its files from.

Create a /etc/ethers file:

xx.xx.xx.xx machine

Take care of «machine» name being resolvable from /etc/hosts or whatever other name-resolution system on your server.

Put the boot image in the TFTP-served directory, and rename it to the IP-address of the machine in hexa. Utility sipcalc can do the conversion for you.

$ sudo apt-get install sipcalc

Reboot the machine and stop-a (if on the console) or break (if on a serial console) to get the «ok» prompt. There, type «boot net», enter, and it will happily load your image from the TFTP server.

Categories: English, Tech Crunch Tags: , ,