LVM Reduce & Extend

Reduce LVM
Reduce the size of /storage Directory from 10GB to 8GB which is mounted via LVM(Backup the Data before reduce/extend).
#umount /storage
#e2fsck -f /dev/vgsvk/lvsvk
#resize2fs /dev/vgsvk/lvsvk 8G
#lvreduce -L 8G /dev/vgsvk/lvsvk
#mount -a --- If u have a fstab entry

Extend LVM
Reduce the size of /storage Directory from 8GB to 10GB which is mounted via LVM.
#umount /storage
#e2fsck -f /dev/vgsvk/lvsvk
#lvextend -L 10G /dev/vgsvk/lvsvk#resize2fs /dev/vgsvk/lvsvk
#mount -a --- If u have a fstab entry

ISO Images -- Creation&Manipulation

Create Backup Of a Directory in ISO Format
#mkisofs -J -r -T -o /home/svk.iso /home/svk
The above command take the backup of /home/svk directory and save the file in /home with a file name svk.iso

Mount ISO Images
# mount -o loop /home/svk.iso /media/
The above command mount the svk.iso file to /media directory.

Create ISO image of CD/DVD
# dd if=/dev/hdc of=/tmp/svk.iso
The above command create an ISO image of the CD in /tmp directory as filename svk.iso
(If the CD is a bootble one then the image will also bootable)

USB pen drive as a boot medium to start the installation

USB pen drive as a boot medium to start the installation
Attach the USB pen drive to a system which is already running Red Hat Enterprise Linux.
Use fdisk to partition the flash drive as follows:
There is a single partition.
This partition is numbered as 1.
Its partition type is set to 'b' (W95 FAT32).
It is tagged as bootable.
Format the partition created in the previous step as FAT:
mkdosfs /dev/sdb1
Mount the partition:
mount /dev/sdb1 /mnt
Copy the contents of /RedHat/isolinux/ from the first installation CD/DVD onto the flash drive, i.e. to /mnt.Note: the files isolinux.bin, boot.cat and TRANS.TBL are not needed and can thus be removed or deleted.
Rename the configuration file:
cd /mnt/; mv isolinux.cfg syslinux.cfg
Copy the installer's initial RAM disk /RedHat/images/pxeboot/initrd.img from the first installation CD/DVD onto the flash drive, i.e. to /mnt.
Optional step: To configure any boot settings, edit the syslinux.cfg on the USB flash drive. For example to configure the installation to use a kickstart file shared over NFS, specify the following:
linux ks=nfs:://ks.cfg
Unmount the flash drive:
umount /dev/sdb1
Make the USB flash drive bootable. The flash drive must be unmounted for this to work properly.
syslinux /dev/sdb1
Mount the flash drive again:
mount /dev/sdb1 /mnt
Install GRUB on the USB flash drive:
grub-install --root-directory=/mnt /dev/sdb
Verify that the USB flash drive has a /boot/grub directory. If it does not, create the directory manually.
cd /mntmkdir -p boot/grub
Create the grub.conf file. Below is a sample grub.conf:
default=0

timeout=5

root (hd1,0)

title Red Hat Enterprise Linux installer

kernel /vmlinuz

initrd /initrd.img
Copy or confirm the created grub.conf file is on the /boot/grub/ directory of the USB flash drive.
Unmount the flash drive:
umount /dev/sdb1
At this point, the USB disk should be bootable.
Attach the USB disk to the system you wish to install Red Hat Enterprise Linux on.
Boot from the USB disk. Refer to the hardware vendor's BIOS documentation for details on changing the order in which devices are checked for booting from.
Once you are booted in the Red Hat Enterprise Linux installer, continue with your network installation of choice.