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