Cannot delete a large number of files

Ever tried to use the “rm *” command on a directory that has thousands of files? If so, you were probably greeted with the error “too many files”. Here’s how to get around this issue by simply deleting 1 file at a time. cd /directory1 ls -1 > /tmp/output.output while...

Setup Linux ISCSI targets with tgtd

Purpose: Low cost ISCSI storage for VMware ESXi 4.1 cluster Environment: Sun Storagetek 2530 SAS array connected to a X4100 M2 Sun server. RHEL 6.1 installed on X4100 M2 Sun server. 1 multipathed LUN presented to RHEL 6.1 server from 2530 storage array. LUN presented...

Import DHCP from primary Windows server to secondary Windows server

Process: Export the DHCP configuration from server1, remove the configuration on server2 and import configuration from server1, on server2. Note!!! This process will remove your configuration on server2, make sure you know what you’re doing. On server1: Export the...

Transferring wordpress to a new server

Create Database dump of current database. (This can be done with Webmin) tar cvf wordpress /var/www/html Install Fedora yum install httpd mysql php php-mysql download and install webmin create empty database use “mysql -u -p < ./.sql” to import old database dump file....

mythtv setup on Scientific Linux 6.1 Notes

installed desktop installed epel repos, default repos enabled installed atrpms repos, enabled atrpms and atrpms-testing Install all deps yum install mythtv* change SELINUX from =enforcing to =disabled install mysql mysql-server chkconfig mysqld and mythbackend ON...

Linux tgtd, device “SCSI ID” enumeration

The SCSI ID number is assigned…get this…alphabetically! Why, oh why!?! Think this is silly? (I do), but it gets worse.. It is enumerated alphabetically by the full path name! GASP! E.g. cat /etc/tgt/targets.conf /dev/mapper/mpathb = “IET 00010001″ #this is lun1...

Show the architecture of installed rpm packages

rpm -qa –queryformat “%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH}\n” | grep Check out the link below for additional info. http://www.cyberciti.biz/faq/linux-display-rpm-package-architecture/

cannot mount cifs share from Fedora or Ubuntu

Trying to mount a cifs share from the command line fails when attempting the following: mount -t cifs /// will result in a “wrong fs type, bad option, bad superblock on ///…etc” and “CIFS VFS: cifs_mount failed w/return code = -22″ is found in the dmesg output. mount...

Redhat Linux multipathing Mpathd

I recently had to setup multiple hosts using Emulex fiber HBAs connecting to a Fiber channel array through 2 SAN switches with redundant paths. Here are some notes that helped me get the job done. Linux multipathing (Mpathd)...