Thursday, June 13, 2019

kubectl auto completion of commands

If you want kubectl to behave like a base shell - tab completion of the command (press the tab twice), add following lines on user's .profile/.bash_profile

$ echo  "source <(kubectl completion bash)" >> ~/.bashrc

Sunday, June 9, 2019

RHEL7 - Creating Partitions Larger Than 2TB in Linux

Creating Partitions Larger Than 2TB in Linux

If you have requirement to create a partition under linux system, you have to be careful.

There are are two ype of partition available on x64 based systems.

MBR - Master Boot record
GPT - GUID Partition Table
MBR does not support 2TB partition.

Convert DOS/MBR disk to GPT disk

# parted /dev/mapper/ORAu01

(parted) rm 1
Is this a GPT partition table? Yes/No? yes

(parted) mklabel GPT
(parted) print

Number Start End Size File system Name Flags

(parted) mkpart primary 0.00TB 6.05TB
(parted) print

(parted) quit

# fdisk -l /dev/mapper/ORAASM
# pvcreate /dev/mapper/ORAASMp1
# vgcreate VG1 /dev/mapper/ORAASMp1
# lvcreate -n ORAlv1 -l 100%FREE VG21
# mkfs.ext4 /dev/VG1/ORAlv1

Add entry to fstab
# vi /etc/fstab
/dev/VG1/ORAlv1 /data ext4 defaults 1 2

Create mount point and mount it.
# mkdir /data; mount -a; df -h /data


Note the error alert by mkpart on parted command output.