Como reparar sectores defeituosos HDD

Não é remover o setor defeituoso e sim, marca-lo para que não sejam mais gravados dados naquele local.

O programa a utilizar  será o HDAT2 4.53 presente no Hiren’s Boot CD

O HDAT2 é um programa com várias ferramentas, mas hoje trabalharemos somente com a que repara os setores defeituosos, que é o tema central desse nosso tutorial.

O que é necessário

1- Versão do Hiren’s Boot CD no site oficial clicando neste link  ou baixe a versão usada nesse tutorial clicando aqui

2- Gravar a imagem ISO em um CD ou PEN Drive.
 

Aceder a aplicação

1- Boot pelo CD.

2- Seleccionar a opção DOS Programs e pressione Enter
 

3- Aceder Hard Disk Tools… > HDAT2 4.53 (Test/Repair Bad Sectors) .

4- O programa começará a ser carregado. Serão apresentadas algumas mensagens na tela. Vá pressionar Enter até ser apresentada a tela abaixo.
 

5- O próximo passo será selecionar o HDD que será analisado, seleccionar na lista que aparecer e tecle Enter.

6- Selecionar a primeira opção Drive Level Tests Menu que é a opção para checar e reparar os setores defeituosos no HD e pressione Enter.

7- Deixar selecionada a opção Check and Repair bad sectors e pressionar Enter.

8- Daqui em diante o programa fará um scan no HD conforme imagem abaixo. Sempre que for encontrado algum problema o computador emitirá um alerta sonoro e aparecerá um B em vermelho indicando que aquele setor está com defeito. O próprio HDAT2 4.53 fará a correção e a marcação do setor defeituoso. Se for encontrado algum problema no seu HDD sugiro a troca imediata desse componente.
 

 

Credits

How to Backup Virtual Guest on Hyperv Cluster 2012 with Windows Server Backup

Windows Server Backup in Windows Server 2012 has feature been changed or added, which include limited support for CSV backup :

  1. Virtual machines hosted on CSV’s cannot be added as part of backup configuration
  2. Windows Server Backup has to be configured on all nodes to ensure that backup and recovery will be available in the event of a failure on one of the nodes in the cluster.
  3. Volumes recovery not supported
  4. Security access control lists are not applicable on CSV file service root. Therefore, file recovery to the root of CSV volume is not supported.

Backup virtual guests on Hyper-V Cluster  2012 can be done with command line tool wbadmin. On all hyperv host in your cluster you have to install Windows Backup tool. This can be done with Windows Powershell or GUI.  If you use Powershell console,  you must run it as Administrator.

From Powershell console run

Import-module servermanager

Add-WndowsFeatures Windowws-Server-Backup

To backup virtual guest server1 on file share \\localhost\vmbackup

wbadmin start backup -include:D:\ClusterStorage1\volume4\server1 -backuptarget:\\localhost\vmbackup\server1

D:\ClusterStorage1\volume4\server1  is location where you have vm guest files

If you want to recover your Hyper-V virtual guest server1 from backup to altenate location you simpy use file recovery.

You must find backup version at first

wbadmin get versions -backuptarget:\\localhost\vmbackup\server1

Restor your virtual guest sever1

wbadmin start recovery -version:05/22/2013-07:35 -backuptarget:\\localhost\vmbackup\server1 -itemtype:file -items:D:\ClusterStorage1\volume4\server1  -recursive -recoverytarget:x\recover -machine:hyperv1

 

Credits

Hyper-V Backup doesn’t interrupt running virtual machines (anymore)

Hyper-V has always provided the ability to backup all your virtual machines from the host operating system.  In order to provide a consistent backup of the virtual machine – Hyper-V has traditionally employed two approaches:

  1. If the guest operating system has the Hyper-V backup integration service installed and running: use VSS (for Windows) or file system freeze (for Linux) to create a data consistent backup of the running virtual machine.
  2. If the guest operating system does not have the Hyper-V backup integration service installed or running: put the virtual machine into a saved state, and perform a backup of the saved virtual machine.

This second approach has always been problematic – as it takes a running virtual machine offline for the backup process.  The good news is that this second approach has been drastically improved in Windows Server 2012 R2.  Now, rather putting the virtual machine into a saved state – we take a checkpoint of the virtual machine.  This checkpoint is backed up, and deleted after the operation is complete.

The net result of this is that no matter what the guest operating system, and no matter what the state of the integration services inside the guest operating system, Hyper-V will never interrupt a running virtual machine as part of backing it up (anymore).

 

Credits

Opensuse additional package repositories

This is a list of currently existing third-party repositories, meaning they're external to openSUSE. These packages are not supported by openSUSE, the packages may not be tested and the repositories can contain beta versions and other bleeding edge packages.

  • For official repositories (OSS, non-OSS, Update, Update-Non-OSS) and semi official repositories (including KDE, GNOME and Java repositories) see Package repositories.
  • For information on how to add package repositories see Add package repositories.
  • For new Linux and openSUSE users it is recommended to use the 4 default repositories (OSS, Non-OSS, Update, Update-Non-OSS) and Packman. Later on when you familiarize yourself with package management you can add more.
  • Please, make sure that you actually need a specific repository instead of blindly adding it. More repositories means more complexity in software management and needs some experience to avoid problems and, in extreme cases, system failure.

https://en.opensuse.org/Additional_package_repositories#VLC_VideoLan_client

Use wget to Recursively Download all Files of a Type, like jpg, mp3, pdf or others

If you need to download from a site all files of an specific type, you can use wget to do it.

Let's say you want to download all images files with jpg extension.

wget --level=1 -r -A .jpg http://site.with.images/url/

Now if you need to download all mp3 music files, just change the above command to this:

wget --level=1 -r -A .mp3 http://site.with.music/url/

The same can be applied to any other type of file. Movies, music, images, and others.

Be respectful with owner's rights and with the bandwidth of the site and –level=NUMBER  maximum recursion depth (inf or 0 for infinite).

 

Credits

Changing the Product Key in Server 2012 using PowerShell

I have come across a useful set of cmd’s for when you need to change the Product Key in server 2012. When I went to active my new file server,  I ran into an issue when trying to activate with the Product  KMS key.

Server 2012’s system properties do not allow you to change the Product key.

To change this you need to open power shell in privileged mode and enter the following cmd’s.

slmgr -upk (this removes the current Product Key)

slmgr -ipk XXXX-XXXX-XXXX-XXXX (this installs the new Product Key)

Please see Microsoft’s Article ID: 2750773:

http://support.microsoft.com/kb/2750773

Credits

 

Budget Fair Queueing (BFQ) Storage-I/O Scheduler Opensuse

In GNU/Linux, currently there are three main disk I/O schedulers available. They are called ‘CFQ’, ‘NOOP’ and ‘Deadline’

And came upon another disk I/O scheduler for GNU/Linux called ‘BFQ’ (it’s actually based on the code of ‘CFQ’).

The KMP is found in OBS home:tiwai:bfq/bfq repo. It's currently built for openSUSE-FACTORY, openSUSE-13.1, SLE12, Leap and Kernel:HEAD kernels.

http://download.opensuse.org/repositories/home:/tiwai:/bfq/openSUSE-Leap/

#wget -c http://download.opensuse.org/repositories/home:/tiwai:/bfq/openSUSE-Leap/home:tiwai:bfq.repo to /etc/zypp/repos.d

Install the KMP
After installing the KMP, load bfq-iosched kernel module, and change the scheduler like:
# echo bfq > /sys/block/sda/queue/scheduler

If you want to make BFQ as default from the beginning, do like below:

– Put "bfq-iosched" in $INITRD_MODULES in /etc/sysconfig/kernel
– Run /sbin/mkinitrd once to rebuild initrd
– Add a boot parameter "elevator=bfq"

Then the BFQ module will be loaded automatically and used as default
I/O scheduler at the next reboot.

Credits:
http://lists.opensuse.org/opensuse-factory/2014-06/msg00007.html
https://lkml.org/lkml/2014/5/29/411

Improve Laptop Battery Life and Usage in Linux Using TLP

TLP is an advanced power management tool for Linux that gives the settings and tweaks to enhance your existing power management automatically without the need to know every technical details. It is purely a command-line tool and doesn’t have a GUI. It should work on almost all laptops.

 

TLP does not replace the existing power management of your Linux installation, but it enhances the existing it. TLP applies its settings upon system startup and on every change of the power source. TLP packages are available almost for all distributions such as Arch Linux, Debian, RH Fedora, Gentoo, OpenSUSE and Ubuntu.

Features –

Settings depending on the power source:

  • Kernel laptop mode and dirty buffer timeouts
  • Processor frequency scaling including “turbo boost”/”turbo core”
  • Power aware process scheduler for multi-core/hyper-threading
  • Hard disk advanced power management level and spin down timeout (per disk)
  • SATA aggressive link power management (ALPM)
  • PCI Express active state power management (PCIe ASPM) – Linux 2.6.35 and above
  • Runtime power management for PCI(e) bus devices – Linux 2.6.35 and above
  • Radeon KMS power management – Linux 2.6.35 and above, not fglrx
  • Wi-fi power saving mode – depending on kernel/driver
  • Power off optical drive in drive bay (on battery)

Additional functions:

  • I/O scheduler (per disk)
  • USB auto-suspend with blacklist
  • Audio power saving mode – hda_intel, ac97
  • Enable or disable integrated wi-fi, bluetooth or wwan devices upon system startup and shutdown
  • Restore radio device state on system startup (from previous shutdown).
  • Radio device wizard: switch radios upon network connect/disconnect and dock/undock
  • Disable Wake On LAN
  • WWAN state is restored after suspend/hibernate
  • Untervolting of Intel processors – requires kernel with PHC-Patch
  • Battery charge thresholds – ThinkPads only
  • Recalibrate battery – ThinkPads only

 

var td_screen_width=document.body.clientWidth;
if(td_screen_width >=1140){
document.write(‘‘);
(adsbygoogle=window.adsbygoogle||[]).push({});
}
if(td_screen_width >=1019&&td_screen_width < 1140){
document.write('‘);
(adsbygoogle=window.adsbygoogle||[]).push({});
}
if(td_screen_width >=768&&td_screen_width < 1019){
document.write('‘);
(adsbygoogle=window.adsbygoogle||[]).push({});
}
if(td_screen_width < 768){
document.write('‘);
(adsbygoogle=window.adsbygoogle||[]).push({});
}

Install TLP on Ubuntu/Linux Mint

Before installing TLP, make sure that you have removed the user specific power save settings and scripts (for example in /etc/rc.local), otherwise expect unpredictable results and also remove laptop-mode-tools:

sk@sk:~$ sudo apt-get remove laptop-mode-tools

Add the following TLP PPA:

sk@sk:~$ sudo add-apt-repository ppa:linrunner/tlp

Update the software sources list:

sk@sk:~$ sudo apt-get update

Now install TLP:

sk@sk:~$ sudo apt-get install tlp tlp-rdw smartmontools ethtool

If you are using IBM Thinkpad, run the following command:

sk@sk:~$ sudo apt-get install tlp tlp-rdw smartmontools ethtool tp-smapi-dkms acpi-call-tools

Start TLP

Start TLP Service for the first time only. You don’t need to start it on every reboot, it will start automatically:

sk@sk:~$ sudo tlp start

Test TLP Status

Enter the following command to see the detailed output of TLP:

sk@sk:~$ sudo tlp stat

You will see a output something like below:

--- TLP 0.3.9 --------------------------------------------
+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=0
USB_AUTOSUSPEND=1
RESTORE_DEVICE_STATE_ON_STARTUP=0
+++ System Info
System         = Hewlett-Packard F.02 HP 550
BIOS           = 68MVU Ver. F.02
Release        = Ubuntu 13.04
Kernel         = 3.8.0-26-generic x86_64
/proc/cmdline  = BOOT_IMAGE=/vmlinuz-3.8.0-26-generic root=/dev/mapper/lubuntu--vg-root ro quiet splash vt.handoff=7
+++ System Status
TLP power save = enabled
power source   = ac
[...]

For other distribution installation instructions, refer the official website.

Credits