From owner-freebsd-usb@FreeBSD.ORG Sun Feb 6 23:48:52 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAA0D106567A for ; Sun, 6 Feb 2011 23:48:52 +0000 (UTC) (envelope-from freebsd_user@guice.ath.cx) Received: from guice.ath.cx (wsip-98-191-59-226.ri.ri.cox.net [98.191.59.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6028FC0A for ; Sun, 6 Feb 2011 23:48:52 +0000 (UTC) Received: from wtp1.ath.cx (localhost [127.0.0.1]) by guice.ath.cx (8.14.4/8.14.4) with ESMTP id p16Nmoo2042594; Sun, 6 Feb 2011 18:48:51 -0500 (EST) (envelope-from freebsd_user@guice.ath.cx) Received: from 98.191.59.226 (SquirrelMail authenticated user email) by wtp1.ath.cx with HTTP; Sun, 6 Feb 2011 18:48:51 -0500 Message-ID: <58f11367517fc6acc039e186d7c24b5c.squirrel@wtp1.ath.cx> Date: Sun, 6 Feb 2011 18:48:51 -0500 From: freebsd_user@guice.ath.cx To: Duane.Hesser@gmail.com User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-usb@freebsd.org Subject: Re: mount and umount large capacity external USB HDD (fstab) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2011 23:48:52 -0000 > On Sat, 29 Jan 2011 18:24:42 -0500 > freebsd_user@guice.ath.cx wrote: >> Hope we are posting to the correct list ... >> We__re using a laptop for our temp mail-server and would like to attach a >> two (2) or three (3) TB external USB HDD for back-up purposes. Would someone be kind enough to point us to a step-by-step article on what needs >> to be entered in the /etc/fstab to allow us to leave the drive connected >> and facilitate auto mount/umount across system reboots; the results Google >> are presenting isn__t sufficient. Perhaps it__s or search terms that aren__t >> on point. >> Thanks. > The following link provides a 'recipe' for using gpart to partition the disk. > http://scratching.psybermonkey.net/2010/06/freebsd-how-to-format-partition.html If you use the '-L' flag to newfs after creating one or more partitions, e.g. > newfs -L "image" daXp1 > This will create a device node in /dev/ufs (/dev/ufs/image). > You may then create fstab entries as usual, but using the label device, e.g. > /dev/ufs/image /usr/image ufs rw 2 2 > Unless you add "noauto" to the options (rw,noauto) the system will fsck and mount the partition on boot. > You can, of course, create several partitions on the disk, using a separate label (-L) for each. > Is this what you needed? Thank you for your prompt reply. This appears to be what we were looking for, however, the gpart method has opened up another list of speed-bumps (so to speak), meaning, while reading about 'gpart' on our fbsd-7.3-P1 system; the command 'gpart show' yields no results. We have shelved the gpart suggestion and will try and do this with itemized commands from the CLI; something that we have never needed to do in the past --first time for everything. (smile) - Currently our USB drive is seen as: da0 at umass-sim0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-4 device da0: 40.000MB/s transfers da0: 2861588MB (732566645 4096 byte sectors: 255H 63S/T 45600C) we are considering using the following: # dd if=/dev/zero of=/dev/da0 bs=1k count=1 # fdisk -BI da0 #Initialize your new disk # bsdlabel -B -w da1s1 auto #Label it. # bsdlabel -e da0s1 # Edit the bsdlabel just created and add any partitions. # mkdir -p /mnt/drv-e # mkdir -p /mnt/drv-f # mkdir -p /mnt/drv-g # mkdir -p /mnt/drv-h # newfs /dev/da0s1e # Repeat this for every partition you created. # newfs /dev/da0s1f # newfs /dev/da0s1g # newfs /dev/da0s1h # mount /dev/da1s1e /mnt/drv-e # Mount the partition(s) # mount /dev/da1s1f /mnt/drv-f # mount /dev/da1s1g /mnt/drv-g # mount /dev/da1s1h /mnt/drv-h - # vi /etc/fstab # Add the appropriate entry/entries to your /etc/fstab. Is our thinking 'sane' when doing the above? Initial example taken/borrowed from the FreeBSD Handbook 18.3.2.1 Using Slices. - - Lastly, we don't fully understand, nor have we found an article or man page that explains (in a way we can understand), how to use the 'bs= ' to the 'dd' command. Within the 'man dd' the examples show 'bs=512' however, in the FreeBSD Handbook 18.3.2.1 Using Slices, they demonstrate dd using 'bs=1k'; we continue to be confused. Should we take this confusion to another list? Thanks in advance ...