Tuesday, February 18, 2020

Disk Expansion steps: VMS, Unity without LVM


Disk Expansion steps:  VMS, Unity without LVM
===============================================
Slight changes to procedure for RHEL.

1. Display and verify LUN size.

# powermt display dev=all
# df -h /path/to/mount/point
# fdisk -lu /dev/emcpowerX1

2. Unmount volume.

# umount /path/to/mount/point
3. Check FS.

# fsck -n /dev/emcpowerX1

4. SDP to expand disk.

5. Verify new LUN size. If not detected, reboot.

# fdisk -lu /dev/emcpowerX

6. Remove journaling.

# tune2fs -O ^has_journal /dev/emcpowerX1

7. Resize partition. Delete then recreate partition with new size.

# fdisk /dev/emcpowerX

8. Check FS.

# e2fsck -f /dev/emcpowerX1

9. Resize FS.

# resize2fs /dev/emcpowerX1

10. Check FS.

# fsck -n /dev/emcpowerX1

10. Turn on journal.

# tune2fs -j /dev/emcpowerX1

11. Remount volume. Verify new size.

# mount /path/to/mount/point
# df -h /path/to/mount/point


=======================================


1. if baremetal run: /usr/bin/rescan-scsi-bus.sh to scan;
   if OVM scan disk in UI;
   if VM run commands below (if not automatically detected by server)
                for BUS in /sys/class/scsi_host/host*/scan
                do
                echo "- - -" >  ${BUS}
                done
2. fdisk /dev/

3. pvcreate /dev/

4. vgextend /dev/

5. lvextend -l +100%FREE

6. resize2fs

7. lvdisplay

Enable non-expiring password for Linux Users



When you need to set users for non-expiring password accounts.  Here are the basic steps.

passwd ; pam_tally2 -u -r (reset:  this resets the login failures); faillock --user --reset 

chage -d 0

Non-expiring.

 chage -I -1 -m 0 -M 99999 -E -1 adb-dev


chage -I -1 -m 0 -M 99999 -E -1 adb-d

Tuesday, August 25, 2015

Convert Unix Time

If you happen to be working on a system where you want to convert unix time to human readable format, use this:

perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'

Its a perl command that when applied to a .log file allows you to convert unix time to a format that is readable to the user.  You can pretty much use this with other small shell tools to do wonderful things.

Sunday, August 16, 2015

Nouveau causing the Linux Mint System to Freeze

Ever had an experience that suddenly your Linux system freezes for no apparent reason?  This is manifested, when you tried to fire-up chrome (at least in my case) and doing some check on dmesg / syslog points to this:













The problem here lies with the video drivers loaded to the kernel is having a (NOT going to discuss the internals here) hard time figuring out how to work with the hardware of your system.  It can be very painful especially if you are not sure where to look at.
 
The SOLUTION:

sudo apt-get --purge remove xserver-xorg-video-nouveau

and then do:

sudo ldconfig

Afterwards reboot the system.

Wednesday, February 18, 2015

Enabling SSH Login Email Alerts

If you happen to be figuring out who is loging in or what is being logged in the system you can always use this defined entry to .bashrc to help monitor it.

echo  'ALERT - Root Shell Access (ServerName) on: `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" some_domain@domain.com

But please note that you will have to have either postfix / sendmail (mail server) and mail client "mailx" installed to get this working.

Monday, January 26, 2015

SSH Problem: /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

When you encounter an error relating to this one: 

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

Please install the following packages to help fix the issue  "ssh-import-id"

Reload the SSH server then try again.  For more modern linux systems running on Cinnamon in my case using LinuxMint I have to use the following syntax to get it right.

ssh-copy-id -p 35354 -i .ssh/id_rsa.pub user@some_ipV4_address

Cheers!

Friday, January 9, 2015

Trobleshooting Roundcube Webmail Error: Message size exceeds fixed limit

At times you will encounter an error with your roundcube system with bouncing emails caused by limitations in the mail system.  If you get this error:  Message size exceeds fixed limit

Chances are your message_size_limit is not set to be as flexible with your current configuration for roundcube to fix this do the following:

1. Edit the file which roundcube reads to assign the global variables /var/www/html/roundcube/.htaccess file and change the following configurations to this one.

php_value       upload_max_filesize     32M
php_value       post_max_size           32M

2.  Check your postfix mailer configuration by issuing the command:
  
postconf -d |grep message_size_limit

If you did not get a value you need to fix this.

3.  To fix the limit issue the command.

postconf -e 'message_size_limit = 104857600'

4.   To fix the 'mailbox_size_limit' issue you need to add this using the command:

postconf -e 'mailbox_size_limit = 0'

5.  Reload postfix for the changes to apply.

Wednesday, March 5, 2014

Troubleshooting Google Apps Migration for Microsoft Exchange – OAuth Authentication Failure



When trying to use the Google Apps Migration for Microsoft Exchange tool, I came across the following error:
Invalid Consumer Secret specified. Google Apps server has denied access to these credentials.
I checked and double-checked to make sure I had the correct OAuth Domain Key and Consumer Secret entered, and when it still failed, I re-generated the Consumer Secret.  Still no love.  After some searching, I came across this thread on Google’s Product Forums:
In a nutshell, when configuring your OAuth Domain Key, you have the option to “Allow Access to All API’s”.  For, me this box was checked.  Turns out when they say “All API’s”, they didn’t include some new ones that the latest version of the GAMME tool requires.  The tool looks for those API’s, can’t access them with the credentials you’ve supplied it, and falls on its face.  The fix involves you removing that checkmark next to “Allow Access to All API’s” and then heading to the “Manage Third-Party OAuth Client Access” page.  Type in your domain name into the “Client Name” field, and then paste the following into the “One or More API Scopes” field:
https://apps-apis.google.com/a/feeds/emailsettings/2.0/,
https://apps-apis.google.com/a/feeds/user/#readonly,
https://www.google.com/calendar/feeds/,
https://www.google.com/m8/feeds/,
https://www.googleapis.com/auth/apps.groups.migration,
https://apps-apis.google.com/a/feeds/migration/,
https://apps-apis.google.com/a/feeds/group/#readonly
Click the “Authorize” button, and that’s that.  Now the GAMME tool completes it’s diagnostic checks and will happily begin migrating the contents of your Exchange mailbox into Google Apps.