Skip to main content

Posts

Showing posts with the label Redhat

Resizing a logical volume RHEL6

To reduce the size of a logical volume, use the lvreduce command. If the logical volume contains a file system, be sure to umount it and reduce the file system first. Umount the file system # umount   /file_system_name Check if all data structures of you logical volume are cleaned. # fsck -f /dev/vgname/lvname   Resize the file system # resize -p /dev/vgname/lvname 500M Reduce the logical volume  # lvreduce -L 500M /dev/vgname/lvname  Checking   df -h /file_system_name

Growing Logical Volume in RHEL 6

To increase the size of a Logical Volume, use the   lvextend command. After extending the Logical volume, you will need to increase the size of associated file system , # lvextend -L 1500M /dev/vgname/lvname After it is necessary to increase the file system size to match. # resize2fs -p /dev/vgname/lvname -p option show the progress of the operation.

How to add SCSI disk on RHEL 6 in VMWARE

To add SCSI disks to your RHEL6 system without rebooting your machine, you have to rescan the newly disks using the following commands. If you are running your OS  in a Production environment, extra disks can be added or removed without a need of rebooting the Linux machine. How to add a new disk : Once you have present your new disk or Lun to the RHEL OS run : # echo "- - -" >/sys/class/scsi_host/host#/scan The "- - -" is used for the bus channel, Target Id and Lun. Check the /var/log/messages  to find the new device name or by checking the /proc/partitions file. # tail -f /var/log/messages # cat /proc/partitions If your new disk name  is /dev/sdb ,   get more information about it by running # fdisk -l /dev/sdb