* What is the best way to set up RAID-1 on new Ubuntu install
@ 2025-09-03 21:04 Jeffery Small
2025-09-03 21:32 ` Wol
2025-09-04 7:41 ` Adam Niescierowicz
0 siblings, 2 replies; 10+ messages in thread
From: Jeffery Small @ 2025-09-03 21:04 UTC (permalink / raw)
To: linux-raid
I will be installing Xubuntu 24.04.3 on a newly built system having two
4TB Samsung M.2 SSDs which will be mirrored using RAID-1. My question is
what is the better way to set up the mirror. I'll have 128GB of RAM and
will be using a swapfile after installation.
Method #1: After the UEFI partition is created on both disks, create GPT
/boot, / and /home partitions on each SSD and then create
three separate mirrors:
md0: /boot
md1: /
md2: /home
Method #2: After the UEFI partition is created on both disks, mirror md0
using the rest of the free space. Then create GPT partitions
directly on the mirror:
md0p1: /boot
md0p2: /
md0p3: /home
This will be a straightforward desktop workstation, with no encryption or
support for multiple OS installs. Are there advantages or possible pitfalls
with either approach?
I'm also considering eliminating the boot and home partitions and just
using a single root partition which feels strange after using UNIX for over
40 years. From a raid perspective does this also have advantages/pitfalls?
Thanks.
--
Jeffery Small
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-03 21:04 What is the best way to set up RAID-1 on new Ubuntu install Jeffery Small @ 2025-09-03 21:32 ` Wol 2025-09-04 4:54 ` Jeffery Small 2025-09-04 7:41 ` Adam Niescierowicz 1 sibling, 1 reply; 10+ messages in thread From: Wol @ 2025-09-03 21:32 UTC (permalink / raw) To: Jeffery Small, Linux RAID On 03/09/2025 22:04, Jeffery Small wrote: > I will be installing Xubuntu 24.04.3 on a newly built system having two > 4TB Samsung M.2 SSDs which will be mirrored using RAID-1. My question is > what is the better way to set up the mirror. I'll have 128GB of RAM and > will be using a swapfile after installation. > > Method #1: After the UEFI partition is created on both disks, create GPT > /boot, / and /home partitions on each SSD and then create > three separate mirrors: > > md0: /boot > > md1: / > > md2: /home > > Method #2: After the UEFI partition is created on both disks, mirror md0 > using the rest of the free space. Then create GPT partitions > directly on the mirror: > > md0p1: /boot > > md0p2: / > > md0p3: /home > > This will be a straightforward desktop workstation, with no encryption or > support for multiple OS installs. Are there advantages or possible pitfalls > with either approach? > > I'm also considering eliminating the boot and home partitions and just > using a single root partition which feels strange after using UNIX for over > 40 years. From a raid perspective does this also have advantages/pitfalls? > DON'T mirror /boot. Unless you use 0.9 layout. It just makes setting up the boot more complicated. If anything goes wrong, 0.9 allows you to boot with no raid support. 128GB of ram? Why bother with a swapfile? Okay, I would create two 128GB swap partitions and set them equal priority, but that's me. And what are you doing about /var? Does it really belong in the / partition? With a 4TB setup, especially with a workstation, combining /, /var. and /home might be a sensible option. As I say, keep /boot out of it, but a single 3.5TB partition for everything else makes a lot of sense. How likely are you to run out of disk space? Highly unlikely? Then go for it! Remember most of the advice about Unix partitioning stems from the fact that K&R or T or whoever it was created the initial partitioning scheme simply because they were running out of space on a (by today's standards) tiny disk drive. Why stick with what they were forced to do? Cheers, Wol ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-03 21:32 ` Wol @ 2025-09-04 4:54 ` Jeffery Small 2025-09-04 22:55 ` Wol 0 siblings, 1 reply; 10+ messages in thread From: Jeffery Small @ 2025-09-04 4:54 UTC (permalink / raw) To: linux-raid Wol <antlists@youngman.org.uk> writes: >On 03/09/2025 22:04, Jeffery Small wrote: >> I will be installing Xubuntu 24.04.3 on a newly built system having two >> 4TB Samsung M.2 SSDs which will be mirrored using RAID-1. My question is >> what is the better way to set up the mirror. I'll have 128GB of RAM and >> will be using a swapfile after installation. >> >> Method #1: After the UEFI partition is created on both disks, create GPT >> /boot, / and /home partitions on each SSD and then create >> three separate mirrors: >> >> md0: /boot >> >> md1: / >> >> md2: /home >> >> Method #2: After the UEFI partition is created on both disks, mirror md0 >> using the rest of the free space. Then create GPT partitions >> directly on the mirror: >> >> md0p1: /boot >> >> md0p2: / >> >> md0p3: /home >> >> This will be a straightforward desktop workstation, with no encryption or >> support for multiple OS installs. Are there advantages or possible pitfalls >> with either approach? >> >> I'm also considering eliminating the boot and home partitions and just >> using a single root partition which feels strange after using UNIX for over >> 40 years. From a raid perspective does this also have advantages/pitfalls? >> >DON'T mirror /boot. Unless you use 0.9 layout. It just makes setting up >the boot more complicated. If anything goes wrong, 0.9 allows you to >boot with no raid support. >128GB of ram? Why bother with a swapfile? Okay, I would create two 128GB >swap partitions and set them equal priority, but that's me. >And what are you doing about /var? Does it really belong in the / partition? >With a 4TB setup, especially with a workstation, combining /, /var. and >/home might be a sensible option. As I say, keep /boot out of it, but a >single 3.5TB partition for everything else makes a lot of sense. How >likely are you to run out of disk space? Highly unlikely? Then go for >it! Remember most of the advice about Unix partitioning stems from the >fact that K&R or T or whoever it was created the initial partitioning >scheme simply because they were running out of space on a (by today's >standards) tiny disk drive. Why stick with what they were forced to do? >Cheers, >Wol Wol, thanks for the reply. What is a 0.9 layout? I've never heard of that before. I'm confused about why to not mirror the boot partition. Other articles I've read on the subject suggest doing this. What is the problem? Now maybe we are having a communication problem mixing up the initial UEFI partition (mounted at /boot/efi) which does get set up on each SSD independently and is definitely NOT mirrored, and the actual boot partition (mounted as /boot) which is where GRUB and kernel are installed. If I made one big mirrored / partition, /boot could just be included along with everything else. As I say, I'm just trying to avoid future problem from something that I didn't anticipate from the start. Regards, -- Jeff ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-04 4:54 ` Jeffery Small @ 2025-09-04 22:55 ` Wol 2025-09-05 3:12 ` Reindl Harald 2025-09-05 6:03 ` Pascal Hambourg 0 siblings, 2 replies; 10+ messages in thread From: Wol @ 2025-09-04 22:55 UTC (permalink / raw) To: Jeffery Small, Linux RAID On 04/09/2025 05:54, Jeffery Small wrote: > Wol, thanks for the reply. What is a 0.9 layout? I've never heard of > that before. 0.9 is an old layout. You'll notice that when raid details are posted it normally says "raid 1.2 format", which is the layout. All the raid 1.x formats have identical superblock format, the difference between the 1.0, 1.1 and 1.2 formats is simply the location of the superblock. And it's always somewhere at the start of the partition. 0.9 is the old-style format. And it's placed at the end of the partition. So if the raid gets trashed somehow, because the filesystem starts at the start of the partition you can mount it directly if you have to. > I'm confused about why to not mirror the boot partition. > Other articles I've read on the subject suggest doing this. What is the > problem? > I'm just thinking that if you do have boot trouble, this makes it easier to access your boot partition (which should be effectively read only almost all time), and might make recovering your system easier. > Now maybe we are having a communication problem mixing up the initial > UEFI partition (mounted at /boot/efi) which does get set up on each SSD > independently and is definitely NOT mirrored, and the actual boot partition > (mounted as /boot) which is where GRUB and kernel are installed. If I > made one big mirrored / partition, /boot could just be included along with > everything else. > Possibly. I've not got to grips with UEFI - I learnt most of my boot-fu back in the days of lilo :-) > As I say, I'm just trying to avoid future problem from something that I > didn't anticipate from the start. > Cheers, Wol ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-04 22:55 ` Wol @ 2025-09-05 3:12 ` Reindl Harald 2025-09-05 4:40 ` Jeffery Small 2025-09-06 2:16 ` Dragan Milivojević 2025-09-05 6:03 ` Pascal Hambourg 1 sibling, 2 replies; 10+ messages in thread From: Reindl Harald @ 2025-09-05 3:12 UTC (permalink / raw) To: Wol, Jeffery Small, Linux RAID Am 05.09.25 um 00:55 schrieb Wol: >> Now maybe we are having a communication problem mixing up the initial >> UEFI partition (mounted at /boot/efi) which does get set up on each SSD >> independently and is definitely NOT mirrored, and the actual boot >> partition >> (mounted as /boot) which is where GRUB and kernel are installed. If I >> made one big mirrored / partition, /boot could just be included along >> with >> everything else. >> > Possibly. I've not got to grips with UEFI - I learnt most of my boot-fu > back in the days of lilo :-) the UEFI partition must be FAT and can't be a RAID partition becaus eof the limitations of UEFI ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-05 3:12 ` Reindl Harald @ 2025-09-05 4:40 ` Jeffery Small 2025-09-06 2:16 ` Dragan Milivojević 1 sibling, 0 replies; 10+ messages in thread From: Jeffery Small @ 2025-09-05 4:40 UTC (permalink / raw) To: linux-raid Reindl Harald <h.reindl@thelounge.net> writes: >the UEFI partition must be FAT and can't be a RAID partition becaus eof >the limitations of UEFI Good point. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-05 3:12 ` Reindl Harald 2025-09-05 4:40 ` Jeffery Small @ 2025-09-06 2:16 ` Dragan Milivojević 1 sibling, 0 replies; 10+ messages in thread From: Dragan Milivojević @ 2025-09-06 2:16 UTC (permalink / raw) To: linux-raid > the UEFI partition must be FAT and can't be a RAID partition becaus eof > the limitations of UEFI 3rd attempt, let's see if this one gets through. It can, at least on RHEL and derivatives. From my notes: mdadm --verbose --create --assume-clean /dev/md/r1_efi --name=r1_efi --level=1 --metadata=1.0 --raid-devices=7 /dev/nvme[0,2-3,5-8]n1p1 You have to select "EFI file system" for the file system in the installation and that was it. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-04 22:55 ` Wol 2025-09-05 3:12 ` Reindl Harald @ 2025-09-05 6:03 ` Pascal Hambourg 1 sibling, 0 replies; 10+ messages in thread From: Pascal Hambourg @ 2025-09-05 6:03 UTC (permalink / raw) To: Wol, Linux RAID On 05/09/2025 at 00:55, Wol wrote: > > 0.9 is an old layout. You could say "obsolete". > the difference between the > 1.0, 1.1 and 1.2 formats is simply the location of the superblock. And > it's always somewhere at the start of the partition. No, 1.0 superblock is at the end. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-03 21:04 What is the best way to set up RAID-1 on new Ubuntu install Jeffery Small 2025-09-03 21:32 ` Wol @ 2025-09-04 7:41 ` Adam Niescierowicz 2025-09-04 9:22 ` Michael Reinelt 1 sibling, 1 reply; 10+ messages in thread From: Adam Niescierowicz @ 2025-09-04 7:41 UTC (permalink / raw) To: Jeffery Small, linux-raid [-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --] W dniu 3.09.2025 o 23:04, Jeffery Small pisze: > I will be installing Xubuntu 24.04.3 on a newly built system having two > 4TB Samsung M.2 SSDs which will be mirrored using RAID-1. My question is > what is the better way to set up the mirror. I'll have 128GB of RAM and > will be using a swapfile after installation. > > Method #1: After the UEFI partition is created on both disks, create GPT > /boot, / and /home partitions on each SSD and then create > three separate mirrors: > > md0: /boot > > md1: / > > md2: /home > > Method #2: After the UEFI partition is created on both disks, mirror md0 > using the rest of the free space. Then create GPT partitions > directly on the mirror: > > md0p1: /boot > > md0p2: / > > md0p3: /home > > This will be a straightforward desktop workstation, with no encryption or > support for multiple OS installs. Are there advantages or possible pitfalls > with either approach? > > I'm also considering eliminating the boot and home partitions and just > using a single root partition which feels strange after using UNIX for over > 40 years. From a raid perspective does this also have advantages/pitfalls? > > Thanks. > -- > Jeffery Small What about: sda1 and sdb1 for EFI no raid sda2 and sdb2 RAID-10 with -f2 option (diffrent offset that gives double speed of read and single speed of write) md0: LVM and on top of LVM you can create partitions with XFS filesystem. XFS allows you to realtime grow partitons. -- --- Thanks Adam Nieścierowicz [-- Attachment #1.2: Type: text/html, Size: 2139 bytes --] [-- Attachment #2: adam_niescierowicz.vcf --] [-- Type: text/vcard, Size: 195 bytes --] begin:vcard fn;quoted-printable:Adam Nie=C5=9Bcierowicz n;quoted-printable:Nie=C5=9Bcierowicz;Adam email;internet:adam.niescierowicz@justnet.pl x-mozilla-html:TRUE version:2.1 end:vcard ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: What is the best way to set up RAID-1 on new Ubuntu install 2025-09-04 7:41 ` Adam Niescierowicz @ 2025-09-04 9:22 ` Michael Reinelt 0 siblings, 0 replies; 10+ messages in thread From: Michael Reinelt @ 2025-09-04 9:22 UTC (permalink / raw) To: adam.niescierowicz, Jeffery Small, linux-raid Am Donnerstag, dem 04.09.2025 um 09:41 +0200 schrieb Adam Niescierowicz: > What about: > sda1 and sdb1 for EFI no raid sda2 and sdb2 RAID-10 with -f2 option (diffrent offset that gives > double speed of read and single speed of write) > md0: LVM and on top of LVM you can create partitions with XFS filesystem. XFS allows you to > realtime grow partitons. Depending on the user’s knowledge and experience, I’d vote for keeping simple setups simple: Don’t use RAID-10 with far: it can make reshaping/growth complicated or impossible and mainly helps long sequential reads. Just go for "classic" RAID-1. Don’t add LVM unless there’s a clear benefit (multiple volumes, snapshots, thin provisioning). Otherwise it’s just more moving parts. Use Ext4 unless there’s a strong reason for XFS. Ext4 supports online grow; XFS cannot be shrunk. regards, Michael -- Michael Reinelt <michael@reinelt.co.at> Ringsiedlung 75 A-8111 Gratwein-Straßengel +43 676 3079941 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-09-06 2:16 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-09-03 21:04 What is the best way to set up RAID-1 on new Ubuntu install Jeffery Small 2025-09-03 21:32 ` Wol 2025-09-04 4:54 ` Jeffery Small 2025-09-04 22:55 ` Wol 2025-09-05 3:12 ` Reindl Harald 2025-09-05 4:40 ` Jeffery Small 2025-09-06 2:16 ` Dragan Milivojević 2025-09-05 6:03 ` Pascal Hambourg 2025-09-04 7:41 ` Adam Niescierowicz 2025-09-04 9:22 ` Michael Reinelt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox