Wednesday, January 25, 2012

ext3 or ext4 partition recover deleted files Centos /Fedora

Extundelete is a utility that can recover deleted files from an ext3 or ext4 partition. The ext3 file system is the most common file system when using Linux, and ext4 is its successor. extundelete uses the information stored in the partition's journal to attempt to recover a file that has been deleted from the partition. There is no guarantee that any particular file will be able to be undeleted, so always try to have a good backup system in place, or at least put one in place after recovering your files!

Download and Install Extundelete:
Download the latest version of Extundelete - http://extundelete.sourceforge.net/

To compile and install Extundelete, you should first install the binary and development packages for e2fsprogs and e2fslibs.  You must also have a C++ compiler and a make utility to compile extundelete.
Go to terminal and type following command to install Extundelete:


#yum install -y gcc-c++ autoconf automake

#tar -xjf extundelete-0.2.0.tar.bz2
 
#cd extundelete-0.2.0
 
#./configure
 
#make

The extundelete program may be run as-is from the build directory, or you may wish to install it to a directory that is shared with other executable programs, which you may do by running the following command: make install

Using 
extundelete:
Assume you have deleted a file called /home/rajat/snap. Also assume the output of the 'mount' command shows this line (among others):

/dev/sda3 on /home type ext3 (rw)

This line shows that the /home directory is on the partition named /dev/sda3, so then run: 
umount /dev/sda3 and check that it is now unmounted by running the mount command again and seeing it is not listed.Now, with this information, run extundelete:
 

# extundelete /dev/sda3 --restore-file /home/rajat/snap/

If you have deleted the directory 'important', you can run: 
 

# extundelete /dev/sda3 --restore-directory /home/rajat/video

Or if you have deleted everything, you can run: 
 

# extundelete /dev/sda3 --restore-all

Thursday, January 19, 2012

Installation TAR lates version on Cent OS /RedHat 4 /5


tar zxvf tar-1.26.tar.gz
cd tar-1.26
./configure FORCE_UNSAFE_CONFIGURE=1
make
make install
cp -f src/tar /usr/local/bin/tar

once log off and login 

Tuesday, January 17, 2012

Ports for RHEV-M



Red Hat Enterprise Virtualization Manager  required following ports.


Port(s)PurposeRemote End
22ssh
  • Used for maintenance of the virtualization hosts.
80http
  • Administration Portal clients
  • User Portal clients
  • Virtualization hosts
  • REST API clients
443https
  • Administration Portal clients
  • User Portal clients
  • Virtualization hosts
  • REST API clients
25285netconsole
  • Virtualization hosts
54321xml-rpc
  • Virtualization hosts
8006-8009xbap
  • Administration Portal clients   

Open the Command Prompt (Run --> cmd ) on your windows machine and run these below script that will open all the required ports .

c:\> for /D %p in 
(25285,54321,22,8006,8007,8008,8009,80,443) 
do (netsh firewall add portopening protocol 
= TCP port = %p name = RHEVM%p) 
 
c:\> netsh firewall set icmpsetting 8 enable

Friday, January 6, 2012

EMC PowerPath basic commands RedHat /CentOS

PowerPath is a multipathing software for Unix operating systems from EMC. If you have ever worked or you are going to work in an environment that includes EMC storage systems it is more than sure that Powerpath will be installed in the Unix hosts.
Following are some notes and tips I’ve been creating since the very first time I found Powerpath, of course this isn’t a full user guide but a sort of personal quick reference. I decide to put it here in the hope that it will be helpful to anyone and for my personal use.

Show powermt command version
Display PowerPath configuration.

 Check for death paths and remove them. List all devices.