{"id":72,"date":"2005-10-30T07:59:17","date_gmt":"2005-10-30T12:59:17","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/hoanga\/2005\/10\/30\/freebsd-usb-hard-disk-how-not-to\/"},"modified":"2005-10-30T07:59:17","modified_gmt":"2005-10-30T12:59:17","slug":"freebsd-usb-hard-disk-how-not-to","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/hoanga\/2005\/10\/30\/freebsd-usb-hard-disk-how-not-to\/","title":{"rendered":"FreeBSD USB Hard Disk HOW-not TO"},"content":{"rendered":"<p><a name='a575'><\/a><\/p>\n<p>\n I picked up a shiny new 160 gig drive to replace the current drive in the<br \/>\n server.  The old approach to backup was something like this:\n <\/p>\n<h4>General Steps for backing up data partition<\/h4>\n<p>\n (Note: not exact steps)<\/p>\n<ol>\n<li>Power Down Server<\/li>\n<li>Insert new disk drive on a free IDE bus<\/li>\n<li>Setup new hard disk to be able to used in FreeBSD<br \/>\n <em><br \/>\n bsdlabel -w ad2<br \/>\n newfs ad2<br \/>\n <\/em><\/p>\n<li>Mount new hard disk to be able to copy things onto it<br \/>\n <em><br \/>\n mount \/dev\/ad2 \/mnt\/temp<br \/>\n <\/em>\n <\/li>\n<li>Dump data partition into new hard disk:<br \/>\n <em>( dump -0f &#8211; \/home ) | ( cd \/mnt\/temp ; restore -rf &#8211; )<\/em>\n <\/li>\n<li>Power Down Again<\/li>\n<li>Swap hard drives<\/li>\n<li>Power up again, Done<\/li>\n<\/ol>\n<p> Of course, snags always came up during that process but the main problem for<br \/>\n me is the Power Down phase.  The server is just down for too long during the<br \/>\n dump session for my tastes.  These days things are much easier with mass<br \/>\n storage devices for USB and Firewire.  Just plug one of these babies in<br \/>\n and dump away.  With the faster throughput of USB2.0 or Firewire, the finger<br \/>\n tapping has decreased somewhat. The MAJOR increase in storage capacity has<br \/>\n helped bring back up the wait times that the throughput increase would have<br \/>\n decreased.<br \/>\n <br \/>\n I took my shot at using a USB HDD enclosure on the hard drive and plugging<br \/>\n it into FreeBSD.  In the dmesg I saw a umass0 detected message but according<br \/>\n to the docs you should also be seeing a SCSI direct access drive.\n <\/p>\n<p>\n Example <em>da<\/em> device detection (working case):<br \/>\n <em><br \/>\n umass0: [Manufacturer shows up here]<br \/>\n da0 at umass-sim0 bus 0 target 0 lun 0<br \/>\n da0: Fixed Direct Access SCSI-0 device<br \/>\n da0: XX.000MB\/s transfers<br \/>\n da0: YYYYYYMB (78125000 512 byte sectors: 255H 63S\/T 4863C)<br \/>\n <\/em>\n <\/p>\n<p>\n I saw only the umass0 message.  After scritching my head why I saw no<br \/>\n <em>da0<\/em> for awhile I realized something.<br \/>\n <br \/>\n <em>Support for USB HDD enclosures is heavily device driver dependent<\/em><br \/>\n <br \/>\n aka. you can&#8217;t just buy any generic USB HDD enclosure and expect it to work.<br \/>\n I&#8217;d suggest reading the manpage for the<br \/>\n <a href=\"http:\/\/www.freebsd.org\/cgi\/man.cgi?query=umass&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+5.4-stable&amp;format=html\">umass(4)<\/a><br \/>\n storage driver to ensure you have a compatible USB storage device.  Needless<br \/>\n to say, the HDD enclosure I have (A <a href=\"http:\/\/www.deca-tech.com\">DECA<\/a><br \/>\n SDHC-350) does not seem to be compatible with FreeBSD 5.4-STABLE at this time.\n <\/p>\n<h4>How I fixed it<\/h4>\n<p>\n I swapped to a IEEE1394 HDD enclosure I owned and the HDD came up perfectly<br \/>\n and was detected as da0 on my system.  I then ran through the general backup<br \/>\n steps above to backup my system.\n <\/p>\n<p>\n One thing I should add to the general steps is to create a very &#8216;basic&#8217;<br \/>\n FreeBSD installation on a small BSD slice on the data drive.  With disk<br \/>\n space very cheap these days using up 1gig for a partition that can bootup<br \/>\n a minimal RELEASE or preconfigured setup is awfully handy when your system<br \/>\n drive takes a dive.\n <\/p>\n<h4>References<\/h4>\n<p>\n <a href=\"http:\/\/www.freebsd.org\/cgi\/man.cgi?query=umass&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+5.4-stable&amp;format=html\">FreeBSD umass manpage<\/a><br \/>\n <a href=\"http:\/\/bsdnews.org\/03\/cryptusb.php\">Encrypted Filesystem on a USB Thumbdrive<\/a><br \/>\n <a href=\"http:\/\/community.unixcities.com\/node\/5\">How to move FreeBSD to a new hard disk<\/a><br \/>\n <a href=\"http:\/\/www.linuxquestions.org\/questions\/archive\/17\/2003\/11\/3\/116414\">How can I mount this device: da0<\/a>\n <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I picked up a shiny new 160 gig drive to replace the current drive in the server. The old approach to backup was something like this: General Steps for backing up data partition (Note: not exact steps) Power Down Server Insert new disk drive on a free IDE bus Setup new hard disk to be [&hellip;]<\/p>\n","protected":false},"author":704,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-72","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/72","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/users\/704"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}