Server Administration & Management

How to Create Software RAID-1 Mirroring

# yum install mdadm

# fdisk /dev/sdb     (Create Software RAID Type)

# fdisk /dev/sdc     (Create Software RAID Type)

# mdadm –zero-superblock /dev/sdb /dev/sdc     (If device contains a valid md superblock, the block is overwritten with zeroes)

# mdadm –create /dev/md0 –level=1 –raid–devices=2 /dev/sdb1 /dev/sdc1     (Create RAID-1 using /dev/sdb1 & /dev/sdc1)

# mkfs.ext3 /dev/md0     (format /dev/md0 as ext3 file system)

# mkdir /raid1

# mount /dev/md0 /raid1

# df -hT

# vim /etc/fstab     (For automatically mount after reboot)

/dev/md0    /raid1    ext3    noatime,rw    0    0

# cat /proc/mdstat OR

# watch -n 2 cat /proc/mdstat (For RAID Status)


December 30, 2013 Posted by | RAID, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to mount USB Pendrive only by name not /dev/sdb1

# fdisk -l (show USB Pendrive device, Suppose its /dev/sdb1)

# cd /etc/udev/rules.d/

# vim 99-usb.rules

KERNEL = “sdb1”, NAME=UnixServerAdmin

# reboot (Restart the machine to apply it)

# mount /dev/sdb1 /mnt
Not mount device is not exit

#mount /dev/UnixsServerAdmin /mnt

Its mount, Have Fun !!!

December 20, 2013 Posted by | Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to Compile Linux Kernel

Configure Yum Repository in local machine, So we can install following packages :-

# yum install kernel-header* redhat-rpm-config-* unidef* rpm-build*

# yum install ncurse* (for menuconfig)

# yum install gcc* (for gconfig)

# yum install qt* glibc* gtk* (for xconfig)

# useradd brewbuilder

# groupadd brewbuilder

# tar -xvf  kernel-2.x.tar.gz

# cd kernel-2.x

# make menuconfig OR make gconfig OR make xconfig

# make (Build the actual kernel & modules)

# make modules_install (Installthe modules under /lib/modules/<kernel-version>)

# make install (Install the Kernel in/boot & adds a GRUB entry in the file)

Check grub entry in /etc/grub.conf file and Rrboot the machine with new compile kernel.

December 10, 2013 Posted by | Tips & Tricks, Unix/Linux | , , , | Leave a comment