Solaris

Solaris – Add swap to ZFS disk

I installed Solaris 10 05/09 on a machine and I used whatever the default swap space setting when I built the box. Now I need to increase the swap space and I can’t add a swap file, like was possible under UFS.

If your swap device is in use, then you might not be able to delete it. Check to see if the swap area is in use. For example:

$ swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,2 8 4194296 4194296

In the above output, blocks == free, so the swap device is not actually being used.

If the swap area is not is use, remove the swap area. For example:

$ swap -d /dev/zvol/dsk/rpool/swap

Confirm that the swap area is removed.

$ swap -l

No swap devices configured

Resize the swap volume. For example:

$ zfs set volsize=1G rpool/swap

Activate the swap area.

$ swap -a /dev/zvol/dsk/rpool/swap

$ swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,2 8 2097144 2097144

Solaris – Add swap to ZFS disk Read More »

Solaris – Zones, In the Beginning

Uso Solaris da quasi un anno ma non mi sono mai cimentato nell’uso delle famose Zones riassumendo i poche parole giusto per capire di cosa si parla dico: “operating system level virtualization”

bash-3.00# zonecfg -z Z01
Z01: No such zone configured
Use ‘create’ to begin configuring a new zone.
zonecfg:Z01> create -b
zonecfg:Z01> set zonepath=/zones/Z01
zonecfg:Z01> exit
bash-3.00# zoneadm -z Z01 install
Preparing to install zone <Z01>.
Creating list of files to copy from the global zone.
Copying <115072> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <792> packages on the zone.
Initialized <792> packages on zone.
Zone <Z01> is initialized.
The file </zones/Z01/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
bash-3.00#
bash-3.00# zonecfg -z Z01
zonecfg:Z01> add net
zonecfg:Z01> set address=10.0.0.1
zonecfg:Z01> set physical=hme0
zonecfg:Z01> end
zonecfg:Z01> verify
zonecfg:Z01> commit
zonecfg:Z01> exit

bash-3.00# zoneadm -z Z01 boot

bash-3.00# zlogin -C Z01

Solaris – Zones, In the Beginning Read More »

Sorry, I don’t know anything about your “xterm-color” terminal.

Oggi durante una serie di comandi con un senso ben preciso Solaris mi ha parlato in questo modo:

Sorry, I don’t know anything about your “xterm-color” terminal.

La perplessità generale mi ha fatto lanciare questo comando:

bash-3.00#  export TERM=vt100

Ma molto probabilmente sarebbe stato meglio un terminale “ansi”

Sorry, I don’t know anything about your “xterm-color” terminal. Read More »

Export

Memo, questo e’ solo per ricordarmi l’export del profile:

export PATH=$PATH:/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin

Export Read More »

Solaris – Inetd SVC

Breve memo sull’attivazione del servizio tftpd su solaris.

#svcs tftp/udp6
svcs: Pattern ‘tftp/udp6′ doesn’t match any instances
STATE STIME FMRI
#grep tftp /etc/inetd.conf
#tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

Decommentare “#tftp dgram udp6 …” nel file /etc/inetd.conf

# grep tftp /etc/inetd.conf
# TFTPD – tftp server (primarily used for booting)
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

# inetconv
inetconv: Notice: Service manifest for 100235/1 already generated as /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml, skipped
inetconv: Notice: Service manifest for 100083/1 already generated as /var/svc/manifest/network/rpc/100083_1-rpc_tcp.xml, skipped
inetconv: Notice: Service manifest for 100068/2-5 already generated as /var/svc/manifest/network/rpc/100068_2-5-rpc_udp.xml, skipped
tftp -> /var/svc/manifest/network/tftp-udp6.xml Importing tftp-udp6.xml …Done

server # svcs tftp/udp6
STATE STIME FMRI
online 12:56:05 svc:/network/tftp/udp6:default

Solaris – Inetd SVC Read More »

Solaris – Patch It

Un piccolo memo sul sistema di gestione delle patch in Solaris, patch ID 121118 (SPARC version) o 121119 (x86 version)

Questi sono i comandi principali:

Analyze: -/usr/sadm/bin/smpatch analyze
Download: -/usr/sadm/bin/smpatch download
Add Patch: -/usr/sadm/bin/smpatch add

Bisogna registrare il sistema con questo comando:

# /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties
Il file /tmp/registrationprofile.properties deve essere una cosa simile a questo:

userName=newuser
password=newpassword
hostName=
subscriptionKey=
portalEnabled=false
proxyHostName=
proxyPort=
proxyUserName=
proxyPassword=

Solaris – Patch It Read More »

Solaris

Da qualche mese a questa parte ho avuto la pazza idea di usare solaris, credo che non ci sia migliore cosa che provarlo in produzione, quindi ho spolverato una Ultra 10 presa tempo fa e mai seriamente utilizzata, tolto la SunPCI e installato Solaris 10.

Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 440MHz), No Keyboard
OpenBoot 3.25, 512 MB (50 ns) memory installed, Serial #15184795.
Ethernet address 8:0:20:e7:b3:9b, Host ID: 80e7b39b.

Rebooting with command: boot

Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a
File and args: SunOS Release 5.10 Version Generic_127127-11 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.

Hostname: ultra10
/dev/rdsk/c0t0d0s1 is clean

ultra10 console login:

Visto che poi e’ partito tutto, tolto la tastiera e messo in armadio fa una certa scena, in ogni caso, web e mail server non se la cava male per, l’eta’ che ha.

Solaris Read More »