Check Sparc Firmware
root@hostname:/# prtdiag -v|grep OBP
Encrypting a tar file using openssl
In some cases, you may have to send your datacenter’s passwd information to some of your collegues. Instead of sending them in plain text, you can use tar & openssl combination to encrypt that data. Here is how it can be done.Encryption :
Tar & gzip the password file and encrypt using openssl des3 and a secret key. Replace the text “secretkey” with your secret password.
[root@unixfoo-lin23 ~]# tar cvzf - passwd_info.txt | openssl des3 -salt -k secretkey | dd of=encrypted_passwd_info
passwd_info.txt
20+1 records in
20+1 records outThe filetype of the encrypted file is “data” and you cannot use “tar -tvzf” to list contents on this.
[root@unixfoo-lin23 ~]# file encrypted_passwd_info
encrypted_passwd_info: data[root@unixfoo-lin23 ~]# tar tvzf encrypted_passwd_info
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
[root@unixfoo-lin23 ~]#
Decryption :While decrypting the file, use the steps below. Replace the text “secretkey” with your secret password which you provided during encryption.
[root@unixfoo-lin12 ~]# dd if=encrypted_passwd_info |openssl des3 -d -k secretkey |tar xvzf -
20+1 records in
20+1 records out
passwd_info.txt
[root@unixfoo-lin12 ~]# cat passwd_info.txt | head -1
UNIX User UNIX Password
[root@unixfoo-lin12 ~]#This method can also be used to gzip and encrypt any file or directory.
I always forget which one is mirroring
MySQL Cluster: An Introduction (by tcation)
Source: youtube.com
Good habit #1: Defining complex directory trees with one command
~ $ mkdir -p project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat/a}
I spent the whole day prepping a Solaris machine for an Oracle database installation. According to Oracle’s white paper that describes deploying oracle on ZFS, putting oracles file systems into separate pools is the way to go. I arranged my pools like this:
root@swan:/etc# zpool list
NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
swan-collector 516G 76.5K 516G 0% ONLINE -
swan-db-pool 928G 249K 928G 0% ONLINE -
swan-exportpool 278G 117K 278G 0% ONLINE -
swan-redopool1 105G 117K 105G 0% ONLINE -
swan-redopool2 106G 117K 106G 0% ONLINE -
swan_zpool 59.5G 7.45G 52.1G 12% ONLINE -
The Database admins I work with like having 2 redo directories in case one blows up. This being the test environment I took a liberty of doing something different as I continue to explore ZFS.
In the development version of this machine I gave the db-pool on big lun. The machine’s users raved about its performance. But one of the documents over at SolarisInternals helped me to discern that splitting the load over 2 disk might yield better performance. We will see. I am going try to use some of the Dtrace knowledge I have been picking up to figure up some way to test this stuff out.
Setting quotas in zfs? Super easy since you dont want your file systems to get full. You can take an unpleasant performance hit if a file system that gets a lot of activity gets to be over 20% full. Here is the command
zfs set quota=100G pool/filesystem
It will show up in DF as having a max capacity of the quoted amount.
Source: rashardkelly.com
ZFS tidbits of the Day
Im not totally clear on this but it appears that to properly send a zfs filesystem from one pool all the skeleton file systems have to be created on the reciving pool for things to go smoothly. Here is an example of creating a snapshot on one pool and sending it to another
First create the snapshot of your filesystem
# zfs snapshot -r pool/filesystem@snapshotname
List out your ZFS filesystems to make sure you created the snapshot
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
pool/filesystem 2.13G 50.1G 2.13G /snaps
pool/filesystem@snapshotname 23K - 2.13G -
If you would like to experiment with rolling a snapshot back use this command after making some changes to the file system you can go back to your directories former contents
# zfs rollback -r pool/filesystem@snapshotname
After playing with that a bit create your new zfs filesystems within the pool you are sending the data to.
# zfs create newpool/filesystem
Now we can import the snapshot into our new pool and all the data will magically be moved!
# zfs send pool/filesystem@snapshotname | zfs receive -F newpool/filesystem
Set a mount point for the new filesystem and BOOM! you just sent an entire filesystem to a new device without rsync fouling things up. this can also be done over ssh.
host1# zfs send -i tank/dana@snap2 tank/dana@snap3 | ssh host2 zfs recv -F newtank/dana
SSh example obtained from here

: - Get to command mode
This command will replace all the text in a file!
1,%s/old/new/g
1= start from line 1
,= just a delimiter to separate the range values.
% = to end of file you can set this to be a number as well like if you only want to replace the text between lines 10 and 50.
g= global
Wow I LOVE LilyTerm!! Much more responsive than Konsole or Terminal.app on Mac OSX! Im in love again. The tabe are great and you can simply use CTRL + C or V to copy and paste! So simple and compact!
Top