Date: Tue, 24 Feb 1998 16:16:14 -0800 From: Greg Shenaut <greg@bogslab.ucdavis.edu> To: questions@FreeBSD.ORG Subject: Re: roll-in installation? Message-ID: <199802250016.QAA09809@myrtle1.bogs.org>
next in thread | raw e-mail | index | archive | help
Please excuse me while I mumble to myself, on the off chance that someone else might have a useful response. On the subject of roll-in installation, is there any easy way to clear all of the free blocks in a filesystem? It seems to me that if you are just going to clone one system from another one via a tape, it might not really be necessary to use a dump or tar format tape--instead, some kind of raw image of the disk, block by block, might be easier and faster. While of course it would be possible to just use dd to the tapedrive, some degree of compression wouldn't hurt, and it would help a great deal to achieve it if all of the blocks which aren't in use were cleared to zero on the drive instead of containing random garbage. Then filtering the full drive (excluding the bad block table, if there is one, of course) through compress or perhaps gzip and onto the tape would give you the image you need, with little wasted tape. (Apparently gzip becomes slightly confused above 2 GB.) One tremendous advantage of this method over a more intelligent method is that if there are several operating systems or filesystem types on the physical drive, they would all be cloned along with the unix filesystems; not to mention that the intelligence needed to recover the data onto the physical disk would be much less. So, is there any way which already exists to clear all of the unused blocks in a (quiescent) filesystem? (I don't think this would be hard to write, but maybe someone has already done it.) Note that for your standard FAT filesystems, there are several programs around which reorganize the disk and zero out the unused space all in a contiguous block. Running in some sort of DOS or Windows mode, you should run one of these first. BTW, I suppose the simplest, but perhaps maximally painful way to do this is to dump the filesystem, zero the entire partition, make a new filesystem, and restore the tape--I would prefer to avoid this if possible. -Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802250016.QAA09809>