On Thu, 6 Nov 2014, Dale R. Worley wrote: > There is one thing that seems like it might be a problem: We have to > ensure that the SCSI driver can read the partition tables (in the > standard locations) even if it doesn't know how big the disk is. A DOS partition table is stored in the first 512 bytes of the disk. A GPT partition table occupies the first 33 or so blocks. (It also has a copy occupying the last few blocks, but if you don't know how large the disk is, that's not much help.) > Which leads me to wonder what happens if one reads /dev/sdX until one > hits end-of file. People have written that we don't want to read the > disk from locations beyond end-of-data because some disks react badly > to out-of-range reads. But if that is so in general, there would be > problems simply copying /dev/sdX. (Indeed, if all disks gave a proper > error for out-of-range reads, a bisection search would find the size > of the disk easily enough.) Most drives will work fine if you try to read beyond the end. You'll just get an appropriate error return. But some devices (typically, cheap consumer-grade USB devices) go wacky. Often enough, they crash or hang. Some of them may get going again in response to a reset; others have to be powered off to recover. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html