« first day (2406 days earlier)      last day (2539 days later) » 

10:06 AM
@derobert We don't know. Anyone may choose not to disclose personal beliefs or hobbies. As far as we know, X is just a name on a mailing list. There's no "normal" developer. In real life, they may be a developer and a gun nut, or broccoli-lover, or whatever.
 
 
6 hours later…
3:43 PM
@Kusalananda they might even use a ... Dvorak layout! ;)
 
@JeffSchaller But, I'm a nice guy. I promise!
I just get my vowels mixed up all the time...
 
 
1 hour later…
4:55 PM
0
Q: How to do disk surface scanning, and fix/reallocate bad sectors in Linux from command line?

klorHow can I do to scan surface of my hard disk and fix/reallocate bad sectors in Linux from command line?

 
@klor Uhm. What have you tried? I mean, I assume you at least searched Google for "linux check disk" or something, so what confused you?
 
I'm sure we have a few answers on our site, too...
 
@terdon: I checked fsck manual, but did not find any useful option for surface & bad block scanning, recovery.
 
@klor Ah, there you go! Please edit your question and mention it.
 
@terdon: ok
 
5:03 PM
At the moment your question looks like you haven't tried anything at all and all the answer you need is fsck.
The more detail you add, the greater the chance of somebody answering.
 
@terdon: done
 
Thanks
 
@klor are you aware that bad block management is done by the disk firmware on any disk newer that.... err the late 1990s?
 
@derobert: ok, but bad block management is done, when a read or write of the bad sector is read or written. But at that moment will slow down my IO speed dramatically.

I want to pre-scan the surface, fix the bad or weak sectors, then use the HDD with better performance.
 
@klor if you want to pre-scan the surface, either just use whatever to read all of /dev/sdX (e.g., pv -pterba /dev/sda > /dev/null works well) or use smartctl -t long /dev/sdX to tell the disk to do it itself
And if your new disk already has bad sectors out of the box... I'd consider sending it back.
But bad blocks will happen after the disk has been used for a while. You may need to use error-recovery control (etc.) to keep the response time down, and disk that support it. Hard to say since your question doesn't contain any details.
 
5:20 PM
@derobert: I bought disk with some bad sectors, to fix them, then use it as part of RAID 6 cluster. So sending back is not an option :)
I can do bad sector fixing under Windows, there are very good bad block fixing tools, but under Windows, the process is very slow, one sector fix takes 15 minutes. Waaay slow.

This is why I'm looking for a Linux solution, which does the same process in a faster way.
 
Hmm. I enjoy Windows bashing as much as the next guy but I wouldn't expect Linux to be any faster than Windows with something like this.
By the way @klor all of this stuff should go in your question. When I first read it I just thought you were some clueless windows refugee who thought bad blocks == fragmentation.
 
And I thought you'd read some guide that was current circa 1994...
 
If you explain what you actual final objective is, as you have done here, you are far more likely to get good answers.
 
@terdon: unfortunately Windows is not good at staying responsive when a device doesn't respond in time. A Windows 7 app tends to hang until the device is not responding. In Windows XP the same situation hanged the whole system until the response or a timeout.

Linux behaves but better in such situations, remains responsive. This is why I expect faster result from Linux.
 
Ah, I see.
@klor thanks for the edit!
I feel you went a little too far on the other side though (my fault, I told you to add "all this") so I edited and removed some of the less relevant information.
I hope you don't mind.
 
5:41 PM
Wasn't better when it was divided into sections with Headers?
 
@klor I felt they weren't really useful since the question was shorter. But feel absolutely free to roll the edit back.
 
@terdon: Anyway, it is clear as it is now. I keep it. Thanks for the clarification edit!
 
np
 
@klor The question is much clearer now than in its first incarnation!
 
 
2 hours later…
7:48 PM
I didn't know it was possible to fix bad blocks. I thought one just worked around them.
 
8:18 PM
@klor I wrote you up an answer based on the clarifications in your question and here.
 
8:59 PM
@derobert That's an extremely good answer. It's as if you did that sort of thing for a living :-)
 
@Kusalananda :-)
Thankfully, I've mostly done that sort of thing volunteering for a not-for-profit more than for a living. At work, I can get questionable hard drives replaced much more easily.
 
Same goes for the older one that you updated.
Just, very well written and easy to follow.
 
Thank you.
 
Hmm, apparently I'm not paying much attention to the news - the Director of the FBI was fired.
I didn't know that was possible.
 
Most of the top agency leadership serves at the pleasure of the President.
They're, at least to some extent, political positions the President appoints to fulfill his policy objectives
Really a question for Politics, though I think they already have it.
 
9:09 PM
I don't know much about the US Govt. I sort of had the impression that the FBI Director was tenured. Apparently not.
I remember Hoover was generally considered bad news. I wonder why he wasn't fired, then.
 
23
Q: Why hasn't the US political system taken recourse against Trump for his politically motivated firings?

Matt ThrowerThe answers to this question - What reasons may Donald Trump have had for firing FBI Director James Comey? - appear to suggest that there is widespread certainty that the sacking was politically motivated. And furthermore that the political motivation was to avoid or reduce the impact of potentia...

@FaheemMitha That wasn't really discovered until near the end of him holding that position, I think. And then Nixon didn't fire him for whatever reason.
en.wikipedia.org/wiki/J._Edgar_Hoover seems to have some details
 
@derobert Not really a reliable source on US history, in my opinion, but whatever.
I had the impression that he was a dodgy sort of person for awhile, but maybe he was the kind of dodgy that the US Govt liked.
I read the FBI spent a lot of time attacking civil rights groups in the 50s and 60s, for example.
 
@FaheemMitha Plenty of references, bibliography, and further reading there to chase down if you want an authoritive source.
 
@derobert True.
 
And there is History, too
 
9:19 PM
COINTELPRO, for example, though it's rarely talked about. I think the only person I've seen mention it in print is Chomsky.
Then again, I'm not widely read.
 
@FaheemMitha Well, Wikipedia says that became public in '71, and Hoover died in '72. So...
 
@derobert Yes, but that wasn't the only thing going on.
 
I mean, Nixon was busy covering up burglaries by then...
 
It was just an example.
@derobert Yes, I suppose Nixon firing Hoover over his criminal activity would have been the pot calling the kettle black.
 
You'd have to find one of those credible sources for further understanding. I'd guess that the Presidents in power at the time weren't upset about disrupting civil rights groups, or communists, or...
 
9:27 PM
Though it's always amazing that a burglary is what bought him down. Considering him and Kissinger spent years bombing the far east.
@derobert Actually, I think that kind of thing is an ongoing activity. They might just be better at keeping it on the down-low.
Maybe not communists so much, these days.
But as with all these things, one has to be a scholar to really keep track of what is going on.
 
9:47 PM
Is it still the /dev channel? ;-)
 
10:11 PM
@klor Nope, it's been subjected to a hostile takeover. And what's the /dev channel, anyway?
 
@klor yes, /dev/politics
Or, maybe it's actually /dev/urandom...
 
10:53 PM
Am currently running these commands
'/usr/bin/cd', ["/tmp"]
'/usr/bin/mkdir', ["tmpDir", "tmpDir/installerDir"]
'/usr/bin/cd', ['tmpDir']
'/usr/bin/touch', ["file1", "file2"]
'/usr/bin/echo abc > file1'
'/usr/bin/echo def > file2'
'/usr/bin/tar', ["-czvf", "installer.tar.gz", "installerDir"]
to create a directory structure that looks like this
$ ls
file1.gz  file2  installer.tar.gz
Can I run a single command to perform all 7 commands
?
 
@overexchange sure, if you had a tar file with all of that in it, you could just run tar xf tarfile.tar
You can get rid of the cds by giving the full path in the other commands. And there is no need to touch a file before writing to it
 
@overexchange Use case? AKA what difference does it make?
 
11:16 PM
@FaheemMitha Code looks compact
Because in invoke this commands using python?
 
@overexchange Not worth thinking about, imo. Unless you are in a code golfing contest.
 
@derobert Am creating tar for installerDir only, if you see the commands
 

« first day (2406 days earlier)      last day (2539 days later) »