Friday, November 29, 2013

Centos: Update Drupal via Drush

Updating your drupal instance with Drush is a fast and easy way to get the things done:

1. check if pear is installed

# pear version
PEAR Version: 1.9.4
PHP Version: 5.3.3
Zend Engine Version: 2.3.0

2. add the drush channel

# pear channel-discover
Adding Channel "" succeeded
Discovery of channel "" succeeded

3. change to the folder where your drupal site is installed

example given:

# cd /public_html/site_xy

4. update to the new drupal version (example drupal 7.24)

# drush pm-update projects drupal-7.24

you are done

Further documentation on drush specific installation issues:


Thursday, November 7, 2013

How to remove a Raid Interface

If you are unsure about your raid volumes:
# mdadm --detail /dev/md1
or to get your different md's
# cat /proc/mdstat
To remove an existing RAID device, first deactivate it by running the following command as root:
# mdadm --stop raid_device  
Once deactivated, remove the RAID device itself: 
# mdadm --remove raid_device
Finally, zero superblocks on all devices that were associated with the particular array: 
# mdadm --zero-superblock component_device
Example Removing a RAID device
Assume the system has an active RAID device, /dev/md3, with the following layout:
# mdadm --detail /dev/md3 | tail -n 4
    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
In order to remove this device, first stop it by typing the following at a shell prompt:
# mdadm --stop /dev/md3
mdadm: stopped /dev/md3
Once stopped, you can remove the /dev/md3 device by running the following command:
# mdadm --remove /dev/md3
Finally, to remove the superblocks from all associated devices, type: 
# mdadm --zero-superblock /dev/sda1 /dev/sdb1 /dev/sdc1