Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #241170 > unrolled thread
| Started by | Josef Strýček <josef.strycek@email.cz> |
|---|---|
| First post | 2021-10-11 13:20 +0200 |
| Last post | 2021-10-13 19:50 +0200 |
| Articles | 14 — 6 participants |
Back to article view | Back to linux.debian.user
New debian installation disk partition Josef Strýček <josef.strycek@email.cz> - 2021-10-11 13:20 +0200
Re: New debian installation disk partition "Andrew M.A. Cater" <amacater@einval.com> - 2021-10-11 13:50 +0200
Re: New debian installation disk partition Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-11 14:00 +0200
Re: New debian installation disk partition Andy Smith <andy@strugglers.net> - 2021-10-11 16:20 +0200
Re: New debian installation disk partition David Christensen <dpchrist@holgerdanske.com> - 2021-10-11 21:40 +0200
Re: New debian installation disk partition Joe <joe@jretrading.com> - 2021-10-11 22:20 +0200
Re: New debian installation disk partition David Christensen <dpchrist@holgerdanske.com> - 2021-10-11 23:10 +0200
Re: New debian installation disk partition Joe <joe@jretrading.com> - 2021-10-12 13:10 +0200
Re: New debian installation disk partition Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-11 22:40 +0200
Re: New debian installation disk partition David Christensen <dpchrist@holgerdanske.com> - 2021-10-11 23:00 +0200
Re: New debian installation disk partition Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-12 09:00 +0200
Re: New debian installation disk partition David Christensen <dpchrist@holgerdanske.com> - 2021-10-12 09:10 +0200
Re: New debian installation disk partition Andrei POPESCU <andreimpopescu@gmail.com> - 2021-10-13 06:50 +0200
Re: New debian installation disk partition David Christensen <dpchrist@holgerdanske.com> - 2021-10-13 19:50 +0200
| From | Josef Strýček <josef.strycek@email.cz> |
|---|---|
| Date | 2021-10-11 13:20 +0200 |
| Subject | New debian installation disk partition |
| Message-ID | <D71vz-1xl-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi, I have a question how to partition new debain installation.I have 64GB ssd and 500GB hdd. Can I have / on ssd with ext4 and hdd with btrfs /hame /var /tmp /opt. Could you recommend layout for ssd and hdd, that ssd is not overwritten unnecessarily and ideal filesystem for ssd and hdd. Thank you in advance Josef Strýček
[toc] | [next] | [standalone]
| From | "Andrew M.A. Cater" <amacater@einval.com> |
|---|---|
| Date | 2021-10-11 13:50 +0200 |
| Message-ID | <D71YB-1Hx-1@gated-at.bofh.it> |
| In reply to | #241170 |
On Mon, Oct 11, 2021 at 01:18:55PM +0200, Josef Strýček wrote: > > Hi, > > I have a question how to partition new debain installation.I have 64GB ssd > and 500GB hdd. Can I have / on ssd with ext4 and hdd with btrfs /hame /var > > /tmp /opt. Could you recommend layout for ssd and hdd, that ssd is not > overwritten unnecessarily and ideal filesystem for ssd and hdd. > > > > > Thank you in advance > > Josef Strýček Hi Josef, I'd suggest you boot with the installer and use expert mode which will allow you more control over partitioning. Take the ssd and use guided partitioning - put everything in one partition. That will set up the appropriate partitions for booting, for / and add a swap partition at the end of 1G size. Partition the 500G hdd however you wish - add a partition for /var and /tmp. What sort of thing are you planning for /opt - it's not often used in Debian but only for third party packages. Nothing is written on the filesystems until you finish the partitioning on each disk. With every good wish, as ever, Andy Cater
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2021-10-11 14:00 +0200 |
| Message-ID | <D728h-1KZ-1@gated-at.bofh.it> |
| In reply to | #241170 |
[Multipart message — attachments visible in raw view] — view raw
On Lu, 11 oct 21, 13:18:55, Josef Strýček wrote: > > Hi, > > I have a question how to partition new debain installation.I have 64GB ssd > and 500GB hdd. Can I have / on ssd with ext4 and hdd with btrfs /hame /var > > /tmp /opt. Sure you can. > Could you recommend layout for ssd and hdd, that ssd is not > overwritten unnecessarily My recommendation would be to have only /home on the HDD, unless you expect the others to become too big for the SSD. For regular use[1] the SSD should be just fine, and you should already have a good strategy to restore your operating system quickly if needed. If your SSD fails too soon it wasn't worth it anyway and hopefully you can still replace it in warranty ;) > and ideal filesystem for ssd and hdd. There is no such thing as "ideal", it depends very much on your needs. In almost all cases ext4 will be just fine for general use. You are unlikely to notice any significant improvement with other file systems unless you have very special[1] needs. Since you mentioned btrfs, do you actually need any of its additional features compared to ext4? With only one HDD its benefits will be limited (snapshots and subvolumes only?) while increasing complexity. See also: https://arstechnica.com/gadgets/2021/09/examining-btrfs-linuxs-perpetually-half-finished-filesystem/ [1] You would know if your use is special ;) Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2021-10-11 16:20 +0200 |
| Message-ID | <D74jM-3ko-3@gated-at.bofh.it> |
| In reply to | #241170 |
Hi Josef, On Mon, Oct 11, 2021 at 01:18:55PM +0200, Josef Strýček wrote: > I have a question how to partition new debain installation.I have 64GB ssd > and 500GB hdd. Can I have / on ssd with ext4 and hdd with btrfs /hame /var Of course. > /tmp /opt. Could you recommend layout for ssd and hdd, that ssd is not > overwritten unnecessarily and ideal filesystem for ssd and hdd. You've asked questions which are largely down to taste so you will get a lot of different answers. I would use "manual layout" in the installer to ensure I got exactly what I wanted. I would use whatever filesystems I wanted and not care about SSD writes unless it's an ancient SSD or a truly exceptional use case. For most uses /tmp is best left as a tmpfs (memory-backed) and /opt starts off empty. If you think you're going to use /opt then you must have some idea what you're going to put into it. I would put a 1G or so swap partition on HDD and then dedicate whole rest of the HDD to either btrfs or to LVM, in both cases for the purposes of volume management. That way if your initial guesses for sizing are incorrect you can easily change them and/or switch things into btrfs subvolumes or LVM logical volumes later on. But to be honest, SSD is life changing compared to HDD so I'd want to put everything on SSD as long as it fits. I am a big lover of redundancy so the lack of matched pairs of storage worries me, but assuming that can't be changed I think I would use say the first 5GiB of SSD for / and then the rest as either btrfs or LVM again for volume management. I'd then create subvolumes or logical volumes for /home and /var and initially have them on the SSD for speed. I'd move them into the btrfs/LVM on the HDD only if you began to run out of SSD space. Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2021-10-11 21:40 +0200 |
| Message-ID | <D79js-6gX-17@gated-at.bofh.it> |
| In reply to | #241170 |
On 10/11/21 04:18, Josef Strýček wrote:
>
> Hi,
>
> I have a question how to partition new debain installation.I have 64GB ssd
> and 500GB hdd. Can I have / on ssd with ext4 and hdd with btrfs /hame /var
>
> /tmp /opt.
You should be able to achieve that layout with the Debian installer
(d-i) by choosing "Partitioning method" -> "manual".
I ran btrfs for a few years, but did not understand the maintenance
requirements. Over time, the disks became slow and slower. Eventually,
I had to learn about btrfs balancing, write Perl script to perform it,
and run the script repeatedly to recover and maintain the disks.
Eventually, I got lazy and reinstalled using ext4.
> Could you recommend layout for ssd and hdd, that ssd is not
> overwritten unnecessarily and ideal filesystem for ssd and hdd.
When SSD's first came out, there was a lot of fuss about minimizing wear
and maximizing performance -- disabling swap, over-provisioning, trim,
etc.. Since then, SSD's have improved and operating systems have become
better at using SSD's. So, I would not worry about Debian wearing out
the SSD; just run d-i and let it do the work. Once the system is in
operation, some people like to run fstrim(8) periodically (e.g. monthly,
weekly).
A key idea that still applies is that your OS and applications should be
on one disk and your data should be on another disk. I use SSD's for OS
disks (including /home) and I keep the vast majority of my data in a
file server (Samba) on HDD's in a ZFS mirror.
A killer feature of d-i is that it can build OS disks with encryption.
But, a plaintext "/boot" partition is required to boot the computer.
I prefer to keep my OS images small enough to fit onto "16 GB" devices.
This facilitates imaging, cloning, and disaster preparedness. I can
save 3 monthly images for 6 computers on a 300 GB USB HDD. But, there
is only one active user account on each machine, I must limit how much
software I install, I must detach e-mail attachments and save them on
the server, and I must keep my home directory usage at a minimum.
Here are my disk partitioning notes from when I installed my Debian 10
daily driver:
Partitioning method manual
Encrypted volume (sda2_crypt) - 1.0 GB Linux device-mapper
(crypt)
#1 1.0 GB f swap swap
Encrypted volume (sda3_crypt) - 13.0 GB Linux device-mapper
(crypt)
#1 13.0 GB f ext4 /
SCSI5 (0,0,0) (sda) - 60.0 GB ATA INTEL SSDSC2CW06
#1 primary 999.3 MB B F ext4 /boot
#2 primary 1.0 GB K crypto (sda2_crypt)
#3 primary 13.0 GB K crypto (sda3_crypt)
45.0 GB FREESPACE
Finish partitioning and write changes to disk
Notes:
1. I am using MBR partitioning, because some of my computers are 14
years old and MBR is the lowest common denominator. I can build a
Debian OS disk in one computer and then move the disk (or image) to
another computer. (The partition scheme chosen by the d-i is determined
by the firmware mode of the computer running d-i -- e.g. BIOS -> MBR,
EUFI -> GPT.)
2. Partition #1 is 1 GB, plaintext ext4 /boot
3. Partition #2 is 1 GB, encrypted swap (random key)
4. Partition #3 is 13 GB, encrypted ext4 root (passphrase)
I suggest that you disconnect the HDD (both power and data cables) and
install Debian onto the SSD similar to the above. It is best if the SSD
has device node /dev/sda. You may want a larger root partition. It is
important to have a swap partition; do not eliminate it.
Once Debian is running, I suggest that you connect the HDD, partition
the HDD using GPT, create one partition using 95% of available space,
initialize a LUKS container inside the partition, and create a ZFS pool
with name "data" and with option "copies=2" using the encrypted mapper
node. The zpool will be mounted at "/data", will be able to store ~237
GB, and ZFS will be able to survive "one or a few" sectors going bad
without any data loss (it is wise to scrub periodically).
David
[toc] | [prev] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2021-10-11 22:20 +0200 |
| Message-ID | <D79W9-6Je-3@gated-at.bofh.it> |
| In reply to | #241205 |
On Mon, 11 Oct 2021 12:29:48 -0700 David Christensen <dpchrist@holgerdanske.com> wrote: > I must detach > e-mail attachments and save them on the server You could run an IMAP server on your server, set up an account in your email client with a suitable directory structure and drag and drop old email into archives, complete with attachments, so everything remains online. Many email clients can do this fairly automatically. It's easier still if you run a full MTA on the server, and don't use local email accounts at all, but many people don't want the (very minimal) maintenance needs. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2021-10-11 23:10 +0200 |
| Message-ID | <D7aIx-7eB-1@gated-at.bofh.it> |
| In reply to | #241207 |
On 10/11/21 13:13, Joe wrote: > On Mon, 11 Oct 2021 12:29:48 -0700 > David Christensen <dpchrist@holgerdanske.com> wrote: > > >> I must detach e-mail attachments and save them on the server > > You could run an IMAP server on your server, set up an account in your > email client with a suitable directory structure and drag and drop old > email into archives, complete with attachments, so everything remains > online. Many email clients can do this fairly automatically. > > It's easier still if you run a full MTA on the server, and don't use > local email accounts at all, but many people don't want the (very > minimal) maintenance needs. I hosted WWW and NWN servers at my home many years ago. Bad idea. I have domain hosting through he.net, and prefer their professionally managed e-mail. Yes, detaching can get tedious, but I am wary of attempting to automate such and it's not a huge burden. David
[toc] | [prev] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2021-10-12 13:10 +0200 |
| Message-ID | <D7nPs-7rf-5@gated-at.bofh.it> |
| In reply to | #241210 |
On Mon, 11 Oct 2021 14:03:50 -0700 David Christensen <dpchrist@holgerdanske.com> wrote: > On 10/11/21 13:13, Joe wrote: > > On Mon, 11 Oct 2021 12:29:48 -0700 > > David Christensen <dpchrist@holgerdanske.com> wrote: > > > > > >> I must detach e-mail attachments and save them on the server > > > > You could run an IMAP server on your server, set up an account in > > your email client with a suitable directory structure and drag and > > drop old email into archives, complete with attachments, so > > everything remains online. Many email clients can do this fairly > > automatically. > > > > It's easier still if you run a full MTA on the server, and don't use > > local email accounts at all, but many people don't want the (very > > minimal) maintenance needs. > > > I hosted WWW and NWN servers at my home many years ago. Bad idea. > > > I have domain hosting through he.net, and prefer their professionally > managed e-mail. > > Yes, I would never consider running a public web server, I know just enough about web security to know that I don't know anything like enough to keep it secure. But I don't expose the IMAP server, either, it's internal only. I get to it by ssh or vpn while away from home. It's less convenient, but less to worry about. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2021-10-11 22:40 +0200 |
| Message-ID | <D7afw-6PE-15@gated-at.bofh.it> |
| In reply to | #241205 |
[Multipart message — attachments visible in raw view] — view raw
On Lu, 11 oct 21, 12:29:48, David Christensen wrote: > > Once Debian is running, I suggest that you connect the HDD, partition the > HDD using GPT, create one partition using 95% of available space, initialize > a LUKS container inside the partition, and create a ZFS pool with name > "data" and with option "copies=2" using the encrypted mapper node. The > zpool will be mounted at "/data", will be able to store ~237 GB, and ZFS > will be able to survive "one or a few" sectors going bad without any data > loss (it is wise to scrub periodically). ZFS has native encryption now, any particular reason to prefer using a LUKS container instead? Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2021-10-11 23:00 +0200 |
| Message-ID | <D7ayR-6W7-1@gated-at.bofh.it> |
| In reply to | #241208 |
On 10/11/21 13:39, Andrei POPESCU wrote: > On Lu, 11 oct 21, 12:29:48, David Christensen wrote: >> >> Once Debian is running, I suggest that you connect the HDD, partition the >> HDD using GPT, create one partition using 95% of available space, initialize >> a LUKS container inside the partition, and create a ZFS pool with name >> "data" and with option "copies=2" using the encrypted mapper node. The >> zpool will be mounted at "/data", will be able to store ~237 GB, and ZFS >> will be able to survive "one or a few" sectors going bad without any data >> loss (it is wise to scrub periodically). > > ZFS has native encryption now, any particular reason to prefer using a > LUKS container instead? I use LUKS because ZFS native encryption was not available OOTB the last time I looked on Debian. What version of d-i has ZFS native encryption? David
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2021-10-12 09:00 +0200 |
| Message-ID | <D7jVv-4H0-1@gated-at.bofh.it> |
| In reply to | #241209 |
[Multipart message — attachments visible in raw view] — view raw
On Lu, 11 oct 21, 13:56:28, David Christensen wrote: > On 10/11/21 13:39, Andrei POPESCU wrote: > > On Lu, 11 oct 21, 12:29:48, David Christensen wrote: > > > > > > Once Debian is running, I suggest that you connect the HDD, partition the > > > HDD using GPT, create one partition using 95% of available space, initialize > > > a LUKS container inside the partition, and create a ZFS pool with name > > > "data" and with option "copies=2" using the encrypted mapper node. The > > > zpool will be mounted at "/data", will be able to store ~237 GB, and ZFS > > > will be able to survive "one or a few" sectors going bad without any data > > > loss (it is wise to scrub periodically). > > > > ZFS has native encryption now, any particular reason to prefer using a > > LUKS container instead? > > I use LUKS because ZFS native encryption was not available OOTB the last > time I looked on Debian. What version of d-i has ZFS native encryption? I wasn't aware of any kind of support for ZFS in d-i. The Debian ZFS wiki page doesn't mention root-on-ZFS at all and the official upstream instructions (for buster) are using debootstrap from a live image for installation. https://wiki.debian.org/ZFS https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2021-10-12 09:10 +0200 |
| Message-ID | <D7k5b-502-1@gated-at.bofh.it> |
| In reply to | #241233 |
On 10/11/21 23:58, Andrei POPESCU wrote: > On Lu, 11 oct 21, 13:56:28, David Christensen wrote: >> On 10/11/21 13:39, Andrei POPESCU wrote: >>> ZFS has native encryption now, any particular reason to prefer using a >>> LUKS container instead? >> >> I use LUKS because ZFS native encryption was not available OOTB the last >> time I looked on Debian. What version of d-i has ZFS native encryption? > > I wasn't aware of any kind of support for ZFS in d-i. <snip> If d-i does not have native support for ZFS encryption, then when I break my computer I will be unable to use the d-i media to access my disk(s). Therefore, I prefer a LUKS container. David
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2021-10-13 06:50 +0200 |
| Message-ID | <D7Enf-Np-1@gated-at.bofh.it> |
| In reply to | #241234 |
[Multipart message — attachments visible in raw view] — view raw
On Ma, 12 oct 21, 00:02:50, David Christensen wrote: > On 10/11/21 23:58, Andrei POPESCU wrote: > > On Lu, 11 oct 21, 13:56:28, David Christensen wrote: > > > On 10/11/21 13:39, Andrei POPESCU wrote: > > > > > ZFS has native encryption now, any particular reason to prefer using a > > > > LUKS container instead? > > > > > > I use LUKS because ZFS native encryption was not available OOTB the last > > > time I looked on Debian. What version of d-i has ZFS native encryption? > > > > I wasn't aware of any kind of support for ZFS in d-i. > > If d-i does not have native support for ZFS encryption, then when I break my > computer I will be unable to use the d-i media to access my disk(s). The Debian Installer doesn't have support for ZFS at all, so it's use to rescue for root-on-ZFS systems is limited, at best, regardless of the encryption. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | David Christensen <dpchrist@holgerdanske.com> |
|---|---|
| Date | 2021-10-13 19:50 +0200 |
| Message-ID | <D7Qy6-gc-17@gated-at.bofh.it> |
| In reply to | #241261 |
On 10/12/21 21:47, Andrei POPESCU wrote: > On Ma, 12 oct 21, 00:02:50, David Christensen wrote: >> On 10/11/21 23:58, Andrei POPESCU wrote: >>> On Lu, 11 oct 21, 13:56:28, David Christensen wrote: >>>> On 10/11/21 13:39, Andrei POPESCU wrote: >> >>>>> ZFS has native encryption now, any particular reason to prefer using a >>>>> LUKS container instead? >>>> >>>> I use LUKS because ZFS native encryption was not available OOTB the last >>>> time I looked on Debian. What version of d-i has ZFS native encryption? >>> >>> I wasn't aware of any kind of support for ZFS in d-i. >> >> If d-i does not have native support for ZFS encryption, then when I break my >> computer I will be unable to use the d-i media to access my disk(s). > > The Debian Installer doesn't have support for ZFS at all, so it's use to > rescue for root-on-ZFS systems is limited, at best, regardless of the > encryption. AFAIK d-i as of version 10 does not support ZFS in any way, so I do not use ZFS on Debian. David
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web