Skip to main content

Posts

Showing posts with the label Red Hat Enterprise Linux

Red Hat Enterprise Linux 6 – How to: migrate data to a new Physical Volume and remove the old PV

Add new devices to the system. Use rescan-scsi-bus.sh to scan for new devices or restart the system to get the new devices Create LVM Physical Volumes with the new devices # pvcreate /dev/sdxx Add the devices to the respective VGs # vgextend vgname /dev/sdxx Migrate the data from the existing PV to the new PV # pvmove /dev/sdxx o Where /dev/sdxx is the existing PV that needs to be removed from the VG List the PVs to make sure the PV that needs to be removed has no data on it   # pvs –o+pv_used PV VG Fmt Attr PSize PFree Used /dev/sda2 rootvg lvm2 a- 39.51g 8.63g 30.88g /dev/sda log2vg   lvm2 a- 30.00g 8.00g 0 /dev/sde log2vg   lvm2 a- 30.00g 8.00g 22.00g /dev/sdf datavg   lvm2 a- 100.00g 5.00g 95.00g /dev/sdg log1vg   lvm2 a- 30.00g 8.00g 22.00g In the above example, the data was moved from /dev/sda to /dev/sde (they reside in the same VG) Remove the PV from the VG   # vgreduce vgname /dev/sdxx Remove LVM PV inf...

Red Hat SELinux–How to Enable/Disable

Here is the quick how-to for enabling and disabling SELinux on a Red Hat Enterprise Linux server temporarily and permanently.  There are 3 modes available with the SELinux- Enforcing – SELinux policy is enforced and access is denied based on the SELinux policy rules. Permissive – SELinux policy is not enforced .  Access is is not denied, but what would have been denied if it were enforced will be logged. Disabled – SELinux is disabled completely.  only DAC rules are used.  To permanently disable SELinux on the system, update ‘ SELINUX=disabled ’ in /etc/selinux/config file and reboot the system for the change to take effect To change between the modes temporarily during run time, use the /usr/sbin/setenforce command with the appropriate mode /usr/sbin/setenforce 1 will set the mode to Enforced /usr/sbin/setenforce 0 will set the mode to Permissive /usr/sbin/getenforce to display the current mode Refer RHEL 6 SELinux guide for more detailed informa...

Red Hat Linux Crash Dump Analysis

Some useful links for analyzing Crash Dumps: Quick overview of Kernel Crash Dump Analysis http://magazine.redhat.com/2007/08/15/a-quick-overview-of-linux-kernel-crash-dump-analysis/ Crash Facility – White paper http://people.redhat.com/anderson/crash_whitepaper/ More about Oops messages: http://lxr.linux.no/linux/Documentation/oops-tracing.txt