From owner-freebsd-questions@freebsd.org Mon Jul 10 00:34:08 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EEFED99841 for ; Mon, 10 Jul 2017 00:34:08 +0000 (UTC) (envelope-from srs0=cpwb=6n=mail.sermon-archive.info=doug@sermon-archive.info) Received: from mail.sermon-archive.info (sermon-archive.info [71.177.216.148]) by mx1.freebsd.org (Postfix) with ESMTP id 19C8E75915 for ; Mon, 10 Jul 2017 00:34:07 +0000 (UTC) (envelope-from srs0=cpwb=6n=mail.sermon-archive.info=doug@sermon-archive.info) Received: from [10.0.1.251] (mini [10.0.1.251]) by mail.sermon-archive.info (Postfix) with ESMTPSA id 3x5R6Q2JSpz2fk3B; Sun, 9 Jul 2017 17:34:06 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Unusual Question From: Doug Hardie X-Priority: 3 (Normal) In-Reply-To: <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu> Date: Sun, 9 Jul 2017 17:34:06 -0700 Cc: "freebsd-questions@freebsd.org Questions" Content-Transfer-Encoding: quoted-printable Message-Id: References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu> To: galtsev@kicp.uchicago.edu X-Mailer: Apple Mail (2.3273) X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 00:34:08 -0000 > On 9 July 2017, at 17:18, Valeri Galtsev = wrote: >=20 >=20 > On Sun, July 9, 2017 4:57 am, Doug Hardie wrote: >> I have a FreeBSD 9.3 remote server that needs to be purged. I know = that >> rm -rf / will remove all the directory entries, but I need to write = over >> the drive. I thought that dd if=3D/dev/zero of=3D/dev/ada0 might do = the >> trick, >=20 > If you were able to execute this, it still will not do the trick. What > will happen is the following: the command at some point will descend = into > /dev and will delete block device / filesystem lives on, and after = that > point the command will just fail. I have vague recollection that that = was > one of the tricky questions on some sysadmin exam (Linux probably). I = knew > someone who actually did that on multi-user box he administered (space > just snuck in after leading slash of absolute path). I happened to = help > him: we just mounted partitions on another machine and apart from /bin > /boot and portion of /dev all still was there, so it was nothing like = the > disaster on can picture from nasty appearance of this command. >=20 > Someone at some point mentioned that rm command goes into directories = and > subdirectories NOR in alphabetical order, so I left that out, but in > incident I mention nothing but what alphabetically is before the = device / > filesystem lives on (/dev/hda2 was our case I believe) was lost. >=20 > I hope, you had fun reading this ;-) >=20 > Valeri >=20 >> but it gives an not permitted error. The whole thing can crash and >> burn at the end. This is an unmanned site so moving drives is not = viable. >> _______________________________________________ Thanks for the info. I've never tried the rm approach, but the dd = approach seems to work. After a couple hours the machine became = unresponsive and ssh sessions were terminated. I think the drive is now = empty. I'd like to be able to get it back to verify, but that won't = happen. I still have 3 more systems to do this to. The others will = have to wait for awhile as I may still need them for a few more days.