Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, May 20, 2015 at 12:20:29PM +, Alan Mackenzie wrote: No no no! LiLo, on a six year old machine actually works well. It does exactly what it says on the packet, i.e. it boots up the machine, and nothing more. I use LiLo, mainly to avoid the complexities of Grub. -- Alan Mackenzie (Nuremberg, Germany) ack
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 21:35:11 Neil Bothwick wrote: On Wed, 20 May 2015 16:08:53 +0100, Peter Humphrey wrote: I followed the instructions in https://wiki.gentoo.org/wiki/GRUB2_Migration, after copying my grub.conf as you suggested, but when I rebooted, the GRUB2 menu text was minuscule, it only included one of the five kernel lines it should have, and when it ran it didn't start my RAID devices. Can you post the contents of grub.conf, /etc/defaults/grub and any custm scripts in /etc/grub.d. This is my grub.conf (copied in from my e-mail yesterday): root (hd0,0) timeout 10 default 0 fallback 3 color white/blue black/light-gray splashimage /grub/splash.xpm.gz title=Gentoo Linux 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no X kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no network kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll title=Rescue System 3.18.11 kernel /boot/kernel-x86_64-3.18.11-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll title=Rescue System 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll I copied it into /etc/grub.d/05_linux. /etc/defaults/grub is all comments. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, 21 May 2015 09:13:44 +0100, Peter Humphrey wrote: This is my grub.conf (copied in from my e-mail yesterday): root (hd0,0) timeout 10 default 0 fallback 3 color white/blue black/light-gray splashimage /grub/splash.xpm.gz title=Gentoo Linux 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no X kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no network kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll title=Rescue System 3.18.11 kernel /boot/kernel-x86_64-3.18.11-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll title=Rescue System 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll I copied it into /etc/grub.d/05_linux. /etc/defaults/grub is all comments. That's a GRUB1 file, GRUB2 uses a different syntax so your first entry would become menuentry Gentoo Linux 3.18.12 { linux /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 net.ifnames=0 irqpoll } Also, you need to copy 40_custom and then add your lines to that. This is because files in /etc/grub.d are executed, so it needs to be a shell script. -- Neil Bothwick A wok is what you throw at a wabbit. pgpattKmhF1Vb.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, 21 May 2015 12:44:42 +0100, Peter Humphrey wrote: If you're just going to hand-edit your config file, I don't see much point in sticking this stuff in /etc/grub.d. Just hand-edit your config file and forget about grub2-mkconfig. You mean: copy grub.conf to grub.cfg and change its syntax to suit GRUB2? I'm well used to hand editing grub.conf, so it'll be no big change to operate on grub.cfg instead. I can cope with that. You'd need to run grub2-mkconfig once, to generate a grub.cfg to which you can add your entries. -- Neil Bothwick The facts, although interesting, are irrelevant. pgpWULANBfCkv.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, May 21, 2015 at 4:33 AM, Neil Bothwick n...@digimed.co.uk wrote: That's a GRUB1 file, GRUB2 uses a different syntax so your first entry would become menuentry Gentoo Linux 3.18.12 { linux /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 net.ifnames=0 irqpoll } Correct. Also, you need to copy 40_custom and then add your lines to that. This is because files in /etc/grub.d are executed, so it needs to be a shell script. If you're just going to hand-edit your config file, I don't see much point in sticking this stuff in /etc/grub.d. Just hand-edit your config file and forget about grub2-mkconfig. 40_custom is more about adding one more entry to an auto-generated menu, such as having an entry for booting another OS, or a rescue CD image, or whatever. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thursday 21 May 2015 07:34:58 Rich Freeman wrote: If you're just going to hand-edit your config file, I don't see much point in sticking this stuff in /etc/grub.d. Just hand-edit your config file and forget about grub2-mkconfig. You mean: copy grub.conf to grub.cfg and change its syntax to suit GRUB2? I'm well used to hand editing grub.conf, so it'll be no big change to operate on grub.cfg instead. I can cope with that. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, 21 May 2015 07:34:58 -0400, Rich Freeman wrote: Also, you need to copy 40_custom and then add your lines to that. This is because files in /etc/grub.d are executed, so it needs to be a shell script. If you're just going to hand-edit your config file, I don't see much point in sticking this stuff in /etc/grub.d. Just hand-edit your config file and forget about grub2-mkconfig. You sill need to edit something each time you update your kernel, unless you can use symlinks, and running grub2-mkconfig may give you useful fallback entries from 10_linux. 40_custom is more about adding one more entry to an auto-generated menu, such as having an entry for booting another OS, or a rescue CD image, or whatever. 40_custom is also just and example. You can have any script you want in there. I wrote a script that auto-generates the entries *I* want and removed the executable bit from 10_linux. Now I get multiple entries for all my installed kernels with the correct boot options. -- Neil Bothwick Despite the cost of living, have you noticed how it remains so popular? pgphLiDvfhuGv.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, 21 May 2015 13:10:02 +0100, Neil Bothwick wrote: You mean: copy grub.conf to grub.cfg and change its syntax to suit GRUB2? I'm well used to hand editing grub.conf, so it'll be no big change to operate on grub.cfg instead. I can cope with that. You'd need to run grub2-mkconfig once, to generate a grub.cfg to which you can add your entries. I forgot to mention, run grub2-script-check over your new config file to check its syntax. -- Neil Bothwick Not one shred of evidence supports the notion that life is serious. pgp7mmPvqKOob.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, May 21, 2015 at 8:10 AM, Neil Bothwick n...@digimed.co.uk wrote: On Thu, 21 May 2015 12:44:42 +0100, Peter Humphrey wrote: If you're just going to hand-edit your config file, I don't see much point in sticking this stuff in /etc/grub.d. Just hand-edit your config file and forget about grub2-mkconfig. You mean: copy grub.conf to grub.cfg and change its syntax to suit GRUB2? I'm well used to hand editing grub.conf, so it'll be no big change to operate on grub.cfg instead. I can cope with that. You'd need to run grub2-mkconfig once, to generate a grub.cfg to which you can add your entries. It is just a text file. I think the only challenge is that there aren't a lot of decent examples floating around because all the docs tend to say to run grub2-mkconfig. I found this extremely frustrating when I first migrated to grub2. In my case grub2-mkconfig wouldn't find anything, since it looks at filenames and my kernels/initramfs files didn't follow any standard naming convention (they were not installed using make install). These days I do use grub2-mkconfig. That said, the canned config files output by grub2-mkconfig are a bit smarter about auto-setting things like the grub2 root. I wouldn't bother putting anything in 40_custom though. Just run it once and edit the file. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Thu, 21 May 2015 09:19:26 -0400, Rich Freeman wrote: You mean: copy grub.conf to grub.cfg and change its syntax to suit GRUB2? I'm well used to hand editing grub.conf, so it'll be no big change to operate on grub.cfg instead. I can cope with that. You'd need to run grub2-mkconfig once, to generate a grub.cfg to which you can add your entries. It is just a text file. I think the only challenge is that there aren't a lot of decent examples floating around because all the docs tend to say to run grub2-mkconfig. I found this extremely frustrating when I first migrated to grub2. Same here, but running grub2-mkconfig generates a better starting point than an empty file. That's your example. In my case grub2-mkconfig wouldn't find anything, since it looks at filenames and my kernels/initramfs files didn't follow any standard naming convention (they were not installed using make install). These days I do use grub2-mkconfig. That said, the canned config files output by grub2-mkconfig are a bit smarter about auto-setting things like the grub2 root. I wouldn't bother putting anything in 40_custom though. Just run it once and edit the file. That's certainly an option if your needs are not going to change. If you need to edit the file from time to time, I'd prefer to just edit the short file tweaked to my needs than the whole thing. It's really a matter of personal choice but one advantage of continuing to use grub2-mkconfig is that if GRUB upstream changes things, your config will keep track. -- Neil Bothwick Save the whales. Collect the whole set. pgpUznd5yI9jO.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sunday 17 May 2015 10:09:11 Rich Freeman wrote: Just a few clarifications below. One thing this discussion is missing is any mention of BIOS / EFI. Which reminds me: can anyone here confirm whether grub-legacy can handle GPT? I'm getting close to building my new system and I don't want to change too many things at once. By which I mean that I'm going to try btrfs (my fingers will learn how to type that one day), and I might go for GPT if it's not going to cause a lot of trouble, but I really don't want to have to wrestle with grub-2 at the same time. Maybe later. So, GPT with legacy grub, anyone? -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, May 20, 2015 at 5:42 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? Well, you could always use syslinux or something else. However, GRUB is probably your best bet. You should really consider moving to GRUB2 though. I don't know about legacy GRUB, but GRUB2 can handle your boot partition being on btrfs. I still left space on my drives for a boot partition anyway, since it will be needed when I move to EFI. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 13:01:20 +0100, Peter Humphrey wrote: You should really consider moving to GRUB2 though. Last time I looked, it couldn't handle all the kernels and options I have. GRUB2 can handle anything GRUB1 can. You probably mean that grub2-mkconfig couldn't do what you want, but you can either create grub.conf manually or put your manual configuration in one of the files in /etc/grub.d. Copy 40_custom to 05_gentoo, edit it to boot whatever you need and run grub2-mkconfig. -- Neil Bothwick Ubuntu is an ancient African word, meaning I can't configure Slackware. pgpGADzIC8eYZ.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 06:26:08 Rich Freeman wrote: On Wed, May 20, 2015 at 5:42 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? Well, you could always use syslinux or something else. However, GRUB is probably your best bet. You should really consider moving to GRUB2 though. Last time I looked, it couldn't handle all the kernels and options I have. This is my grub.conf: root (hd0,0) timeout 10 default 0 fallback 3 color white/blue black/light-gray splashimage /grub/splash.xpm.gz title=Gentoo Linux 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no X kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll title=Gentoo Linux 3.18.12, no network kernel /boot/kernel-x86_64-3.18.12-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll title=Rescue System 3.18.11 kernel /boot/kernel-x86_64-3.18.11-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll title=Rescue System 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll Can grub-2 manage that for me? I don't know about legacy GRUB, but GRUB2 can handle your boot partition being on btrfs. I still left space on my drives for a boot partition anyway, since it will be needed when I move to EFI. I was planning to keep /boot out of the btrfs setup, at least to start with. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 06:51:53 -0400, cov...@ccs.covici.com wrote: You should really consider moving to GRUB2 though. I don't know about legacy GRUB, but GRUB2 can handle your boot partition being on btrfs. I still left space on my drives for a boot partition anyway, since it will be needed when I move to EFI. How did you makr the boot partition, or is it just linux? Did you use gpt or mbr? I am about to convert to ssd, and I may as well do it in such a way that future mbs will work much easier. If you want t be able to use UEFI, you need to use GPT. UEFI needs a FAT partition at the start of the drive, type FE00, but booting a GPT disk with MBR requires a small BIOS boot partition, type EF02, at the start of the drive (mine is 1MB). For ease of switching to UEFI later, I'd do sda1 1MB BIOS boot, type EF00 sda2 /boot, type 8300 everything else. You can make sda2 ext2, then, when it is time to switch, simply backup the contents of /boot, replace sda1 and sda2 with a single EF00 partition, formatted with FAT, and copy the contents of /boot back. -- Neil Bothwick How is it that we put man on the moon before we figured out it would be a good idea to put wheels on luggage? pgpitVle6w_zl.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On 05/20/2015 05:23 AM, Neil Bothwick wrote: On Wed, 20 May 2015 10:16:09 +0100, Peter Humphrey wrote: Which reminds me: can anyone here confirm whether grub-legacy can handle GPT? I'm getting close to building my new system and I don't want to change too many things at once. By which I mean that I'm going to try btrfs (my fingers will learn how to type that one day), and I might go for GPT if it's not going to cause a lot of trouble, but I really don't want to have to wrestle with grub-2 at the same time. Maybe later. So, GPT with legacy grub, anyone? It should do, as long as you create the BIOS Boot partition at the start of the drive. It shouldn't care what the BIOS is trying to load. But if it's a new system, doesn't it use UEFI? In which case, grubosaurus won't work but you can avoid GRUB2 by using Gummiboot, which is even simpler that GRUB1. I do not find grub2 complicated, although I've never had a setup with LVM or RAID. It's always just been: grub-install --recheck /dev/sda # cosmetic changes to /etc/default/grub like changing the boot delay grub-mkconfig -o /boot/grub/grub.cfg I was raised on grub2, so I guess that probably makes a difference; maybe it was difficult when I first started, but I can't remember. Alec
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 06:19:52 -0400, Alec Ten Harmsel wrote: I do not find grub2 complicated, although I've never had a setup with LVM or RAID. It's always just been: It's not more complicated, just different. grub-install --recheck /dev/sda # cosmetic changes to /etc/default/grub like changing the boot delay grub-mkconfig -o /boot/grub/grub.cfg I was raised on grub2, so I guess that probably makes a difference; maybe it was difficult when I first started, but I can't remember. It was, so was grub-legacy. The thing is people using that have been doing so for so long they have forgotten about that particular learning curve. -- Neil Bothwick One difference between a man and a machine is that a machine is quiet when well oiled. pgpB0pf4l7me6.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 10:42:41 +0100, Peter Humphrey wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? No, you could use LiLo ;-) -- Neil Bothwick System halted - hit any Microsoft employee to continue. pgpUk6ACnPoLN.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 11:23:21 Neil Bothwick wrote: On Wed, 20 May 2015 10:42:41 +0100, Peter Humphrey wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? No, you could use LiLo ;-) Ho ho ho! :-) -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Rich Freeman ri...@gentoo.org wrote: On Wed, May 20, 2015 at 5:42 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? Well, you could always use syslinux or something else. However, GRUB is probably your best bet. You should really consider moving to GRUB2 though. I don't know about legacy GRUB, but GRUB2 can handle your boot partition being on btrfs. I still left space on my drives for a boot partition anyway, since it will be needed when I move to EFI. How did you makr the boot partition, or is it just linux? Did you use gpt or mbr? I am about to convert to ssd, and I may as well do it in such a way that future mbs will work much easier. -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 10:23:55 Neil Bothwick wrote: On Wed, 20 May 2015 10:16:09 +0100, Peter Humphrey wrote: Which reminds me: can anyone here confirm whether grub-legacy can handle GPT? I'm getting close to building my new system and I don't want to change too many things at once. By which I mean that I'm going to try btrfs (my fingers will learn how to type that one day), and I might go for GPT if it's not going to cause a lot of trouble, but I really don't want to have to wrestle with grub-2 at the same time. Maybe later. So, GPT with legacy grub, anyone? It should do, as long as you create the BIOS Boot partition at the start of the drive. It shouldn't care what the BIOS is trying to load. OK; I'll try it then. Thanks. But if it's a new system, doesn't it use UEFI? In which case, grubosaurus won't work but you can avoid GRUB2 by using Gummiboot, which is even simpler that GRUB1. No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 10:16:09 +0100, Peter Humphrey wrote: Which reminds me: can anyone here confirm whether grub-legacy can handle GPT? I'm getting close to building my new system and I don't want to change too many things at once. By which I mean that I'm going to try btrfs (my fingers will learn how to type that one day), and I might go for GPT if it's not going to cause a lot of trouble, but I really don't want to have to wrestle with grub-2 at the same time. Maybe later. So, GPT with legacy grub, anyone? It should do, as long as you create the BIOS Boot partition at the start of the drive. It shouldn't care what the BIOS is trying to load. But if it's a new system, doesn't it use UEFI? In which case, grubosaurus won't work but you can avoid GRUB2 by using Gummiboot, which is even simpler that GRUB1. -- Neil Bothwick There is so much sand in Northern Africa that if it were spread out it would completely cover the Sahara Desert. pgpVVKeyEaIV1.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Neil Bothwick n...@digimed.co.uk wrote: On Wed, 20 May 2015 06:51:53 -0400, cov...@ccs.covici.com wrote: You should really consider moving to GRUB2 though. I don't know about legacy GRUB, but GRUB2 can handle your boot partition being on btrfs. I still left space on my drives for a boot partition anyway, since it will be needed when I move to EFI. How did you makr the boot partition, or is it just linux? Did you use gpt or mbr? I am about to convert to ssd, and I may as well do it in such a way that future mbs will work much easier. If you want t be able to use UEFI, you need to use GPT. UEFI needs a FAT partition at the start of the drive, type FE00, but booting a GPT disk with MBR requires a small BIOS boot partition, type EF02, at the start of the drive (mine is 1MB). For ease of switching to UEFI later, I'd do sda1 1MB BIOS boot, type EF00 sda2 /boot, type 8300 everything else. You can make sda2 ext2, then, when it is time to switch, simply backup the contents of /boot, replace sda1 and sda2 with a single EF00 partition, formatted with FAT, and copy the contents of /boot back. Thanks, does the 1mb partition have to have anything in it? -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 08:21:34 -0400, cov...@ccs.covici.com wrote: If you want to be able to use UEFI, you need to use GPT. UEFI needs a FAT partition at the start of the drive, type FE00, but booting a GPT disk with MBR requires a small BIOS boot partition, type EF02, at the start of the drive (mine is 1MB). For ease of switching to UEFI later, I'd do sda1 1MB BIOS boot, type EF00 sda2 /boot, type 8300 everything else. You can make sda2 ext2, then, when it is time to switch, simply backup the contents of /boot, replace sda1 and sda2 with a single EF00 partition, formatted with FAT, and copy the contents of /boot back. Thanks, does the 1mb partition have to have anything in it? No. If doesn't even need a filesystem, just create the partition with the correct type and GRUB will work. -- Neil Bothwick One-seventh of life is spent on Monday. pgpPykrYgDLxl.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 13:55:27 Neil Bothwick wrote: On Wed, 20 May 2015 08:21:34 -0400, cov...@ccs.covici.com wrote: If you want to be able to use UEFI, you need to use GPT. UEFI needs a FAT partition at the start of the drive, type FE00, but booting a GPT disk with MBR requires a small BIOS boot partition, type EF02, at the start of the drive (mine is 1MB). For ease of switching to UEFI later, I'd do sda1 1MB BIOS boot, type EF00 sda2 /boot, type 8300 everything else. You can make sda2 ext2, then, when it is time to switch, simply backup the contents of /boot, replace sda1 and sda2 with a single EF00 partition, formatted with FAT, and copy the contents of /boot back. Thanks, does the 1mb partition have to have anything in it? No. If doesn't even need a filesystem, just create the partition with the correct type and GRUB will work. From what I recall gdisk just starts at sector 2048, doesn't this leave space for MBR code? Note the message MBR: protective below: # gdisk /dev/sda GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sda: 468862128 sectors, 223.6 GiB Logical sector size: 512 bytes Disk identifier (GUID): E682BFC8-0C85-459B-BA14-87F4E68CD711 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 468862094 Partitions will be aligned on 2048-sector boundaries Total free space is 27368557 sectors (13.1 GiB) Number Start (sector)End (sector) Size Code Name 12048 1093631 533.0 MiB EF00 ESP 2 109363243036671 20.0 GiB8300 root 343036672 441495551 190.0 GiB 8300 home -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Neil Bothwick n...@digimed.co.uk wrote: On Wed, 20 May 2015 08:21:34 -0400, cov...@ccs.covici.com wrote: If you want to be able to use UEFI, you need to use GPT. UEFI needs a FAT partition at the start of the drive, type FE00, but booting a GPT disk with MBR requires a small BIOS boot partition, type EF02, at the start of the drive (mine is 1MB). For ease of switching to UEFI later, I'd do sda1 1MB BIOS boot, type EF00 sda2 /boot, type 8300 everything else. You can make sda2 ext2, then, when it is time to switch, simply backup the contents of /boot, replace sda1 and sda2 with a single EF00 partition, formatted with FAT, and copy the contents of /boot back. Thanks, does the 1mb partition have to have anything in it? No. If doesn't even need a filesystem, just create the partition with the correct type and GRUB will work. I have been usinglilo, so till I need to go to a uefi mb, that seems to work. -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, May 20, 2015 at 12:56:36PM +0100, Peter Humphrey wrote: On Wednesday 20 May 2015 11:23:21 Neil Bothwick wrote: On Wed, 20 May 2015 10:42:41 +0100, Peter Humphrey wrote: No, it's only new SSDs, not the whole system, which is six years old. Does that mean my choice is restricted to just the two versions of GRUB? No, you could use LiLo ;-) Ho ho ho! :-) No no no! LiLo, on a six year old machine actually works well. It does exactly what it says on the packet, i.e. it boots up the machine, and nothing more. I use LiLo, mainly to avoid the complexities of Grub. -- Rgds Peter -- Alan Mackenzie (Nuremberg, Germany)
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 14:29:27 +0100, Mick wrote: Thanks, does the 1mb partition have to have anything in it? No. If doesn't even need a filesystem, just create the partition with the correct type and GRUB will work. From what I recall gdisk just starts at sector 2048, doesn't this leave space for MBR code? Note the message MBR: protective below: So does fdisk with an MBR partition table. It defaults to 2048 to avoid alignment problems with disks using 4k blocks. # gdisk /dev/sda GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. You still need the BIOS boot partition. This is about BIOS vs UEFI booting. % sudo gdisk -l /dev/sda GPT fdisk (gdisk) version 1.0.0 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sda: 5860533168 sectors, 2.7 TiB Logical sector size: 512 bytes Disk identifier (GUID): 04EFD165-FDDF-4C24-BA81-868B97BF9949 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 5860533134 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector)End (sector) Size Code Name 120484095 1024.0 KiB EF02 BIOS boot partition 24096 2101247 1024.0 MiB 8300 boot0 3 210124835655679 16.0 GiB8200 swap0 435655680 5860533134 2.7 TiB 8300 silastic0 -- Neil Bothwick Top Oxymorons Number 2: Exact estimate pgps9jU13Bf5s.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 09:24:12 -0400, cov...@ccs.covici.com wrote: Thanks, does the 1mb partition have to have anything in it? No. If doesn't even need a filesystem, just create the partition with the correct type and GRUB will work. I have been usinglilo, so till I need to go to a uefi mb, that seems to work. Once you have a working bootloader on a system, I see little need to change it unless the hardware changes. Until a few weeks ago I was still using GRUB 0.97 on my MythTV frontend, because that was current when I installed it. The new box is UEFI so it uses Gummiboot. -- Neil Bothwick Experience is what you get when you didn't get what you wanted. pgpYOlh9LzWBR.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 13:08:42 Neil Bothwick wrote: On Wed, 20 May 2015 13:01:20 +0100, Peter Humphrey wrote: You should really consider moving to GRUB2 though. Last time I looked, it couldn't handle all the kernels and options I have. GRUB2 can handle anything GRUB1 can. You probably mean that grub2-mkconfig couldn't do what you want, I did, yes. but you can either create grub.conf manually or put your manual configuration in one of the files in /etc/grub.d. Copy 40_custom to 05_gentoo, edit it to boot whatever you need and run grub2-mkconfig. That's a lot simpler than the rigmarole I was expecting, from the first time I tried to switch to GRUB2. Looks like I don't have much of an excuse now. I'll think of something though... ;-) -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 16:09 Peter Humphrey pe...@prh.myzen.co.uk wrote: I followed the instructions in https://wiki.gentoo.org/wiki/GRUB2_Migration , after copying my grub.conf as you suggested, but when I rebooted, the GRUB2 menu text was minuscule, it only included one of the five kernel lines it should have, and when it ran it didn't start my RAID devices. As I said before, maybe later. I need to find out far more about GRUB2 before i dive in, and that's not for today. -- Rgds Peter Personally I feel the Grub 2 OS detection script sucks really badly. So much so that I completely re-wrote it so I got proper entries for my various Windows installs (version accurately detected using chntpw) and multiple Linux distros (sorted/detailed listings for all available kernel versions). OCD probably - but much easier to navigate! One day I might try and open a dialogue with Upstream... ;-) Robert
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On 20 May 2015 18:46:26 CEST, Bob Wya bob.mt@gmail.com wrote: On Wed, 20 May 2015 16:09 Peter Humphrey pe...@prh.myzen.co.uk wrote: I followed the instructions in https://wiki.gentoo.org/wiki/GRUB2_Migration , after copying my grub.conf as you suggested, but when I rebooted, the GRUB2 menu text was minuscule, it only included one of the five kernel lines it should have, and when it ran it didn't start my RAID devices. As I said before, maybe later. I need to find out far more about GRUB2 before i dive in, and that's not for today. -- Rgds Peter Personally I feel the Grub 2 OS detection script sucks really badly. So much so that I completely re-wrote it so I got proper entries for my various Windows installs (version accurately detected using chntpw) and multiple Linux distros (sorted/detailed listings for all available kernel versions). OCD probably - but much easier to navigate! One day I might try and open a dialogue with Upstream... ;-) Robert Can you share that script with us? I am interested in a decent one myself. Thanks, Joost -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 16:46:26 +, Bob Wya wrote: Personally I feel the Grub 2 OS detection script sucks really badly. So much so that I completely re-wrote it so I got proper entries for my various Windows installs (version accurately detected using chntpw) and multiple Linux distros (sorted/detailed listings for all available kernel versions). OCD probably - but much easier to navigate! Same here. I was prompted to do it when I switch to a FAT filesystem for /boot, so the old method of relying on symlinks for the kernel names no longer worked. It turned out to be remarkably simple, it;s just a script that spits out menuentry stanzas. -- Neil Bothwick Press every key to continue. pgpo47KZyTs3C.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wed, 20 May 2015 16:08:53 +0100, Peter Humphrey wrote: I followed the instructions in https://wiki.gentoo.org/wiki/GRUB2_Migration, after copying my grub.conf as you suggested, but when I rebooted, the GRUB2 menu text was minuscule, it only included one of the five kernel lines it should have, and when it ran it didn't start my RAID devices. Can you post the contents of grub.conf, /etc/defaults/grub and any custm scripts in /etc/grub.d. -- Neil Bothwick Fill what's empty, empty what's full, scratch where it itches. pgpPWpSydmHde.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Wednesday 20 May 2015 15:26:59 I wrote: Looks like I don't have much of an excuse now. I'll think of something though... ;-) Never a truer word... I followed the instructions in https://wiki.gentoo.org/wiki/GRUB2_Migration, after copying my grub.conf as you suggested, but when I rebooted, the GRUB2 menu text was minuscule, it only included one of the five kernel lines it should have, and when it ran it didn't start my RAID devices. As I said before, maybe later. I need to find out far more about GRUB2 before i dive in, and that's not for today. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On 18/05/2015 20:21, Nuno Magalhães wrote: On Mon, May 18, 2015 at 2:08 AM, Rich Freeman ri...@gentoo.org wrote: On the other hand, both btrfs and zfs will get you a level of data security that you simply won't get from ext4+lvm+mdadm - protection from silent corruption. That's one of the advantages i see in ZFS. Do you use it frequently? Can anyone comment on its memory usage (without dedicated SSDs for ARC)? ZFS needs a lot of memory to function well. It does work and run with far less memory than recommended, but doesn't run *well* - performance is impaired. I don't recall the exact formula (insufficiently caffeinated at 8am) but 8G is about your minimum for a decent storage device -- Alan McKinnon alan.mckin...@gmail.com
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sunday 17 May 2015 21:36:57 Stefan G. Weichinger wrote: Am 2015-05-17 um 18:05 schrieb Peter Humphrey: Maybe I will. I suspect dodgy disks and I have a pair of new SSDs on the way. Perhaps it's time for a rethink. perhaps one more thought to be thought right now: (I overlooked this at the time.) skip mdadm and lvm ... and try btrfs as you have the chance on shiny new hardware I also have a spare external hard disk, which I could experiment with for snapshots etc. less layers, more features ... I definitely recommend giving this a try. I do like the idea of having fewer layers and less complication. I'm doing a bit of reading while awaiting the bits - the SSDs are here; all I need now is the mounting brackets. tl;dr ... maybe you listed some reason to stick with mdadm/lvm2/xfs etc ... sorry in that case No, it's just what I have at the moment. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, 19 May 2015 10:02:38 +0100, Peter Humphrey wrote: skip mdadm and lvm ... and try btrfs as you have the chance on shiny new hardware I also have a spare external hard disk, which I could experiment with for snapshots etc. Snapshots are subvolumes in btrfs, so they stay in the same filesystem. That's why they are so fast. It's a similar situation with ZFS. -- Neil Bothwick Stop tagline theft! Copyright your tagline (c) pgpotFS3Mpi7h.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 6:13 AM, Neil Bothwick n...@digimed.co.uk wrote: On Tue, 19 May 2015 10:02:38 +0100, Peter Humphrey wrote: skip mdadm and lvm ... and try btrfs as you have the chance on shiny new hardware I also have a spare external hard disk, which I could experiment with for snapshots etc. Snapshots are subvolumes in btrfs, so they stay in the same filesystem. That's why they are so fast. It's a similar situation with ZFS. Yup. In both cases they're copy-on-write, so they don't consume additional space except to the extent that things change. Also, in both cases you can serialize a snapshot (either in its entirety or as a diff vs a previous snapshot) and store it on separate storage. This is mainly done for backup (storing the serialized files) or replication (replaying them onto another server with the same filesystem). But, neither ZFS nor btrfs are without issue on Linux, so I'd use care in a production environment. The btrfs issues tend to revolve around stability, and the zfs issues tend to revolve around dealing with out-of-mainline code and legal/license issues. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19 2015, Rich Freeman wrote: On Tue, May 19, 2015 at 11:22 AM, gottl...@nyu.edu wrote: On Tue, May 19 2015, Peter Humphrey wrote: On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I included discard in fstab for my ssd filesystems, presumably following some installation guide. For example I have /dev/sda5 / ext4noatime,discard 0 1 /dev/vg/local /localext4noatime,discard 0 2 Is it preferred to instead issue explicit trim's via cron? It depends. In theory giving your drive useful information about allocation now is better than giving it the information later. The drive can make use of that information to improve performance. In practice some drives have brain-dead firmware and they'll do stupid things with that information. If you trim part of an erase block, the drive should just file that info away and make use of that information when it can. However, some drives will immediately copy/erase the rest of the block at that moment, which creates an unnecessary erase cycle and creates IO load at a moment that the drive is already busy. So, if your drive isn't brain-dead discard is better. If your drive is brain-dead fstrim is almost as good if the drive isn't too full. I've yet to test discard and see how well it works. Understood. Thank you. allan
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I've been trimming mine daily, and I've yet to be able to distinguish it from a no-op. As far as I can tell fstrim -v always outputs 0 bytes trimmed. I've just run fstrim manually on my LAN server, which is installed on ext4: # /sbin/fstrim -av /usr/local: 0 B (0 bytes) trimmed /usr/portage/packages: 71.4 MiB (74878976 bytes) trimmed /usr/portage: 389.3 MiB (408174592 bytes) trimmed /var/cache/http-replicator: 0 B (0 bytes) trimmed /var/cache/squid: 41.5 MiB (43532288 bytes) trimmed /home: 123.1 MiB (129081344 bytes) trimmed /: 698.9 MiB (732839936 bytes) trimmed It's supposed to have done that at 01:15 on Saturday, but my KMail system is sick so I can't say what it actually did. Roll on new SSDs! -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 11:00 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I've been trimming mine daily, and I've yet to be able to distinguish it from a no-op. As far as I can tell fstrim -v always outputs 0 bytes trimmed. Ah, well that's quite different from my Atom box with its 64GB SSD; before I remove the -v a few weeks ago it was reporting many megabytes trimmed most times it ran. That's on ext4 and running Gentoo with http-replicator service. So, I was inspired to look into this yet again. Looks like it is the subject of this: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg40618.html It doesn't look like this is in 3.18 yet. So, I'm basically running without trimming. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 11:22 AM, gottl...@nyu.edu wrote: On Tue, May 19 2015, Peter Humphrey wrote: On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I included discard in fstab for my ssd filesystems, presumably following some installation guide. For example I have /dev/sda5 / ext4noatime,discard 0 1 /dev/vg/local /localext4noatime,discard 0 2 Is it preferred to instead issue explicit trim's via cron? It depends. In theory giving your drive useful information about allocation now is better than giving it the information later. The drive can make use of that information to improve performance. In practice some drives have brain-dead firmware and they'll do stupid things with that information. If you trim part of an erase block, the drive should just file that info away and make use of that information when it can. However, some drives will immediately copy/erase the rest of the block at that moment, which creates an unnecessary erase cycle and creates IO load at a moment that the drive is already busy. So, if your drive isn't brain-dead discard is better. If your drive is brain-dead fstrim is almost as good if the drive isn't too full. I've yet to test discard and see how well it works. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I've been trimming mine daily, and I've yet to be able to distinguish it from a no-op. As far as I can tell fstrim -v always outputs 0 bytes trimmed. Ah, well that's quite different from my Atom box with its 64GB SSD; before I remove the -v a few weeks ago it was reporting many megabytes trimmed most times it ran. That's on ext4 and running Gentoo with http-replicator service. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tuesday 19 May 2015 08:54:26 Rich Freeman wrote: On Tue, May 19, 2015 at 6:13 AM, Neil Bothwick n...@digimed.co.uk wrote: On Tue, 19 May 2015 10:02:38 +0100, Peter Humphrey wrote: skip mdadm and lvm ... and try btrfs as you have the chance on shiny new hardware I also have a spare external hard disk, which I could experiment with for snapshots etc. Snapshots are subvolumes in btrfs, so they stay in the same filesystem. That's why they are so fast. It's a similar situation with ZFS. Yup. In both cases they're copy-on-write, so they don't consume additional space except to the extent that things change. Also, in both cases you can serialize a snapshot (either in its entirety or as a diff vs a previous snapshot) and store it on separate storage. This is mainly done for backup (storing the serialized files) or replication (replaying them onto another server with the same filesystem). But, neither ZFS nor btrfs are without issue on Linux, so I'd use care in a production environment. The btrfs issues tend to revolve around stability, and the zfs issues tend to revolve around dealing with out-of-mainline code and legal/license issues. Well, this is my toy desktop, so no risk to fame and fortune there. By /toy/, of course, I mean I play with it, not that it's a Mickey-Mouse setup (which some of you pros out there might think it is anyway, but that's another story). Some people will remember that I had a fling with f2fs on my little Atom LAN server some months ago; I don't think I'll be using that this time! Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? Hmm. Looks like I'm hijacking Nuno's thread. Apologies if that's ruffled any feathers, but I think I'm still on-topic, more or less, and he may still be interested in the conversation. - Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I've been trimming mine daily, and I've yet to be able to distinguish it from a no-op. As far as I can tell fstrim -v always outputs 0 bytes trimmed. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Am Tue, 19 May 2015 10:53:26 -0400 schrieb Rich Freeman ri...@gentoo.org: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I've been trimming mine daily, and I've yet to be able to distinguish it from a no-op. As far as I can tell fstrim -v always outputs 0 bytes trimmed. (Note that I'm also a btrfs user.) I've been using the systemd timer that comes with util-linux upstream without modification, which runs fstrim weekly. That seems to work well, but to be quite honest, I wouldn't know how to tell. Sometimes I wasn't even sure it ran, so I would run it manually, and it always finished nigh-instantaneously. Before that, I used the discard mount option, but apparently that's only a good idea with high-end SSDs (not that I noticed much of a difference in everyday usage). -- Marc Joliet -- People who think they know everything really annoy those of us who know we don't - Bjarne Stroustrup pgpbuY5i2MFsi.pgp Description: Digitale Signatur von OpenPGP
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19 2015, Peter Humphrey wrote: On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I included discard in fstab for my ssd filesystems, presumably following some installation guide. For example I have /dev/sda5 / ext4noatime,discard 0 1 /dev/vg/local /localext4noatime,discard 0 2 Is it preferred to instead issue explicit trim's via cron? thanks, allan
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Rich Freeman ri...@gentoo.org wrote: On Tue, May 19, 2015 at 11:22 AM, gottl...@nyu.edu wrote: On Tue, May 19 2015, Peter Humphrey wrote: On Tuesday 19 May 2015 10:53:26 Rich Freeman wrote: On Tue, May 19, 2015 at 10:44 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Incidentally, what's the received wisdom on frequency of file-system trimming on SSDs these days? I've seen values quoted between twice a day and once a week. And how does trimming affect btrfs? I included discard in fstab for my ssd filesystems, presumably following some installation guide. For example I have /dev/sda5 / ext4noatime,discard 0 1 /dev/vg/local /localext4noatime,discard 0 2 Is it preferred to instead issue explicit trim's via cron? It depends. In theory giving your drive useful information about allocation now is better than giving it the information later. The drive can make use of that information to improve performance. In practice some drives have brain-dead firmware and they'll do stupid things with that information. If you trim part of an erase block, the drive should just file that info away and make use of that information when it can. However, some drives will immediately copy/erase the rest of the block at that moment, which creates an unnecessary erase cycle and creates IO load at a moment that the drive is already busy. So, if your drive isn't brain-dead discard is better. If your drive is brain-dead fstrim is almost as good if the drive isn't too full. I've yet to test discard and see how well it works. Do you know if the Samsung 850 evo or similar are considered brain-dead? -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici cov...@ccs.covici.com
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Am 2015-05-19 um 22:17 schrieb Rich Freeman: On Tue, May 19, 2015 at 12:23 PM, cov...@ccs.covici.com wrote: Do you know if the Samsung 850 evo or similar are considered brain-dead? That's what I'm using, and I couldn't find anything too useful on Google, so I might just test it out. wow, that thread is rather active my 2 cents: one samsung 850 evo 500gb here in my main desktop, with btrfs on it, and I decided to run fstrim -va every few days manually ... kind of when I am at keeping things in shape or so ... along btrfs scrub on fridays ... I also have written / cut-and-pasted systemd-timers for that but I disabled them for now. discard in fstab was documented to slow down things and who wants *that* ?? ;)
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 12:23 PM, cov...@ccs.covici.com wrote: Do you know if the Samsung 850 evo or similar are considered brain-dead? That's what I'm using, and I couldn't find anything too useful on Google, so I might just test it out. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Tue, May 19, 2015 at 3:44 PM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Hmm. Looks like I'm hijacking Nuno's thread. Apologies if that's ruffled any feathers, but I think I'm still on-topic, more or less, and he may still be interested in the conversation. No sweat, i intend to get an SSD for my laptop. It interests me and it's on topic. :)
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Mon, May 18, 2015 at 2:08 AM, Rich Freeman ri...@gentoo.org wrote: On the other hand, both btrfs and zfs will get you a level of data security that you simply won't get from ext4+lvm+mdadm - protection from silent corruption. That's one of the advantages i see in ZFS. Do you use it frequently? Can anyone comment on its memory usage (without dedicated SSDs for ARC)? Maybe i'd use the 4 drives as a ZFS pool. For now LVM complains about duplicate PVs (when pvcreate /dev/md0), i'll have to fiddle with the filters in lvm.conf
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Mon, May 18, 2015 at 2:21 PM, Nuno Magalhães nunomagalh...@eu.ipp.pt wrote: On Mon, May 18, 2015 at 2:08 AM, Rich Freeman ri...@gentoo.org wrote: On the other hand, both btrfs and zfs will get you a level of data security that you simply won't get from ext4+lvm+mdadm - protection from silent corruption. That's one of the advantages i see in ZFS. Do you use it frequently? Can anyone comment on its memory usage (without dedicated SSDs for ARC)? Maybe i'd use the 4 drives as a ZFS pool. For now LVM complains about duplicate PVs (when pvcreate /dev/md0), i'll have to fiddle with the filters in lvm.conf I use btrfs heavily, but not ZFS. The feature set overlaps, but ZFS has more enterprise-oriented features and is more mature, and btrfs has more single-workstation-oriented features and is less mature. For example, ZFS has features like write-intent logging and read caching that are useful especially on large arrays. Btrfs, on the other hand, lets you mix different-sized drive in a single redundancy unit or add/remove devices to a single redundancy unit, while in ZFS you can have multiple vdevs in a zpool but you cannot add/remove drives from a vdev or fully utilize drives of different sizes in a vdev. That is something which is very useful when you have a 3-drive RAID and want to make it a 4-drive RAID, but it isn't terribly useful when you want to add 5 drives to a 30-drive SAN. I'm not sure how many of those differences are design-limitations vs just being what devs have spent their time on. I'm sure over time the feature set of both will grow and further overlap each other. However, right now with the current focus I'd expect ZFS to continue to focus on features useful in very large deployments, and btrfs on features useful in small deployments. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sun, May 17, 2015 at 10:35 AM, cov...@ccs.covici.com wrote: Rich Freeman ri...@gentoo.org wrote: Just a few clarifications below. One thing this discussion is missing is any mention of BIOS / EFI. Most of the discussion below seems most relevant to a legacy BIOS installation. Many specialized Gentoo install docs, like mdadm+lvm, don't really make mention of EFI, or other more recent developments. Now that all the docs are on the wiki I'd strongly encourage anybody with an interest to improve them. Many seasoned Gentoo users barely reference the documentation these days and I think that is part of why they've become a bit dated. A few of the topics below are somewhat controversial, particularly on this list. I tried to stick to the facts and indicate where there is a difference of opinion. I'd prefer not to rehash all the various debates... On Sun, May 17, 2015 at 9:24 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote: (Later i want to get rid of systemd-udev and use eudev instead.) I use openrc, not systemd. It still works well and has less complication - and less typing! Most people using openrc are also using systemd-udev (and there is a good chance you do too). The latter was previously named udev and long predates what most people call systemd. Eudev is a fork of udev, which comes from after it came under the systemd umbrella, but before the name change and a number of changes that were controversial. I believe they try to incorporate many of the patches from systemd-udev but some default behaviors are different. In any case, I just wanted to clarify that systemd-udev is not the systemd you're probably thinking of. In particular, it doesn't replace openrc or sysvinit. Systemd-udev largely is concerned with populating /dev, and running initialization of hardware when it is detected, based on a configurable set of rules. I intend to use XFS for /. Incidentally, if i later decide to fork out /usr (or some other subdirectory) into it's own LV, is it just a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1 works reliably, even though it does look complex when I write it like that. As far as LVM and xfs themselves go, you can do what you propose. However, Gentoo QA policy is that it is expected that /usr is mounted early in boot. Various tools can break if it is not. Typically this is the responsibility of an initramfs, however you can also use scripts that run early during initialization from / which mount it. If you just stick /usr in fstab and rely on openrc to mount it for you normally, you may or may not have problems. It has been a long time since I actually used such a system in this manner with Gentoo, but the last I saw discussion on it most who used this configuration found it usually worked fine, unless you were using something like a bluetooth keyboard or other key system component that required a lot of userspace tooling to make work. However, as a matter of policy you're on your own if you choose not to mount /usr early during boot in some way. The reason it is not supported is that with the rise of things like bluetooth the list of dependencies possibly required during early boot has grown to the point where we'd end up not even having a /usr before long. My sense is that for the most part most maintainers tend to respect the traditional definition of / and /usr on Gentoo, and thus you can often get away with doing things the traditional way. However, the policy does allow us to end debates over things like udev rules invoking some userspace tool in /usr and such. Some packages more strongly depend on /usr being installed in early boot, and there have been suggestions (but nothing concrete) that Gentoo consider supporting the /usr-move that other distros have embraced (and that would basically get rid of /lib, /bin, and so on). Again, legacy grub here. But if you're using an initramfs, from what I've seen you don't need to specify metadata 0.90. I used to use grub legacy and kernel RAID auto-assembly. As a result I was using metadata 0.90. I found this configuration problematic on rare occasions. There is a reason that mdadm changed the metadata, and why most distros don't do it this way. (more below) Damn. I've just checked and something has renamed my /dev/md7 to /dev/md127. Again. It's just too bad. I shall have to stop it when I get a quiet moment and reassemble it into /dev/md7. Actually, I know what caused it but I didn't notice at the time. And this was one of the configuration problems I ran into on rare
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Just a few clarifications below. One thing this discussion is missing is any mention of BIOS / EFI. Most of the discussion below seems most relevant to a legacy BIOS installation. Many specialized Gentoo install docs, like mdadm+lvm, don't really make mention of EFI, or other more recent developments. Now that all the docs are on the wiki I'd strongly encourage anybody with an interest to improve them. Many seasoned Gentoo users barely reference the documentation these days and I think that is part of why they've become a bit dated. A few of the topics below are somewhat controversial, particularly on this list. I tried to stick to the facts and indicate where there is a difference of opinion. I'd prefer not to rehash all the various debates... On Sun, May 17, 2015 at 9:24 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote: (Later i want to get rid of systemd-udev and use eudev instead.) I use openrc, not systemd. It still works well and has less complication - and less typing! Most people using openrc are also using systemd-udev (and there is a good chance you do too). The latter was previously named udev and long predates what most people call systemd. Eudev is a fork of udev, which comes from after it came under the systemd umbrella, but before the name change and a number of changes that were controversial. I believe they try to incorporate many of the patches from systemd-udev but some default behaviors are different. In any case, I just wanted to clarify that systemd-udev is not the systemd you're probably thinking of. In particular, it doesn't replace openrc or sysvinit. Systemd-udev largely is concerned with populating /dev, and running initialization of hardware when it is detected, based on a configurable set of rules. I intend to use XFS for /. Incidentally, if i later decide to fork out /usr (or some other subdirectory) into it's own LV, is it just a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1 works reliably, even though it does look complex when I write it like that. As far as LVM and xfs themselves go, you can do what you propose. However, Gentoo QA policy is that it is expected that /usr is mounted early in boot. Various tools can break if it is not. Typically this is the responsibility of an initramfs, however you can also use scripts that run early during initialization from / which mount it. If you just stick /usr in fstab and rely on openrc to mount it for you normally, you may or may not have problems. It has been a long time since I actually used such a system in this manner with Gentoo, but the last I saw discussion on it most who used this configuration found it usually worked fine, unless you were using something like a bluetooth keyboard or other key system component that required a lot of userspace tooling to make work. However, as a matter of policy you're on your own if you choose not to mount /usr early during boot in some way. The reason it is not supported is that with the rise of things like bluetooth the list of dependencies possibly required during early boot has grown to the point where we'd end up not even having a /usr before long. My sense is that for the most part most maintainers tend to respect the traditional definition of / and /usr on Gentoo, and thus you can often get away with doing things the traditional way. However, the policy does allow us to end debates over things like udev rules invoking some userspace tool in /usr and such. Some packages more strongly depend on /usr being installed in early boot, and there have been suggestions (but nothing concrete) that Gentoo consider supporting the /usr-move that other distros have embraced (and that would basically get rid of /lib, /bin, and so on). Again, legacy grub here. But if you're using an initramfs, from what I've seen you don't need to specify metadata 0.90. I used to use grub legacy and kernel RAID auto-assembly. As a result I was using metadata 0.90. I found this configuration problematic on rare occasions. There is a reason that mdadm changed the metadata, and why most distros don't do it this way. (more below) Damn. I've just checked and something has renamed my /dev/md7 to /dev/md127. Again. It's just too bad. I shall have to stop it when I get a quiet moment and reassemble it into /dev/md7. Actually, I know what caused it but I didn't notice at the time. And this was one of the configuration problems I ran into on rare occasion. Often booting from a rescue CD or such caused something like this to happen. One of the advantages of using an initramfs is that they can be a lot smarter about finding your partitions. You can identify them by UUID or label, and not care as much if mdadm or the
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Rich Freeman ri...@gentoo.org wrote: Just a few clarifications below. One thing this discussion is missing is any mention of BIOS / EFI. Most of the discussion below seems most relevant to a legacy BIOS installation. Many specialized Gentoo install docs, like mdadm+lvm, don't really make mention of EFI, or other more recent developments. Now that all the docs are on the wiki I'd strongly encourage anybody with an interest to improve them. Many seasoned Gentoo users barely reference the documentation these days and I think that is part of why they've become a bit dated. A few of the topics below are somewhat controversial, particularly on this list. I tried to stick to the facts and indicate where there is a difference of opinion. I'd prefer not to rehash all the various debates... On Sun, May 17, 2015 at 9:24 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote: (Later i want to get rid of systemd-udev and use eudev instead.) I use openrc, not systemd. It still works well and has less complication - and less typing! Most people using openrc are also using systemd-udev (and there is a good chance you do too). The latter was previously named udev and long predates what most people call systemd. Eudev is a fork of udev, which comes from after it came under the systemd umbrella, but before the name change and a number of changes that were controversial. I believe they try to incorporate many of the patches from systemd-udev but some default behaviors are different. In any case, I just wanted to clarify that systemd-udev is not the systemd you're probably thinking of. In particular, it doesn't replace openrc or sysvinit. Systemd-udev largely is concerned with populating /dev, and running initialization of hardware when it is detected, based on a configurable set of rules. I intend to use XFS for /. Incidentally, if i later decide to fork out /usr (or some other subdirectory) into it's own LV, is it just a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1 works reliably, even though it does look complex when I write it like that. As far as LVM and xfs themselves go, you can do what you propose. However, Gentoo QA policy is that it is expected that /usr is mounted early in boot. Various tools can break if it is not. Typically this is the responsibility of an initramfs, however you can also use scripts that run early during initialization from / which mount it. If you just stick /usr in fstab and rely on openrc to mount it for you normally, you may or may not have problems. It has been a long time since I actually used such a system in this manner with Gentoo, but the last I saw discussion on it most who used this configuration found it usually worked fine, unless you were using something like a bluetooth keyboard or other key system component that required a lot of userspace tooling to make work. However, as a matter of policy you're on your own if you choose not to mount /usr early during boot in some way. The reason it is not supported is that with the rise of things like bluetooth the list of dependencies possibly required during early boot has grown to the point where we'd end up not even having a /usr before long. My sense is that for the most part most maintainers tend to respect the traditional definition of / and /usr on Gentoo, and thus you can often get away with doing things the traditional way. However, the policy does allow us to end debates over things like udev rules invoking some userspace tool in /usr and such. Some packages more strongly depend on /usr being installed in early boot, and there have been suggestions (but nothing concrete) that Gentoo consider supporting the /usr-move that other distros have embraced (and that would basically get rid of /lib, /bin, and so on). Again, legacy grub here. But if you're using an initramfs, from what I've seen you don't need to specify metadata 0.90. I used to use grub legacy and kernel RAID auto-assembly. As a result I was using metadata 0.90. I found this configuration problematic on rare occasions. There is a reason that mdadm changed the metadata, and why most distros don't do it this way. (more below) Damn. I've just checked and something has renamed my /dev/md7 to /dev/md127. Again. It's just too bad. I shall have to stop it when I get a quiet moment and reassemble it into /dev/md7. Actually, I know what caused it but I didn't notice at the time. And this was one of the configuration problems I ran into on rare occasion. Often booting from a rescue CD or such caused something like this to happen. One of the advantages of using an initramfs
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sunday 17 May 2015 10:09:11 Rich Freeman wrote: ---8 Most people using openrc are also using systemd-udev (and there is a good chance you do too). The latter was previously named udev and long predates what most people call systemd. Eudev is a fork of udev, which comes from after it came under the systemd umbrella, but before the name change and a number of changes that were controversial. I believe they try to incorporate many of the patches from systemd-udev but some default behaviors are different. In any case, I just wanted to clarify that systemd-udev is not the systemd you're probably thinking of. In particular, it doesn't replace openrc or sysvinit. Systemd-udev largely is concerned with populating /dev, and running initialization of hardware when it is detected, based on a configurable set of rules. Thanks for the clarification. I admit I haven't kept up with developments here. On Sun, May 17, 2015 at 9:24 AM, Peter Humphrey pe...@prh.myzen.co.uk wrote: Damn. I've just checked and something has renamed my /dev/md7 to /dev/md127. Again. It's just too bad. I shall have to stop it when I get a quiet moment and reassemble it into /dev/md7. Actually, I know what caused it but I didn't notice at the time. And this was one of the configuration problems I ran into on rare occasion. Often booting from a rescue CD or such caused something like this to happen. I believe the cause in this case was forgetting an important step part-way through creating the volumes, rebooting to repair the omission and then resuming. I should have checked before now that /dev/mdX hadn't been renamed to /dev/md12X. I think it should be fairly straightforward to fix though. One of the advantages of using an initramfs is that they can be a lot smarter about finding your partitions. You can identify them by UUID or label, and not care as much if mdadm or the kernel renames your device nodes. I'd seriously take a look at dracut, though I don't know if it works with eudev. It certainly should support openrc, and I know that it did back when I was running openrc. Maybe I will. I suspect dodgy disks and I have a pair of new SSDs on the way. Perhaps it's time for a rethink. It certainly isn't necessary to use an initramfs to use Gentoo, and I used to be among the more minimalist crowd that avoided them. However, once I took the time to examine dracut it went from being a blob that looked unnecessary to a tool that is often useful. Thanks again for your contribution, Rich. -- Rgds Peter
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sun, May 17, 2015 at 6:08 PM, Stefan G. Weichinger li...@xunil.at wrote: There were problems with btrfs and the kernel a few months ago (Rich Freeman was hit by that, maybe he chimes in here), but in general for me it is still a very positive experience. It is nowhere near the stability of ext4. In the last year I've probably had 2-3 periods of time where I was getting frequent panics, or panics anytime I'd mount my filesystems rw. That said, I've never had an occasion where I couldn't mount the filesystem ro, and I've never had an actual loss of committed data. Just downtime while I sorted things out. I do keep a full daily rsnapshot backup on ext4 right now since I consider btrfs experimental. However, if I were too cheap to do that I wouldn't have actually lost anything yet. On the other hand, both btrfs and zfs will get you a level of data security that you simply won't get from ext4+lvm+mdadm - protection from silent corruption. The only time I've ever had a filesystem eat my data on linux was on ext4+lvm+mdadm actually - when I googled for the specific circumstances I think I ran into one guy on a list somewhere who had the same problem, but it is pretty rare (and one piece of advice I would give to anybody using lvm is to backup your metadata - if I had done that and was more careful about running fsck in repair mode I probably could have restored everything without issue). (For the curious, the issue was that I repaired a bunch of fsck-detected problems in one filesystem and lost a lot of data in another one. I suspect that LVM got its mapping messed up somehow, and it might have had to do with operating in degraded mode (perhaps due to a crash and need for rebuild).) A big advantage of btrfs/zfs is that everything is checksummed on disk, and the filesystem is not going to rely on anything that isn't internally consistent. In the event of a rebuild/etc it can always tell which copies are good/bad, unless you do something really crazy like split an array onto two PCs, then rebuild both, and then try to start mix the disks back together - from what I've heard btrfs lacks generation numbers/etc needed to detect this kind of problem. For personal use btrfs is great for playing around with the likely future default linux filesystem. I wouldn't go installing it on production servers in a workplace unless it was a really niche situation, and then only with appropriate steps to mitigate the risks (lots of testing of new kernel releases, backups or an ability to regenerate the system, etc). I wouldn't go so far as to say that there are no circumstances where it is the right tool for the job. You should understand the pros/cons before using it, as with any tool. -- Rich
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sun, 17 May 2015 12:48:58 +0100, Nuno Magalhães wrote: I want to use mdadm to create a RAID1 with 2 SATA disks. From what i gather, i'll need (bootable) 0xFD partitions, i'll use full disk for them and no separate /boot (unless required). Is GPT required or can i stick to MBR? Is fdisk safe? Seems usable to me. If you are not using a UEFI motherboard, you can stick to MBR. Whether you should is another question. GPT is more flexible and robust than MBR, having learned from all the shortcomings of the last 30 years of putting up with a system designed for 10MB hard disk. -- Neil Bothwick When told the reason for Daylight Saving time the old Indian said... Only a white man would believe that you could cut a foot off the top of a blanket And sew it to the bottom of a blanket and have a longer blanket. pgpvyS6T9jcsK.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On 17.05.2015 22:48, Nuno Magalhães wrote: On Sun, May 17, 2015 at 8:36 PM, Stefan G. Weichinger li...@xunil.at wrote: tl;dr ... maybe you listed some reason to stick with mdadm/lvm2/xfs etc ... sorry in that case I didn't. 2 disks with RAID1/LVM, 2 disks (maybe) with ZFS. Pairs because by board has 2 SATA channels, otherwise i'd go RAID5 and gain an extra TB. BTRFS seems a bit unstable at the moment (i could be wrong). not for your use-case = RAID1 - google for Chris Mason, btrfs, stable ... Ok, it is not as tested as XFS or ext4 ... but stable enough for desktops with a few disks (avoid RAID5/6 for now, yes .. but lev1 should be fine already). btrfs is in development still, sure (all other fs are in development as well ;) ). - So if you decide for it, keep your kernel and btrfs-progs updated ... and an eye on the btrfs-mailing-list(s). And don't overdo with the snapshots ( ... 10, ok ... hundreds, hmm ... ). backups ... no comment needed, right? There were problems with btrfs and the kernel a few months ago (Rich Freeman was hit by that, maybe he chimes in here), but in general for me it is still a very positive experience. I run it on 2 servers with RAID1-setups, a desktop with an SSD and a RAID1 for 2 hdds ... and on two laptops with dualboot-setups ... after the initial learning phase I am basically just using it and happy. No more re-partitioning hassle ... checksums overall ... snapshots if you want ... etc etc For example I cloned my working rootfs into a separate btrfs-subvolume, and rebuilt everything in there (using systemd-nspawn ... off-topic here) ... and then switched over to that rootfs by simply adding a new gummiboot entry. As you ordered 2 ssds right now this seems a perfect opportunity to start over and test something new (btrfs is in the linux kernel since 2009). good luck, have fun, Stefan
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
btrfs... ZFS... dunno... we'll see ;) On Sun, May 17, 2015 at 11:08 PM, Stefan G. Weichinger li...@xunil.at wrote: As you ordered 2 ssds right now this seems a perfect opportunity to start over and test something new (btrfs is in the linux kernel since 2009). SSDs? Nope... not yet, maybe when i use this desktop as backup i'll get an HDD caddy + SSD for the laptop. Then decide what to replace Windows on the laptop with... maybe Slackware, i've been curious about these two distros... or LFS or Devuan. We'll see. For now i'll wait 'till the RAID1 finishes sync'ing, LVM is acting weird. Then hopefully back to the Handbook. Cheers, Nuno
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sun, May 17, 2015 at 8:36 PM, Stefan G. Weichinger li...@xunil.at wrote: tl;dr ... maybe you listed some reason to stick with mdadm/lvm2/xfs etc ... sorry in that case I didn't. 2 disks with RAID1/LVM, 2 disks (maybe) with ZFS. Pairs because by board has 2 SATA channels, otherwise i'd go RAID5 and gain an extra TB. BTRFS seems a bit unstable at the moment (i could be wrong).
[gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Hello Gentoo World, TL;DR warning I've tested Gentoo and liked it, tried to tune it a bit and borked it. :) I want to use mdadm to create a RAID1 with 2 SATA disks. From what i gather, i'll need (bootable) 0xFD partitions, i'll use full disk for them and no separate /boot (unless required). Is GPT required or can i stick to MBR? Is fdisk safe? Seems usable to me. Is 0.90 metadata mandatory for RAID1? What's the recommended version? I've seen manuals that use mknode, but discovered that mdadm --create will create a /dev/md for me. (Later i want to get rid of systemd-udev and use eudev instead.) Also, why so many tty* and similar in /dev? Is there a way to make it less crowded? Just a whim... Does GRUB2 (rather grub2-install) handle well RAID1 stuff or does it get confused? What's the difference between dodmraid and domdadm? I don't want to use fakeraid, so is it safe to just use domdadm? Then i want to use LVM on the /dev/md and setup my / in an LV. This seems straightforward (as far as creation goes). Any tips here? I remember you could tune LVM LVs to the underlying RAID stripe. I intend to use XFS for /. Incidentally, if i later decide to fork out /usr (or some other subdirectory) into it's own LV, is it just a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? The problem will be (has been) getting it to boot. If i have 2 kernels in /boot, shouldn't grub2-mkconfig generate 2 entries in the GRUB boot menu (not counting the recovery entries)? I read somewhere that genkernel is a bad choice for creating the kernel because it un/sets a CONFIG_ flag that interferes with RAID/LVM (sorry, i should've noted where/what). I use make menuconfig anyway, it's fun. I do use genkernel to create the initramfs, i'm assuming genkernel --lvm --mdadm --bootloader=grub --install initramfs would suffice? I'm assuming the key will be to make sure /etc/mdadm.conf has the ARRAY= line and that GRUB has the right parameters in /etc/default/grub, like GRUB_PRELOAD_MODULES=raid,lvm Or mdraid09? Where do these come from, /etc/grub/i386pc? Mine's an amd64 but that's the only directory i could find. GRUB_CMDLINE_LINUX_DEFAULT=domdadm dolvm rootfstype=xfs Are there any USE flags i should be aware of? Currently i'm gonna go with USE=bindist 3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a smp ssl unicode -avahi -pulseaudio -selinux -gnome -kde -systemd -bluetooth -ieee1394 -networkmanager -fortran Plus CPU_FLAGS_X86 based on an emerge news item about processor flags. Neither RAID nor LVM should have an impact, application-wise. While the Handbook is awesome, it doesn't cover this and all the information i find is either outdated or conflicting. I had a similar setup with Debian Wheezy on this same hardware, but that was done through the debian installer, nifty and under the hood. Incidentally, the hardware's an Asus M2NPV-VM with 4 SATA II disks. It's my desktop, not mission-critical, but i want to make the most of it. Thanks for the patience and feedback (and the distro!) :) Cheers, Nuno
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Am 2015-05-17 um 18:05 schrieb Peter Humphrey: Maybe I will. I suspect dodgy disks and I have a pair of new SSDs on the way. Perhaps it's time for a rethink. perhaps one more thought to be thought right now: skip mdadm and lvm ... and try btrfs as you have the chance on shiny new hardware less layers, more features ... I definitely recommend giving this a try. tl;dr ... maybe you listed some reason to stick with mdadm/lvm2/xfs etc ... sorry in that case
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote: I want to use mdadm to create a RAID1 with 2 SATA disks. From what i gather, i'll need (bootable) 0xFD partitions, i'll use full disk for them and no separate /boot (unless required). Is GPT required or can i stick to MBR? Is fdisk safe? Seems usable to me. Use this guide: https://wwwold.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml Is 0.90 metadata mandatory for RAID1? What's the recommended version? You need 0.90 metadata for any volume that needs to be bootable, unless you use what Dale calls an init thingy. I don't do that, and this is my setup: /boot on /dev/md1 = /dev/sd[ab]1 in RAID1 with metadata 0.90. / on /dev/md5 = /dev/sd[ab]5 in RAID1 with metadata 0.90. [the rest] on /dev/md7 = /dev/sd[ab]7 in RAID1 with metadata 1.0. I've seen manuals that use mknode, but discovered that mdadm --create will create a /dev/md for me. I didn't know that. Interesting. (Later i want to get rid of systemd-udev and use eudev instead.) I use openrc, not systemd. It still works well and has less complication - and less typing! Also, why so many tty* and similar in /dev? Is there a way to make it less crowded? Just a whim... I tried removing them but found they'd been re-created after the next boot. Ho hum. Does GRUB2 (rather grub2-install) handle well RAID1 stuff or does it get confused? Don't know. I use legacy-grub. The last I looked, grub-2 couldn't handle the choice of kernels I have. What's the difference between dodmraid and domdadm? I don't want to use fakeraid, so is it safe to just use domdadm? I think so, yes. As far as I know, dmraid is fake raid. Then i want to use LVM on the /dev/md and setup my / in an LV. This seems straightforward (as far as creation goes). Any tips here? I remember you could tune LVM LVs to the underlying RAID stripe. I just followed the quick-installation guide. I intend to use XFS for /. Incidentally, if i later decide to fork out /usr (or some other subdirectory) into it's own LV, is it just a mater of copying its contents and updating /etc/fstab? Or should i just do it now and expand the LVs if later required (especially if i want to use different filesystems)? I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1 works reliably, even though it does look complex when I write it like that. The problem will be (has been) getting it to boot. If i have 2 kernels in /boot, shouldn't grub2-mkconfig generate 2 entries in the GRUB boot menu (not counting the recovery entries)? I read somewhere that genkernel is a bad choice for creating the kernel because it un/sets a CONFIG_ flag that interferes with RAID/LVM (sorry, i should've noted where/what). I use make menuconfig anyway, it's fun. I do use genkernel to create the initramfs, i'm assuming genkernel --lvm --mdadm --bootloader=grub --install initramfs would suffice? Again, legacy grub here. But if you're using an initramfs, from what I've seen you don't need to specify metadata 0.90. ---8 While the Handbook is awesome, it doesn't cover this and all the information i find is either outdated or conflicting. I reinstalled yesterday while following the guide I cited. Damn. I've just checked and something has renamed my /dev/md7 to /dev/md127. Again. It's just too bad. I shall have to stop it when I get a quiet moment and reassemble it into /dev/md7. Actually, I know what caused it but I didn't notice at the time. HTH. -- Rgds Peter