Archive for December, 2015

Badblocks Check whether the hard disk has bad sectors

Hard drive is relatively easy to broken equipment,It may appear bad sectors and other physical failure after a period of time。When the hard disk bad sectors,If not promptly replaced or conduct technical process,Disk bad sectors will be more and more,And would cause frequent crashes and data loss。The best approach is to replace the new disk。In the case of temporary,We should be part of the bad sectors sector shields,Do not touch them。

badblocks is to check whether a disk has bad sectors Tools,Can be read way to check,You can also check the way to write。

Here,I use

badblocks -v /dev/sda

Check for bad sectors,Test results without error

 

 

 

 

badblocks parameter options

-b blocksize
Block size specified disk,Bytes,The default value is "block 4K"(4K/block)
-c blocksize
Check the number of times each block,The default is 16
-f
Non-destructive read enforcement on an already mounted equipment write test operation
(We recommend that you umount equipment,Then to detect bad sectors。Only when the / etc / mtab mount the wrong device false positives when you can use this option)
-i file
Skip has been shown to bad sectors in the file file,Without detection (to avoid duplicate detection)
-or file
The detection result is output to the file file
-p number
Repeat search devices,Until a specified number of times through no bad blocks to find a new location,The default number is 0
-s
It shows progress check
-t pattern
By pressing the designated read mode is detected block。You can specify a decimal 0 to ULONG_MAX-1 positive value,Or random (stochastic)。
If you specify more than one mode,badblocks will use the first pattern detecting all blocks,Then use one mode to detect all of the blocks。
Read-only mode accepts only a mode,It can not accept random pattern。
-v
Display detailed information about the implementation
-w
Are the first written for each block,Then read information from it
[device]
Specifies the disk device to be checked。
[last-block]
The total number of blocks specified disk device。
[start-block]
Specifies the block from which you want to start checking

Comments

bash: scp: command not found lost connection问题解决

Intranet,Pass from one servermysqlofSourceWhen you install the package to another server,The following error occurred:

[root@localhost ~]# scp mysql-5.1.55.tar.gz root@192.168.3.22:.
[email protected]’s password:
bash: scp: command not found
lost connection
Tip scp command not found,But the discovery found that the command exists
[root@localhost ~]# whereis scp
scp: /usr/bin/scp /usr/share/man/man1/scp.1.gz
[root@localhost ~]# find / -name scp
/usr/bin/scp
Because there is no environment variable added to the reasons?
EVN 查看,We have joined the environment variables
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
And to bring the full path,When executed or reported the same error
[root@localhost ~]# /usr/bin/scp mysql-5.1.55.tar.gz [email protected]:.
[email protected]’s password:
bash: scp: command not found
lost connection
See scp relies package
[root@localhost ~]# rpm -qf /usr/bin/scp
openssh-clients-5.3p1-81.el6.i686
Suspect there will be other dependencies is not installed on,Reinstall it again
[root@localhost ~]# yum install openssh-clients*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* warm: mirrors.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Setting up Install Process
package openssh-clients-5.3p1-81.el6.i686 already installed and latest version
Nothing to do
Tip has been installed,And already the newest version
When retesting,Still the same error。Nani,If the command does not exist or can not be found,Before scp command should knock them out is a problem ah,And should not be re-emergence of this problem after a successful command clincher。If you are not a local problem,That is not installed scp command server on the other end?
[root@com ~]# whereis scp
scp:
[root@com ~]#
Really so,So is the server side does not find scp command,Rather than the local
Dependencies installed scp
[root@com ~]# yum install openssh-clients*
After installing,Retransmission file
[root@localhost ~]# scp mysql-5.1.55.tar.gz [email protected]:.
[email protected]’s password:
mysql-5.1.55.tar.gz
This article

Comments

cpanel sudden onset appeared 403 repair

/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd

Comments