<p>Justin, <br>
Taking this idea to production on network servers would be interesting. I am working on a networked backup script and I like the thought of automating a scoring system for backup priority.</p>
<p>Wolf</p>
<p><a href="http://evergreen-community-01.lyrasistechnology.org">http://evergreen-community-01.lyrasistechnology.org</a><br>
<a href="http://sourcefreedom.com">http://sourcefreedom.com</a><br>
Apache developer:<br>
<a href="mailto:wolfhalton@apache.org">wolfhalton@apache.org</a></p>
<div class="gmail_quote">On May 14, 2012 10:51 PM, &quot;Justin Goldberg&quot; &lt;<a href="mailto:justgold79@gmail.com">justgold79@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That&#39;s a good argument for distributed, intelligent, encrypted backup.<br>
Think of a private Freenet.<br>
<br>
We all have tons of drives and computers but why do we have to backup<br>
everything? For example, we edit a document that we downloaded, we<br>
keep a few revisions/backups. We create a document, score that file<br>
higher to keep more backups of that file. Mp3 files from bittorrent,<br>
don&#39;t back them up or score really low. Mp3 files we ripped from a cd,<br>
back them up, scored higher than the downloaded ones, but lower than a<br>
document or our bookmarks file. Or you could say that This would be<br>
best created by a  filesystem like BFS, where custom database<br>
attributes can be kept. I guess a fully journaled filesystem would<br>
accomplish this as well, but I&#39;m dreaming of something network-wide.<br>
<br>
On 5/14/12, Ron Frazier (ALE) &lt;<a href="mailto:atllinuxenthinfo@techstarship.com">atllinuxenthinfo@techstarship.com</a>&gt; wrote:<br>
&gt; Hi Mike T,<br>
&gt;<br>
&gt; Thanks for all the info you shared in this post. It&#39;s taught me several<br>
&gt; things I didn&#39;t know about the low level operation of a PC. I may have<br>
&gt; mis-spoken about the reliance of SpinRite on BIOS. I think I read somewhere<br>
&gt; on his website (later) that he bypasses BIOS, but I don&#39;t know how all the<br>
&gt; details are worked out. I try to do regular backups, but always seem to be<br>
&gt; behind on doing so. I did eventually manage to boot a Ubuntu live CD on my<br>
&gt; old pc and run a badblocks non destructive read write test. It finished the<br>
&gt; Linux partitions fine and is chugging away on one of two windows partitions.<br>
&gt; This test takes a LONG time, just as it likewise does with SpinRite. I found<br>
&gt; an interesting quirk you have to account for when specifying the block<br>
&gt; numbers for badblocks to use, which I commented on in another thread.<br>
&gt; Essentially, if you get the number of blocks from fdisk, you have to<br>
&gt; subtract 1 from the number to feed it to badblocks. That drove me crazy for<br>
&gt; half a day or so.<br>
&gt;<br>
&gt; You mention data scrubbing in your post. I&#39;ve run across that in my<br>
&gt; research, as well as some very interesting info on latent defects. My<br>
&gt; research is ongoing, but my current conclusion is that data scrubbing is<br>
&gt; beneficial for personal drives too, hence my willingness to run 36 - 48<br>
&gt; hours of diagnostics on my drives, 2 - 3 times / year. Data scrubbing may be<br>
&gt; more valuable on personal drives than on raid, since there is no drive to<br>
&gt; auto failover to. If the sectors on my drive fail to read, unless SpinRite<br>
&gt; can recover them, which I&#39;ve seen it do on occasion, then my only solution<br>
&gt; is to resort to backups, which are probably out of date.<br>
&gt;<br>
&gt; Another, unrelated, problem is that, about half the time, that old computer<br>
&gt; will not boot the GUI Unity interface on the live CD of Ubuntu 11.10. At<br>
&gt; other times, it works. Totally insane. I hate Unity anyway, but it would be<br>
&gt; nice to have SOME kind of GUI running. To run the recent badblocks test, I<br>
&gt; had to resort to hitting ALT-F1 to get to a terminal and use that. The GUI<br>
&gt; never did start up. I tried the startx command, but that didn&#39;t do anything<br>
&gt; either.<br>
&gt;<br>
&gt; The saga to preserve ever so fragile data continues ...<br>
&gt;<br>
&gt; Sincerely,<br>
&gt;<br>
&gt; Ron<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.<br>
&gt; Please excuse my potential brevity.<br>
&gt;<br>
&gt; (To whom it may concern. My email address has changed. Replying to former<br>
&gt; messages prior to 03/31/12 with my personal address will go to the wrong<br>
&gt; address. Please send all personal correspondence to the new address.)<br>
&gt;<br>
&gt; (PS - If you email me and don&#39;t get a quick response, you might want to<br>
&gt; call on the phone. I get about 300 emails per day from alternate energy<br>
&gt; mailing lists and such. I don&#39;t always see new email messages very<br>
&gt; quickly.)<br>
&gt;<br>
&gt; Ron Frazier<br>
&gt; <a href="tel:770-205-9422" value="+17702059422">770-205-9422</a> (O) Leave a message.<br>
&gt; linuxdude AT <a href="http://techstarship.com" target="_blank">techstarship.com</a><br>
&gt;<br>
&gt;<br>
&gt; &quot;<a href="mailto:mike@trausch.us">mike@trausch.us</a>&quot; &lt;<a href="mailto:mike@trausch.us">mike@trausch.us</a>&gt; wrote:<br>
&gt;<br>
&gt; On 05/11/2012 09:09 PM, Ron Frazier (ALE) wrote:<br>
&gt;&gt; Hi Mike,<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t think that discredits the project, I think it&#39;s a wise design.<br>
&gt;&gt; Here&#39;s why. The most recent version of SpinRite came out in 2004 and has<br>
&gt;&gt; a history going back to 1988. The program designer is planning an<br>
&gt;&gt; update, but it&#39;s not out yet. Nevertheless, that version will work on<br>
&gt;&gt; modern drives. I don&#39;t know how deeply SpinRite interacts with the bios.<br>
&gt;<br>
&gt; If it has the limitations of BIOS, then it is using the BIOS functions<br>
&gt; as published in Ralf Brown&#39;s Interrupt List (RBIL), which was (and for<br>
&gt; the real-mode programmer, still is) the definitive source of BIOS<br>
&gt; interrupt interfaces. The BIOS supports only a limited set of<br>
&gt; functionality, which has been extended over the years to cater to larger<br>
&gt; drives and so forth. It supports only limited error handling (for<br>
&gt; example, INT 0x13/00 is &quot;RESET DISK SYSTEM&quot;, but that only seeks the<br>
&gt; drives to track 0, it doesn&#39;t actually perform a bus reset).<br>
&gt;<br>
&gt; The INT 13 interface is horrible, and unsuitable for the implementation<br>
&gt; of any serious software these days. And has been for many years, which<br>
&gt; is why modern operating systems no longer use that interface. Even<br>
&gt; Windows 3.11 had a dedicated driver for bypassing the BIOS routines for<br>
&gt; disk access (they called it &quot;32-bit disk access&quot; or something along<br>
&gt; those lines, IIRC).<br>
&gt;<br>
&gt;&gt; I do know it boots from its own copy of freedos and runs from there. The<br>
&gt;&gt; product was designed to work with any PC compatible computer, be it PC,<br>
&gt;&gt; Linux box, or Mac. It can even work with Tivo or iPod drives, etc. if<br>
&gt;&gt; you take the drive out and attach it to a PC. It needs to be able to<br>
&gt;<br>
&gt; Well, yes. They all speak the same language, regardless of the type of<br>
&gt; computer they are plugged into. The only thing that is really different<br>
&gt; between disks in a Mac and a PC is the convention used to store data<br>
&gt; (e.g., partition tables or maps and filesystems).<br>
&gt;<br>
&gt;&gt; have total control over the drive, including disabling some of the<br>
&gt;&gt; drive&#39;s normal error correction, so it can do analysis and detect<br>
&gt;&gt; problems. It can&#39;t have the OS in the way and interfering with it&#39;s<br>
&gt;&gt; operation. The primary target machine it was designed to run on was no<br>
&gt;<br>
&gt; ... but it&#39;s perfectly happy having the limited, inconsistently designed<br>
&gt; various BIOS programs get in the way and do its work for it?<br>
&gt;<br>
&gt; I&#39;ll grant that the Linux generic SCSI interface did not exist when<br>
&gt; SpinRite was first created. I&#39;ll grant even further that it was<br>
&gt; impractical in that time period to actually write dedicated drivers for<br>
&gt; the various disk controllers which existed at the time. The reason that<br>
&gt; BIOS existed was to simplify the creation of relatively simple systems<br>
&gt; so that they did not need to know anything more than the generic BIOS<br>
&gt; interface.<br>
&gt;<br>
&gt; However, with that generic BIOS interface comes a<br>
&gt; lowest-common-denominator approach to handling the disk controller and<br>
&gt; therefore the disks themselves. This would also be the primary reason<br>
&gt; why it&#39;s a horrible idea to use the BIOS interface.<br>
&gt;<br>
&gt;&gt; doubt Windows machines. Back in 2004, those machines were running<br>
&gt;&gt; various combinations of Win 95, Win98, Win ME, Win 2000, Win NT, and Win<br>
&gt;&gt; XP. I don&#39;t think any of the Windows systems allow the kind of<br>
&gt;&gt; unfettered access to the drive that SpinRite needs. Also, as far as I<br>
&gt;<br>
&gt; Windows systems not built on the Windows NT kernel (e.g., Win9x and<br>
&gt; earlier) do allow direct hardware access because at their core they were<br>
&gt; still 16-bit operating systems. Calls to the Win32 API were largely<br>
&gt; thunked to 16-bit modules that were preexisting. There were large<br>
&gt; components of the system that ran in 32-bit mode, but a lot of it did<br>
&gt; not. There was therefore a heavy cost associated with the constant<br>
&gt; changing of the CPU mode as part of context switches and so forth, which<br>
&gt; made Win9x both clunky and relatively unstable.<br>
&gt;<br>
&gt; Starting with Windows NT, direct hardware access is prohibited to most<br>
&gt; applications. The exceptions are those that create kernel drivers that<br>
&gt; enable an application to bypass such restrictions. I don&#39;t know if NT<br>
&gt; has something like the Linux generic SCSI interface, but if it doesn&#39;t<br>
&gt; and it were necessary for an application to be implemented, it would<br>
&gt; certainly be possible to do.<br>
&gt;<br>
&gt; Building a utility directly on top of a SCSI interface would be far<br>
&gt; superior to building it on BIOS. Building it to talk directly to<br>
&gt; hardware would be the only way to get closer to the metal than what SCSI<br>
&gt; interfaces would allow, but that&#39;s unnecessary for most applications,<br>
&gt; and if it were necessary for an application the preferred way to do it<br>
&gt; would ideally be a 32-bit extended DOS program that performs direct<br>
&gt; hardware access. Of course a real-mode program would also work, but<br>
&gt; there&#39;s little to no point to writing real mode code, since it&#39;s quite<br>
&gt; easy to get a 32-bit DOS compiler anyway (GCC, for example, supports<br>
&gt; MS-DOS via DJGPP).<br>
&gt;<br>
&gt;&gt; know, there isn&#39;t a way to dismount an internal drive in Windows and<br>
&gt;&gt; work on it, as you potentially can in Linux. Even if you could dismount<br>
&gt;&gt; a drive, the system needs to run on the system drive, and the average<br>
&gt;&gt; user doesn&#39;t have any way to boot a Windows machine without doing so<br>
&gt;&gt; from the system drive. So, the best design choice was to make a product<br>
&gt;<br>
&gt; You can absolutely unmount drives in Windows. Use the Disk Manager in<br>
&gt; the Microsoft Management Console for a GUI way to do it. There are of<br>
&gt; course API calls that can be used by custom software to do it as well.<br>
&gt;<br>
&gt; You are right in that you cannot unmount the system drive, but that<br>
&gt; problem is common to all operating systems, not just Windows. DOS had a<br>
&gt; sort of exception, but DOS was also small enough to remain completely<br>
&gt; resident in RAM when there was more than 1 MB of memory present and usable.<br>
&gt;<br>
&gt;&gt; that booted itself. That way, the OS isn&#39;t running, all the drives are<br>
&gt;&gt; dismounted, and he didn&#39;t have to wonder whether the user would be able<br>
&gt;&gt; to boot their pc so they could use his software. It was probably the<br>
&gt;&gt; best solution to the problems he had to deal with. On my machines where<br>
&gt;&gt; the bios is new enough to match the hard drive capacity, I can run<br>
&gt;<br>
&gt; Most, if not all, modern BIOS firmware provides what are known as the<br>
&gt; INT 13 extensions, which provide a portable interface to address up to<br>
&gt; one or many different sizes. There was a series of progressions in the<br>
&gt; maximum disk size that BIOS could support; 500 MB, 1 GB, 4 or 8 GB, 128<br>
&gt; GB and I don&#39;t remember the current one but it is pretty large relative<br>
&gt; to the time period it was introduced in. Maybe 500 or 800 GB or something.<br>
&gt;<br>
&gt; Anyway, given a disk that fits within the support of the BIOS, you can<br>
&gt; read and write sectors by identifying the C/H/S (very old API) or LBA<br>
&gt; address of the first sector and the count of sectors. The BIOS will of<br>
&gt; course return an error condition in the CPU&#39;s registers if it<br>
&gt; encountered an error while reading one of the sectors.<br>
&gt;<br>
&gt; Just as a side note, DOS called upon BIOS to do the work, but<br>
&gt; well-behaved programs that were written for DOS and did not require the<br>
&gt; ability to go beyond DOS&#39; support of storage would simply call DOS<br>
&gt; interrupts to get the job done, which provided a slightly higher-level<br>
&gt; API since you did not need, for example, to worry about sectors but<br>
&gt; instead clusters in named files.<br>
&gt;<br>
&gt; SpinRite doesn&#39;t need to use any of the DOS filesystem facilities,<br>
&gt; though, and DOS is inherently a single-tasking operating system, so it<br>
&gt; is safe for SpinRite to assume that it can have exclusive control of the<br>
&gt; disk while it is running.<br>
&gt;<br>
&gt; Also note that there are DOS implementations that have Windows NT-like<br>
&gt; restrictions on direct hardware access for certain things. Such<br>
&gt; versions are usually ones that provide some sort of task switching or<br>
&gt; multitasking ability, for example taking advantage of the functionality<br>
&gt; and features of the 386 or newer CPUs and providing DOS applications<br>
&gt; with a V86 environment instead of a real one.<br>
&gt;<br>
&gt;&gt; SpinRite on both the Windows partitions and the Linux partitions. It<br>
&gt;&gt; doesn&#39;t care. It works strictly at the sector level and is non<br>
&gt;&gt; destructive. Even to use the badblocks command as you and Jim have<br>
&gt;&gt; suggested on my old PC, I have to shut it down and boot a foreign OS, ie<br>
&gt;&gt; a live Linux CD, in order to run the test. That&#39;s exactly the same thing<br>
&gt;&gt; SpinRite is doing. It just happens to be booting freedos rather than<br>
&gt;&gt; Linux.<br>
&gt;<br>
&gt; No, you can do it while the system is running, you just cannot use the<br>
&gt; read-write test mode.<br>
&gt;<br>
&gt; The read-write test mode in badblocks is superior because it does not<br>
&gt; depend on the data currently stored in the sector. Certain data<br>
&gt; patterns can hide error conditions which may exist on the platter; for<br>
&gt; example, a particular bit may be stuck &quot;on&quot; or &quot;1&quot;, but you&#39;d never know<br>
&gt; that if the value that is there is legitimately 0xFF. But you&#39;d detect<br>
&gt; it if you wrote 0x00 there, and when you read it back it was, for<br>
&gt; example, 0x01 or 0x80, because the stuck bit didn&#39;t get cleared.<br>
&gt;<br>
&gt; SpinRite does this at the disk sector level (presumably, since it is an<br>
&gt; ancient program, with a fixed value of 512 for the sector size). The<br>
&gt; badblocks command works on blocks, too, but you can specify the size of<br>
&gt; what it considers a block. A common value is 4,096 bytes for a block<br>
&gt; when running badblocks, though virtually any block size that is a<br>
&gt; multiple of 512 will work for older drives; make that a multiple of<br>
&gt; 4,096 for modern so-called &quot;advanced format&quot; drives.<br>
&gt;<br>
&gt;&gt; I may run the non destructive rw test on the old pc using badblocks as<br>
&gt;&gt; you and Jim suggested in other messages. It already passed the long<br>
&gt;&gt; smart test and it says the drive is healthy with no bad sectors. I just<br>
&gt;&gt; have to figure out how much additional time I want to spend on it.<br>
&gt;<br>
&gt; For a non-critical (e.g., personal) system, SMART should be sufficient.<br>
&gt; You of course take regular (monthly or weekly) backups of your ${HOME},<br>
&gt; right? If that&#39;s the case then recovery is possible within hours of new<br>
&gt; drive installation, and for an individual, particularly one who has<br>
&gt; multiple computers, that is an acceptable thing. If not, you can employ<br>
&gt; other steps to try to delay or defer the restoration process, such as<br>
&gt; using RAID, but backups are backups and still quite necessary.<br>
&gt;<br>
&gt; I have one array I manage that it would take approx. 30 hours to restore<br>
&gt; from backup. In an attempt to avoid that in all but the most<br>
&gt; devastating situations, I have it on a RAID array. As long as the RAID<br>
&gt; array&#39;s health is maintained, it is possible for me to keep taking and<br>
&gt; testing backups and knowing that I can, if need be, recreate the<br>
&gt; configuration as it exists in the office today along with all the data,<br>
&gt; but I don&#39;t have to if only one or two drives fail, because I can<br>
&gt; replace them almost immediately upon failure. I&#39;m a bit on the paranoid<br>
&gt; side, too, I will start replacing drives as soon as they stop behaving<br>
&gt; 100% perfectly as opposed to wait for a hard failure.<br>
&gt;<br>
&gt; So far that seems to have been a good way to ensure that things stay<br>
&gt; running... the drives I&#39;ve removed were all used again in my home<br>
&gt; (after, of course, being wiped) and failed within a month of removal<br>
&gt; from the array. One of them failed only two days after removal. Even<br>
&gt; more than smart, the Linux kernel ring buffer is a great source to<br>
&gt; monitor for disk trouble, especially on a system that has many disks<br>
&gt; with lots of activity on them. The kernel will notice errors as soon as<br>
&gt; they are encountered.<br>
&gt;<br>
&gt; Additionally, RAID devices get &quot;scrubbed&quot; once per month anyway (at<br>
&gt; least by default on Debian and Ubuntu). The &quot;scrub&quot; process is<br>
&gt; *exactly* what SpinRite does, reading everything on all the disks. It<br>
&gt; doesn&#39;t re-write every sector, but it doesn&#39;t need to: if a sector<br>
&gt; cannot be read it is reassembled from parity information and an attempt<br>
&gt; is made to re-write it. If the drive was able to re-map the sector, the<br>
&gt; write will work and things continue. If the drive was unable to re-map<br>
&gt; the sector (say, because it ran out of sectors in the spare sector area)<br>
&gt; then the write will most likely fail and the disk will be marked<br>
&gt; &quot;failed&quot; by the virtual RAID controller.<br>
&gt;<br>
&gt; That&#39;s robust enough for me, at least with the requirements I have in<br>
&gt; the environments that I am managing for the moment. I would like,<br>
&gt; however, to have a beefier system for the RAID. Not because of the CPU,<br>
&gt; but because it would really do well to have a veritable buttload of RAM.<br>
&gt; A lot of the operations would be faster if the system had 4 GB of RAM<br>
&gt; to use for caching and buffers...<br>
&gt;<br>
&gt;       --- Mike<br>
&gt;<br>
&gt; --<br>
&gt; A man who reasons deliberately, manages it better after studying Logic<br>
&gt; than he could before, if he is sincere about it and has common sense.<br>
&gt; --- Carveth Read, “Logic”<br>
&gt;<br>
&gt; _____________________________________________<br>
&gt;<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
<br>
Justin Goldberg<br>
<br>
*<a href="mailto:justgold79@gmail.com">justgold79@gmail.com</a>*<br>
<a href="tel:%28504%29%20208-1158" value="+15042081158">(504) 208-1158</a><br>
<a href="http://gplus.to/goldberg" target="_blank">http://gplus.to/goldberg</a><br>
<a href="http://twitter.com/justingoldberg" target="_blank">http://twitter.com/justingoldberg</a><br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>