From owner-freebsd-questions@FreeBSD.ORG Sun Sep 5 08:14:08 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E51A310656B3 for ; Sun, 5 Sep 2010 08:14:07 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 4E0468FC0C for ; Sun, 5 Sep 2010 08:14:07 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o858Da2g014209 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 5 Sep 2010 09:13:38 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4C835129.3000106@infracaninophile.co.uk> Date: Sun, 05 Sep 2010 09:13:29 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: zaxis References: <29625711.post@talk.nabble.com> In-Reply-To: <29625711.post@talk.nabble.com> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFF26CED7DDAC446C41FB3697" X-Virus-Scanned: clamav-milter 0.96.2 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_40,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Can i use tmpfs to mount /tmp ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2010 08:14:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFF26CED7DDAC446C41FB3697 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/09/2010 07:09:50, zaxis wrote: > The /dev/ad4s3e is used for /tmp. Now i want to use tmpfs instead of uf= s as > below > none /tmp tmpfs size=3D64M,nodev,nosuid,noexec 0 0 >=20 > If i can, then how to reuse the space of /dev/ad4s3e ? There are two choices. Either mount your ad4s3e partition somewhere else as a regular filesystem -- you can move the mount point simply by unmounting it, editing fstab and then mounting the new partition. Do that before mounting your new tmpfs based /tmp, or you'll block access to the whole filesystem on ad4s3e. Oh, and 'chmod 755 /new/mountpoint' after you move it -- you don't want the /tmp defaults of mode 1777 on a normal filesystem. Or amalgamate the ad4s3e partition with one of the partitions neighbouring it on the drive. Use bsdlabel(8) to examine and modify the disk-level layout. If you join ad4s3e on to the end of the preceeding partition, you can use growfs(8) to expand that partition into the extra space. Otherwise you'll have to newfs(8) the expanded partition and recover the contents from backup. Either way, this sort of partition wrangling operation involves low-level fiddling in the guts of the OS and an enhanced potential for things to go horribly wrong, so make sure you've got good backups and spend some time planning exactly what you are going to do, even down to the extent of writing out all the commands you'll need beforehand. Cheers, Matthew PS. 64MB is pretty small for a /tmp -- you might want to increase the size of your tmpfs. --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigFF26CED7DDAC446C41FB3697 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyDUTAACgkQ8Mjk52CukIxbLwCbBpBoMf0NkwxiP+PCOdvkPEEy zhwAoI5TInIwyhjRnr/YitWExkqPovW+ =FODx -----END PGP SIGNATURE----- --------------enigFF26CED7DDAC446C41FB3697--