From owner-freebsd-questions@freebsd.org Tue Sep 15 22:26:11 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 082C23E2260 for ; Tue, 15 Sep 2020 22:26:11 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Brd9Y2Y3nz3Wt7 for ; Tue, 15 Sep 2020 22:26:09 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([188.102.106.178]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1MuUrM-1kafIS1gXa-00rWwa; Wed, 16 Sep 2020 00:26:06 +0200 Date: Wed, 16 Sep 2020 00:26:06 +0200 From: Polytropon To: Marwan Sultan Cc: FreeBSD Questions Subject: Re: partitioning server with 2 hard drives Message-Id: <20200916002606.52725f1d.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:0lzPF6UGtNhUktwWopeu3n6N+6TZPX68FS0pSmRrjuj8mv2s4F5 KXchQ4sUMZQPWO5lwr1Jsy1AOFaV+5Ypv/PEEgtZfjh3O4yCevAY6Pqh7kp90o9ZCHJvnWS UQ96G9S+1mLR2K96zfqYF4wL2pI/xWm1FjUOa+tRaM0lwfYef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: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 217.72.192.73) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [2.60 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.008]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[hotmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[188.102.106.178:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.31)[-0.314]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.52)[0.520]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[217.72.192.73:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[217.72.192.73:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2020 22:26:11 -0000 On Tue, 15 Sep 2020 21:34:35 +0000, Marwan Sultan wrote: > Good day/Evening for all FreeBSDers 🙂 > > I want to install latest FreeBSD for a business server > erver with the following specification. : > Intel Xeon E3-1240 v5 3.5GHz > Hardware RAID Controller 1 GB Cache with BBU > 16 GB DDR4 RAM - Total > 1 TB 7200 SATA > 1 TB 7200 SATA > > I understand its advised to create it in this order and SWAP double > (or triple) of the RAM (is 50 GB ok) ? That has been true in the past, even though the suggestion was "use 2 x the maximum of RAM the machine can be equipped with". While you should definitely have a swap space today, just in case, the size of it depends on your expected workload RAM requirements vs. the installed RAM. From your description, something like 16 GB or even 32 GB should be okay. It's just convenient that _if_ swap should be needed, it's there. > / > swap > var > /tmp > /usr What about /home? :-) While the idea of "functional partitioning" might not be relevant on desktop systems, it can have advantages on a server. Especially making /tmp (and probably /var, due to /var/log and /var/tmp) an own partition could save you in case of a "runaway writer", i. e., a program that keeps writing to disk until it's full. For /tmp, as well as any partition where user-controlled files can be placed, it has been correctly suggested to use specific mount options such as "noexec" and "nosuid". You can immediately see the advantage of such per-partition settings. ;-) Also the ability to use dump and restore for per-partition backup and restore might be quite useful. > Questions : > > 1. Would you kindly advise what is the best partitioning scheme > on 2 hard drives? Depends on what kinds of applications you want to run on that server, and if you want to use those drives in some kind of RAID setting, such as mirroring or striping. If not, a possible solution could be to use one disk for /, swap, /var, /tmp, /usr - to store the OS and the user programs, and the other disk for /home or any other user-supplied data (such as databases). However, that is just _one_ possibilities. What is best for you depends on what you intend to do with the system. > 2. in FreeBSD handbook says i would better create swap on both > partitions? may someone advise HOW and WHY ? This is possible, but is not required. Especially on systems that tend to actually use swap, this could be an advantage. It could be for speed advantages, that's the WHY. And the HOW is no different from a one-disk system. It's just a second device in /etc/fstab that is activated by the "swapon" command during automatic system startup. See "man 8 swapctl" and "man 8 swapinfo" for details. > I'm a little confused because of the 2 hard drives. No need to. There are many approaches that work. Which one is useful for you depends on your expected usage. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...