From owner-freebsd-questions@FreeBSD.ORG Mon Sep 6 00:17:22 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 5EF5310656E0 for ; Mon, 6 Sep 2010 00:17:22 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 2EEA48FC12 for ; Mon, 6 Sep 2010 00:17:21 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OsPOj-0003w2-FU for freebsd-questions@freebsd.org; Sun, 05 Sep 2010 17:17:21 -0700 Message-ID: <29627883.post@talk.nabble.com> Date: Sun, 5 Sep 2010 17:17:21 -0700 (PDT) From: zaxis To: freebsd-questions@freebsd.org In-Reply-To: <4C835129.3000106@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: z_axis@163.com References: <29625711.post@talk.nabble.com> <4C835129.3000106@infracaninophile.co.uk> 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: Mon, 06 Sep 2010 00:17:22 -0000 thanks for your suggestion! >df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad4s3a 496M 119M 337M 26% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad4s3e 496M 18M 438M 4% /tmp /dev/ad4s3f 14G 4.8G 8.4G 37% /usr /dev/ad4s3d 1.4G 178M 1.1G 14% /var /dev/ad4s7 30G 3.6G 26G 12% /media/F /dev/ad4s8 30G 4.1G 24G 15% /media/G The /dev/ad4s3e is just 496M. so it is not worth for me to modify the disk-level layout. Matthew Seaman-2 wrote: >=20 > On 05/09/2010 07:09:50, zaxis wrote: >> The /dev/ad4s3e is used for /tmp. Now i want to use tmpfs instead of ufs >> 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 ? >=20 > There are two choices. >=20 > 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. >=20 > 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. >=20 > =09Cheers, >=20 > =09Matthew >=20 > PS. 64MB is pretty small for a /tmp -- you might want to increase the > size of your tmpfs. >=20 > --=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 >=20 >=20 > =20 >=20 ----- e^(=CF=80=E2=8B=85i) + 1 =3D 0 --=20 View this message in context: http://old.nabble.com/Can-i-use-tmpfs-to-moun= t--tmp---tp29625711p29627883.html Sent from the freebsd-questions mailing list archive at Nabble.com.