www.linuxonlinehelp.de Nonprofit Linux PC & Server Support by Thomas Sternasky Germany » Centos

Nachrichten getagged: Centos

Linux FreeBSD: Protect your Disc Data against power loss

Kommentare Kommentare deaktiviert
Von , Mittwoch, Juni 6, 2012

Problem: If you use IDE or SATA Disc Drives inside your Workstation or Server without a additional uninterruppted power supply after a power loss your Disc Drives can lose data, do not boot clean up agian or damage the drive headers and sectors.

Background: SATA or IDE Drives uses “Disc Cached Controllers”, the count of this disc cache reach from 8 to 64 megabytes. In case of data write to disc, the disc controllers do cache some data who are often used. A Raid 1 Disc Mirror is affected too by this problem. SCSI od SAS are not using Cache by default.

Solution:

Install the software tool called hdparm to set the cache parameters to disabled, cause most of operating systems have enabled by default.

  1. at Debian/ubuntu do : # sudo aptitude install hdparm
  2. at Centos/Redhat do:  #sudo yum install hdparm

now lets show discs which are installed:

  1. at Debian/ubuntu do: # sudo fdisk -l
  2. at Centos/Redhat do: #sudo  /sbin/sfdisk -l
  3. at FreeBSD do: # fdisk -l

yet lets take settings to disable the cache on every boot:

  1. at all linux do: sudo nano /etc/rc.local
  2. insert for every drive hdarm -W 0 /dev/sdX (X is for a to …)
  3. at FreeBSD  do : #vi /etc/loader.conf
  4. insert once for all drives  hw.ata.wc="0"

Remarks:

  1. If you have two drives with same physical size inside your PC config a mdadm Software Raid 1 additional on your System.
  2. Set the PC Bios Settings to auto boot ofter power failure and plug off the power on you testing System, check the results. There should not be needed a check disk called fsck after the Test, but its better to do it.
  3. Hardware Raid Controllers do often have RAM Cache too, size 128MB up to 2GB, at power loss these Data lost, this can only be surpressed by a addtition RAM Cache Backup Battery connected to the Hardware Raid Controller

 

List and Remove of installed Packages at Centos or Redhat or Fedora Linux or SME Server

Von , Donnerstag, September 23, 2010

To list packages enter as admin:

#rpm -qa

to print it into a Textfile do:

#rpm -qa > mypakets.txt

now you can remove uneeded packages:

#yum remove packagename-2.6.8

How to compile the Centos SME Server 7.4 Linux Kernel 2.6.34

Von , Dienstag, Mai 25, 2010

Download the latest stable kernel from the http://www.kernel.org/ unpack the downloaded source file.
Steps:

  1. # wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2
  2. # tar xjf tar xjf linux-2.6.34.tar.bz2
  3. # ln -s linux-2.6.34 linux
  4. # cd linux
  5. # cp /boot/config-`uname -r` ./.config
  6. # make menuconfig (here you can select .config as preselected .config from old kernel)
  7. # make rpm (Compile the Kernel and make a rpm-paket)
  1. During the compilation of linux-2.6.34 kernel the following error appears
  2. drivers/message/fusion/mptsas.c: In function `mptsas_port_delete'
  3. drivers/message/fusion/mptsas.c: 105: sorry, unimplemented: inlining failed in call to 'mptsas_set_rphy': function body not available
  4. drivers/message/fusion/mptsas.c: 467: sorry, unimplemented: called from here
  5. Because: The ‘mptsas_set_rphy’ function is defined after the ‘mptsas_port_delete’ function in the file

Solution :
Moved the ‘mptsas_set_rphy’ function definition before to the function ‘mptsas_port_delete’ function definition.

  1. drivers/built-in.o(.init.text+0x3bad): In function `con_init': include/trace/events/kmem.h:47: undefined reference to `.L1452'

Solution:
This bug was due to the result of allocating the memory using kzalloc() in con_init() function in the drivers/char/vt.c file.
The problem is:
vc_cons[currcons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);
Solution:
vc_cons[currcons].d = vc = alloc_bootmem(sizeof(struct vc_data));


Webcam Bad Hersfeld Erlebnisreisen Steinberger Busreisen Webcam Eiterfeld Franz Raab Schauspieler Bad Hersfeld Genealogy Family Sternasky Research