Conversion of Winchester to Sector Bits in Linux. File system repair in Ubuntu

Zharoznizhuvalny for children is recognized as a pediatrician. Allegedly, there are situations of inconvenient help for feverish women, if the children are in need of giving innocently. Todi dad take on the versatility and constipation of fever-lowering drugs. How can you give children a breast? How can you beat the temperature of older children? What are the best ones?

After transferring Linus Torvalds, you can fire up your child, how can Linux be found in built-in systems, and not only in cheap home routers, or even in such serious telecom solutions like ATS AVAYA?

Not long ago it was brought to the attention of the patronage of the automatic telephone exchange AVAYA of one great Deputy. Central Avaya G650 gateway (shasі) from the Avaya S8400 server (processor). De yak system disk vikorystovuєatsya CompactFlash carrier with a volume of 2 GB. Yaky respectfully respect SSD disk with the IDE interface.
As soon as I got the power to work, if I connected the CF drive through the card reader, I changed the structure of the Linux file system to the familiar. Shcho, slyly, lied down the procedure of re-negotiation of the original CF of the accumulator.

How to convert the Linux file system disk to the appearance of pardons

In the operations MicroSoft systems DOS (about so, I'm remembering version 5.0, as it was on the same floppy disk!) There was a command to change the disks CHKDSK. It is also more suitable for Linux.
To convert the Linux disk for the presence of file system pardons, you need to change the file system names to convert:

# df -h Filesystem Size Accept Avail Use% Locked to / dev / sda 20G 4.0G 15G 21% / / dev / sdd1 1G 455M 555M 46% / media / Np% blsl3648B4Jjeiedgyy / M1 10.13-23dd none 246M 0 246M 0% / dev / shm

For the accumulator CF, who can be tested, - the price / dev / sdd1і / dev / sdd6
You need to unmount filesystems to test:

#sudo umount / dev / sdd1 #sudo umount / dev / sdd6

#fsck -y / dev / sdd1 #fsck -y / dev / sdd6

Parameter -y Automatically, for all meals, you will be prompted to yes, so that you can call up a large number of criminals and rob.

Lunux FSCK file system rewrite results

I have a fall on one of the razdіlіv boules of pomylki, as utilіta corrected. Because of what CF was turned on its place, the Avaya PBX was renewed.

As soon as the operating system is secured, it will appear about the presence of pardons for the file systems on one of the distributions, then it is safe to reconfigure the disks and correct the file system pardons.

Whether it’s a koristuvach, who’s taking care of himself, is not guilty of forgetting, but periodically there is a conversion of hard disks on a bit of a sector and a conversion of disks into grants є with the butt of a healthy deaf.

Important! Launching that vikonannya FSCK on the mounted file system, you can give a tribute to theVictory material for your fear and risk. The author does not make any clues about whether or not you can remember.

In order to preserve yourself, you need to:

  • Switch to the mode of one koristuvach (Single user mode) and install file system
  • Lock the computer from the update mode for the additional CD

Also, it is necessary to revise the disks and correct the file system files, for some reason.

1) Single user mode

Change the level of innovation unmount the filesystem:

# init 1
# umount / home

Get the message on the connected distributions:

# fsck / dev / sda1

2) CD update mode.

Insert the CD into the drive and reinstall the system:

Check out a ten hour and when you download it from the installer CD, check the command:

# linux rescue nomount

The NOMOUNT directive is to harden the installation, so you can endlessly vicariously use the FSCK.

To start the FSCK for the distribution of pardons:

# fsck -yvf / dev / sda1

LVM (Logical Volume Manager)

Situation z LVM (Logical Volume Manager) razdilami trocha foldn_she. To run FSCK for LVM you need to know PV (Physical Vollume), VG (Volume Group), LV (Logical Extension) that aktivuvati їkh, for the whole visitor, follow these commands:

# lvm pvscan
# lvm vgscan
# lvm lvchange -ay VolGroup00
# lvm lvscan

# fsck -yfv / dev / VolGroup00 / LogVol00

For the fact that FSCK turns the result into a code, danish code- a unique number, which is to set the sum of the offensive values:

0 - No errors;
1 - Filesystem errors correctod;
2 - System should be rebooted;
4 - Filesystem errors left uncorrected;
8 - Operational error;
16 - Usage or syntax error;
32 - Fsck canceled by the user request (Fsck canceled by user request);
128 - Shared-library error.

Be it a computer - a folding attachment, which can be stored with bagatoh components and not insured for any kind of problems. We can quickly identify one of the serious problems with the addition of information, whether it is hard drive For a flash drive, how to display a disk flip on a bit of a linux sector.

Whether it’s a accumulation of small blocks (sectors), which can save information from either zero or one unit (bit). If, for reasons of operation, the system cannot record bits of information in the singing sector, then it can be “beaten”.

The sector can be beat for different reasons:

  • Factory marriage
  • Vimknennya computer livelihood for an hour to write information.
  • Physical wear of the accumulator.

There is a small number of broken sectors to be practically located on whatever accumulates. Ale varto brutalize respect, as a result of an hour to grow. Tse can talk about the physical death of the accumulator and you will think about his replacement for an hour.

Let's see, for the help of some utilities in Linux, we can convert a disk to a bit of a linux sector.

Reconstruction of the accumulator on the bit sector by means of badblocks.

Badblocks is a standard Linux utility for converting to bit sectors. Vaughn to get up for the changes is practical for any distribution kit and for other help you can convert both a hard disk, so a call to a hard drive.

Let’s wonder a selection of how we accumulate connections to our systems and how they are distributed. For the rest, we need another standard Linux fdisk utility.

Naturally, scho viconuvati commanders are required with the rights of a super koristuvach:

The parameter -l We say utility fdisk, so we need to show a list of razdіlіv and viyti.

Now, if we know, as we have divided it, we can transform it into a bit sector. For the rest of us, we will be victorious to dispose of badblocks by the offensive rank:

$ sudo badblocks -v / dev / sda1> badsectors.txt

For the conversion of the following parameters:

  • -v- Report on information about the results of the revision.
  • / dev / sda1- Rozdil, I want to change it on the bit sector.
  • > badsectors.txt- Vivodimo the result of the command and the file badsectors.txt.

As long as the results have been known to have some sectors, we need to send instructions to the operating systems not to record any information in the future. For whom we should know utilities Linux for robots with file systems:

  • e2fsck. We will also manage the distribution of Linux file systems (ext2, ext3, ext4).
  • fsck. As soon as you manage the file system, you can view it as ext.

The following commands are entered:

$ sudo e2fsck -l badsectors.txt / dev / sda1

For we do not have an ext file system:

$ sudo fsck -l badsectors.txt / dev / sda1

The parameter -l We say, we will use the list of broken sectors from the file badsectors.txt, which we have removed before the hour of revision for additional disposal of badblocks.

Reconstruction of the bit sector in Linux at smartmontools

Now let's see more happy that superb way convert the disk to the linux rosbit sector. Modern storage devices ATA / SATA, SCSI / SAS, SSD may have a self-control system S.M.A.R.T (Self-Monitoring, Analysis and Reporting Technology, Technology of self-control, analysis and vulnerability), how to monitor the parameters of the accumulator, and also help to increase the parameters of the robot at the early stages. For robots with S.M.A.R.T in Linux є smartmontools utility.

Let's get a handful of it. If your distribution is based on Debian \ Ubuntu, enter:

$ sudo apt install smartmontools

If you have a distribution kit based on RHEL CentOS, then enter:

$ sudo yum install smartmontools

If you do not want to get stuck in your operating systems, then there is a lack of matching from hard drives. With the help of a backup copying of the RAID recovery technology, you can quickly turn all the data on the site, or even a hardware attachment can be much more budgetary, especially if you haven’t planned anything like that.

To avoid such problems, you can use smartmontools. A priceless software package for monitoring and monitoring attachments to obtain money for additional technology Self-Monitoring Analysis and Reporting Technology or simply SMART.

A large number of modern ATA / SATA, SCSI / SAS data storage devices provide a SMART interface. Meta SMART - monitoring of reliability hard disk, the discovery of new pardons and a quick response from the well-being. Smartmontools are stocked with two utilities - smartctl and smartd. Imagine the stench at once I will push the system monitoring and monitoring of any breakdowns HDD for Linux. Next, you will see the details of the linux hard disk conversion.

The smartmontools package is in the official repositories of more Linux distributions, so it is installed before the release of one command. For Debian and new-based systems, visit:

aptitude install smartmontools

And for Red Hat:

yum install smartmontools

Now you can proceed to diagnose your linux hard drive.

Smartctl hard drive rewiring

Check out a list of hard drives connected to your system:

ls-l / dev | grep -E "sd | hd"

The visnovka will have more:

Here - sdx - I will attach the HDD connected to the computer.

To display information about a specific hard drive (add-on model, S / N, firmware version, ATA, SMART interface availability) Launch smartctl with the info option and hard disk drive. For example, for / dev / sda:

smartctl --info / dev / sda

If you want, you can, and don’t get too much respect for the ATA version, but only one of them important factors I’ll change the attachment for an hour. Kozhna New version ATA is crazy about the front. For example, old ATA-1 and ATA-2 attachments are miraculous to work on ATA-6 and ATA-7 interfaces, but not on navpacks. If the ATA version is attached and the interface does not get out of hand, the power of the possession will not be increased. In this vipadku to replace more beautifully vibrate the hard drive ATA-7.

Run inversion of the hard ubuntu disk you can use the command:

smartctl -s on -a / dev / sda

Here is an option -s includes the foreman SMART on the add-on. You can clean it up if the SMART driver is already on. Information about the disc is broken into a chain of breaks. READ SMART DATA there is information about I'm healthy disk.

START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment rest result: PASSED

The test can be completed ( PASSED) chi nі ( FAILED). Once you are inevitable, fix it backup copy Danih from the disk.

It’s coming, you can wonder if you need HDD diagnostics in linux, there’s a table of SMART attributes.

The SMART tables have recorded parameters, values ​​for a particular disk by the developer, as well as the display settings for these parameters. The table will be stored automatically and will be based on the disk firmware.

  • ID #- ID attribute, as a rule, tens of numbers mіzh 1 and 255;
  • ATTRIBUTE_NAME- name of the attribute;
  • FLAG- Prapor obrobka attribute;
  • VALUE- the whole field є is normal for the given attribute in the range from 1 to 253, 253 - short stance, 1 - girche. Falsely from powers of cob, the value can be from 100 to 200;
  • WORST- the highest value for the whole hour;
  • THRESH- the lowest value of the value, if the transition for the yake is required, the drive is not suitable for use;
  • TYPE- the type of the attribute, either Pre-fail or Old_age. All standard attributes are critical, so that if the disk doesn’t go through the conversion one by one, then it’s not FAILED, but the old_age attributes are not critical;
  • UPDATED- I will show the frequency of the attribute update;
  • WHEN_FAILED- will be set to FAILING_NOW if the value of the attribute is less than or more expensive THRESH, or "-" if you are. The FAILING_NOW type of attribute is more pre-fail than the default.
  • RAW_VALUE- Significance, viznachena virobnik.

You think that smartctl is a good tool, but I have less opportunity to launch it manually, it would be impossible to automate all right, the program was launched periodically and caused me to change the results of the revision. I can help smartd.

Adjustment of smartd and smartctl for diagnostics and monitoring in real time

Diagnostics of hdd in linux in real time is much easier to adjust. For a list, edit the smartd config file /etc/smartd.conf. Give the next row:

nano /etc/smartd.conf

/ dev / sda -m [email protected]-M test

  • -m - e-mail addresses for overseeing the results of the conversion. Tse can be the address of the local koristuvach, superkoristuvach or the name of the address, when a server has been set up for supervising electronic mail;
  • -M- Frequency of oversight of sheets. once - supersede once again about problems with the disk. daily- a problem has emerged as soon as possible. diminishing- Over the course of a day, there is a problem. test- supervise the tests depending on the hour to launch smartd. exec- Viconuє means the program in the place of delivery.

Save changes and restart smartd. Blame it on e-mail a sheet of suitable zm_stu:

You can also plan a test for your graph, for which you can choose the option -s and a regular viraz like "T / MM / DD / DN / CHH", de:

  • T- Test type:
  • L- Dovgy test;
  • S- short test;
  • C- Test change (ATA);
  • O- offline (test).

Інші symbols on the start date of the hour of the test:

  • MM- Misyats on pik;
  • DD- Day of the month;
  • Hh- One o'clock;
  • DN- day of trading (from 1 - Monday 7 - week;
  • MM, DD and HH- It will appear in two dozen digits.

The dot means all possible meanings, the line at the arches (A | B | C) means one of three options, the line at the square arches means the range (from 1 to 5).

For example, I will turn the linux hard disk of the working day for one hour of the day, give the next row to smartd.conf:

DEVICESCAN -s (L /../..// 13)

Visnovki

If you want to quickly reconvert the mechanical robot of the hard drive, look at its physical body or look at the surface of the disk, check out smartmontools. Do not forget to visit regularly skanuvannya, then you will be so dyakuvati. Have you ever tried it before? Robitime? What are the best methods? Write at the comments!

Dzherelo shifted.

The computer is pristіy, the robot is based on the interaction of powerless components. The stench can annoy the robots at the same time. One of the most common reasons for the uncommon robots of the machine is that there are bits of sectors on the disk, and that periodically needs to be tested. Linux is meant for all kinds of possibilities.

Also, there are bit blocks and what stinks are there

A block (sector) is a very small midpoint of the disk, every bit of information (0 and 1) is taken from the viewer. If the system doesn’t seem to be able to write down the beaten bit at the commissary, talk about the beaten sector. The reasons for such blockages can be found in the following:

  • shlyub pid hour virobnitstva;
  • enabling live information in the process of recording;
  • physical knowledge of the disc.

A small collection on all noses is ruined. By the end of the day, you can start talking about a quick way to the annex to the house. Linux has a lot of ways to test your disk.

Linux disk rewiring

on the Linux kernels Practical example of OS, middle of Ubuntu and Debian. The disc inversion procedure is universal and suitable for the skin of them. About those that last hour of testing, it’s very hard to think, if there’s a lot of new options appearing on the disk system, the speed of robotics from the nose (writing / reading) has significantly changed, for the procedure is to wick pardons.

Bagato hto znayomiy iz program on Windows - Victoria HDD... The retailers have told about writing її analogs for Linux.

Badblocks

Badblocks is a disk utility found in Ubuntu and other Linux distributions. The program allows you to test your hard drive, so i call-ups accumulate.

Important! Effort to point at the statti of the terminal command to be repaired from the sudo parameter;

Before that, like testing a disk in Linux, it will be reconverted, like accumulating connections to the system, with the help of the additional utility fdisk-l. Vaughn will also show them in real life.

Now it is possible to start before the middle of the test on the bit sector. The Badblocks robot is organized like this:

badblocks -v / dev / sdk1> bsector.txt

The following commands and operands are displayed on the record:

  • -v - display a report about the conversion;
  • / dev / sdk 1- Revision of razdіl;
  • bsector.txt - write the results to a text file.

As soon as the disk has been rewritten, there are bits of blocks, you need to run the fsck utility, or e2fsck, from the Victorian file system. Stink around the information records at the non-working sector. For ext2, ext3 and ext4 file systems, the following command is displayed:

fsck -l bsector.txt / dev / sdk1

In the іnshomu vipad:

fsck -l bsector.txt / dev / sdk1

The -l parameter will cause the program to change the bit blocks from the bsector.txt file and turn it on.

Gparted

Utilita rewrite the file Linux system do not go to the text interface.

The tool is not available for distributions operating systems To that її it is necessary to get up by issuing the command:

apt-get install gparted

The main window displays available disks. About those who, it's time to testuvati, zrozumilo to the sign of the hail, sewing the order from yogo im'yam. The launch of the reversal is going to be on the way to the item “Reversal for grave” in the submenu “Rozdil”, which is rooted on the panel above. The required disk vibrates in front of it. When the scan is completed, the utility is the result.

Reverse HDD GParted is available for Ubuntu, FreeBSD, Centos, Debian and other Linux distributions.

Smartmontools

The tool allows you to test the file system with greater reliability. In modern hard disks, the module for self-control S. M. A. R. T., which analyzes the data of the accumulator and additionally helps in the seriousness of the inequality at the cob stage. Smartmontools features for robots and cim module.

Launching the installation via the terminal:

  • apt install smartmontools - for Ubuntu / Debian;
  • yum install smartmontools for CentOS.

For a look at information about zhorstkogo's camp disk, a row is inserted:

smartctl -H / dev / sdk1

The conversion of pardons is a busy hour, fallen asleep on the disk. When the program is finished, the result is about the presence of broken sectors, for example, they are visible.

Utilita for the parameters: -a, --all, -x, --xall. For rejection of additional information, follow the add-on:

Safecopy

If we need to test winchester on Linux, we will cook varto booty to whatever result.

Safecopy copy of a copy of an attachment to a working one. Dzherelom can buy yak hard drives, so i know noses... Tsey іnstrument іgnorє pomilki introduced / vivodu, read, bit blocks, prodovuyuchi pratsyuvati without interruption. The visibility is as fast as possible, and I will take care of the computer.

Respect! Utilita is not designated for updating view files... Wonderful information, which can be found in the broken sectors.

To install Safecopy on Linux, the following row should be entered in the terminal:

Scanning to launch with the command:

safecopy / dev / sdk1 / home / files /

Here, the first way means the drive, the other - the director, where to save the file.

The program builds an image of the file system and an unstable working attachment.

Robiti, as a pardon has been revealed in the Ubuntu system software

The introduction of a new software security for the changes of the systemic adjustments may be victorious in the face of system programs". Bagato hto yogo іgnoru, so on sleeping robots do not get into it.

For the problem, please call on Ubuntu version 16.04. There is no need to test HDD for any problem, because the problem is faster than that of the software. Sometime about the incompleteness of the robotic programs and the promotion of the message to the dealers. For this, you will be able to open the window of the browser, and you will need to memorize the form from which crocs. This option is not a guarantee of a pardon.

Another way is to help you to unicuti, if you happen to be out of the question, as if it were the same and the same program. For the whole, in case of a warning message, it is necessary to put a daw on the option "Do not show more for the whole program".

The third method is to enable the Apport utility, which is displayed in Linux for information and support. Such a decision should include the splitting of the windows with pardons. You can get rid of the show every now and then, overlooking the service of the collection in the working station. For the whole it is necessary to have a visonati:

gsettings set com.ubuntu.update-notifier show-apport-crashes false

Dani continue to go to dad / var / crash. Їх periodically it is necessary to clean, and the stench did not smell the disk space:

To re-enable Apport services, enter the following entry in the terminal:

gksu gedit / etc / default / apport

In the text, when it appears, the value of the enable field changes from 1 to 0. Nadal, when you turn on the service again, will turn the setting for the change.

Visnovok

It is recommended that you periodically test it to save your files on the hard drive. Linux is prompted for the first time before the task is uploaded. On the vibration, there will be a change of utilities, since they will appear in different sectors and will not be able to transfer information to the attachment, so that it functions normally.

Get ready for the project - please, dyakuyu!
Read also
How can I put the trellises in the iPhone? How can I put the trellises in the iPhone? Updating iOS in three different ways Updating iOS in three different ways Mode "Do not turbuwati" mode that silent mode in the iPhone "Do not turbuwati" at night