Posts

Useful VIOS commands

As root, you can run any pdamin's commands: root@vios# /usr/ios/cli/ioscli lsmap -all or root@vios# alias vios =/us r/io s/cl i/io scli root@vios# vios lsmap -all To connect the console by ssh [root@ms01 ~]# ssh hscroot@dubhmc1 Password:  Last login: Thu Sep  4 04:57:59 2014 from ms01.dub.usoh.ibm.com hscroot@dubhmc1:~> vtmenu Mirror the VIOS bootable disk: $ extendvg -f rootvg hdisk2 $ mirrorios -f hdisk2

zfs pool faulted due to disk ID changed

After applying the patch, the disk device ID has been changed, so the status of zfs pool snapshot is faulted. [root@r710 by-id]# zpool list NAME       SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT snapshot      -      -      -      -      -  FAULTED  - storage   27.2T  10.1T  17.1T    37%  1.00x  ONLINE  - Changing the /dev/ names on an existing pool can be done by simply exporting the pool and re-importing it with the -d option to specify which new names should be used. For example, to use the custom names in /dev/disk/by-vdev: #zpool export snapshot #zpool import -d /dev/disk/by-vdev snapshot

CentOS/RedHat UUID ZFS

Usually, the /dev/disk/by-uuid does not show all disk's UUID. For example: [root@r710 ~]# ls -l /dev/disk/by-uuid total 0 lrwxrwxrwx 1 root root 10 Aug  3 15:45 0d97a78f-8a2c-4040-9ee4-6ed3764cd809 -> .        ./../sda3 lrwxrwxrwx 1 root root 10 Aug  3 15:45 54242d33-f140-4ffa-96a5-7cfac64bdb09 -> .        ./../sda1 lrwxrwxrwx 1 root root 10 Aug  3 15:45 bbdcaa28-a4de-47a4-804c-79e83fa31980 -> .        ./../sda2 blkid will show all of them including ZFS's dataset [root@r710 ~]# blkid /dev/sda2: UUID="bbdcaa28-a4de-47a4-804c-79e83fa31980" TYPE="ext4" /dev/sda1: UUID="54242d33-f140-4ffa-96a5-7cfac64bdb09" TYPE="ext4" /dev/sda3: UUID="0d97a78f-8a2c-4040-9ee4-6ed3764cd809" TYPE="swap" /dev/sda4: LABEL="snapshot" UUID="7237582886734482444" UUID_SUB="5054151785144376043" TYPE="zfs_member" /dev/sdb: LABEL="storage" UUID="6125443995338521040" UUID_SUB=...

VIOS SEA Network bridge without HMC

Two ways to make the VIOS's network to work: SEA (shared ethernet Adapter) HSE (hosted Ethernet Adapter) In this SEA example, we need to create a bridge to make it work.  We need to create a share adapter to pass the network traffic from internal to external. $  lsdev -type adapter name             status      description ent0             Available   10 Gb Ethernet PCI Express Dual Port Adapter (7710008077108001) ent1             Available   10 Gb Ethernet PCI Express Dual Port Adapter (7710008077108001) ent2             Available   2-Port Integrated Gigabit Ethernet PCI-Express Adapter (e4143a161410ed03) ent3          ...

zfs share multiple hosts

bash-3.2# zfs set sharenfs=on /backup bash-3.2# zfs set sharenfs=rw=host1,root=host2 zpool/backup bash-3.2# share -               /backup   sec=sys,rw=host1:host2,root=host1:host2   "" root@minnie # showmount -e host1 export list for NFS_server: /backup host1,host2

cPanel The MySQL® server is currently offline could not access the MySQL

Please follow the following steps: 1> Try to reset the password to see if the MySQL's password is syncing with the new password. ( http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/ChangeDbPass  & http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/MySQLRoot ) 2> Access the MySQL DB by using the cmd to see if you can access the MySQL DB                MySQL -u root -p 3> In the cPanle, it stores the MySQL's password under /root/.my.cnf. Check the MySQL's password is the same as the current MySQL's password 4> Check the cPanle's log:  /usr/local/cpanel/logs/

SPAM email PHP Plesk

Image
The Originail post is from http://www.uk-cheapest.co.uk/blog/2012/01/how-to-find-an-anonymous-spammer-on-a-plesk-server/   1) Let’s take a look in the mail queue and read one of those spam email references: # /var/qmail/bin/qmail-qread remote ankush_krishna2137@yahoo.com 6 Jan 2012 09:14:53 GMT # 34012584 2987 <anonymous@server.microlite8.com> 2) Now we have a message ID, let’s search for the actual message: # find /var/qmail/queue/ -name 34012584 /var/qmail/queue/info/0/34012584 /var/qmail/queue/remote/0/34012584 /var/qmail/queue/mess/0/ 34012584 3) Great! Now let’s see what’s in the message to get out that all telling UID: # cat /var/qmail/queue/mess/0/ 34012584 Received: (qmail 9936 invoked by uid 10820 ); 6 Jan 2012 09:14:50 +0000 Date: 6 Jan 2012 09:14:50 +0000 Message-ID: <20120106091450.9934.qmail@server.microliteX.com> To: annette@recdom.wandoo.co.uk Subject: Urgent Reply From: Mrs.Farida Waziri <faridawaziri@hotmail.com> 4) Let’s map the U...