Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Alan McKinnon
On 30/08/2013 07:21, J. Roeleveld wrote:
> Canek,
> 
> LVs can be resized while the system is running. It also depends on the
> actual filesystem, but extending can be done online with all filesystems
> I am aware of.
> Shrinking is not possible with all.

no fs can be reduced whilst mounted, most especially the inode based ones

This makes reducing / somewhat tricky as requires system downtime.
The usual approach sysadmins use is to estimate size conservatively and
make them larger as needed (effectively avoiding reducing any as much as
possible).

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Alan McKinnon
On 30/08/2013 07:36, Canek Peláez Valdés wrote:
> On Fri, Aug 30, 2013 at 12:21 AM, J. Roeleveld  wrote:
>> gottl...@nyu.edu wrote:
>>> On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
>>>
 On Thu, Aug 29, 2013 at 4:19 PM,  wrote:
>
> I have experience with LVM, but not systemd or dracut or initramfs
>
> * both grub and grub2 support lvm

 Does GRUB legacy handles /boot in LVM? I haven't tried that yet.
>>>
>>> That I don't know. I believe the LVM "companion manual" that I am
>>> seeking and that I used for previous installs advised against /boot on
>>> lvm (probably also /lib and others). Perhaps this was simply
>>> reflecting
>>> no initramfs. Hence any grub issue with /boot on lvm didn't arise.
>>>
>>> allan
>>
>> No.
>>
>> Grub legacy does not support LVM for the /boot.
>> That's why I have it there.
>>
>> UEFI only understands FAT. Which means you need to have a boot partition
>> outside of LVM for that.
> 
> Good to know, thanks. Another reason not to use LVM I guess.

Why not use LVM?

Yes, it is some added complexity you need to understand but it stays out
of your way till you need it, doesn't affect disk efficiency in any
significant way and just works. When you need the services it offers
they are there and until then just use mkfs and mount the block device
it offers.

Unless you have all your filesystems part of / itself, you run the risk
of hitting hard limits rapidly and LVM gives you a proper way to deal
with that, unlike using rigid partitions directly. I see a small amount
of new code to understand followed by huge benefits.

The best way to deal with this actual issue is the ZFS/btrfs approach
but those aren't usable for the masses yet, whereas LVM is.


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Alan McKinnon
On 30/08/2013 03:45, gottl...@nyu.edu wrote:
> On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
> 
>> On Thu, Aug 29, 2013 at 4:19 PM,   wrote:
>>>
>>> I have experience with LVM, but not systemd or dracut or initramfs
>>>
>>> * both grub and grub2 support lvm
>>
>> Does GRUB legacy handles /boot in LVM? I haven't tried that yet.
> 
> That I don't know.  I believe the LVM "companion manual" that I am
> seeking and that I used for previous installs advised against /boot on
> lvm (probably also /lib and others).  Perhaps this was simply reflecting
> no initramfs.  Hence any grub issue with /boot on lvm didn't arise.

I believe this is correct

grub-legacy never did directly support reading lvm volumes,
you must use an initramfs


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Canek Peláez Valdés
On Fri, Aug 30, 2013 at 12:21 AM, J. Roeleveld  wrote:
> gottl...@nyu.edu wrote:
>>On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
>>
>>> On Thu, Aug 29, 2013 at 4:19 PM,  wrote:

 I have experience with LVM, but not systemd or dracut or initramfs

 * both grub and grub2 support lvm
>>>
>>> Does GRUB legacy handles /boot in LVM? I haven't tried that yet.
>>
>>That I don't know. I believe the LVM "companion manual" that I am
>>seeking and that I used for previous installs advised against /boot on
>>lvm (probably also /lib and others). Perhaps this was simply
>>reflecting
>>no initramfs. Hence any grub issue with /boot on lvm didn't arise.
>>
>>allan
>
> No.
>
> Grub legacy does not support LVM for the /boot.
> That's why I have it there.
>
> UEFI only understands FAT. Which means you need to have a boot partition
> outside of LVM for that.

Good to know, thanks. Another reason not to use LVM I guess.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] looking for a couple of systemd units

2013-08-29 Thread Canek Peláez Valdés
On Fri, Aug 30, 2013 at 12:24 AM, Graham Murray  wrote:
> "Stefan G. Weichinger"  writes:
>
>> Just found this note from Pacho on planet.gentoo.org:
>>
>> http://my.opera.com/pacho/blog/2013/08/27/how-to-write-proper-systemd-unit-files
>>
>> I will have to review some of my files then ;-)
>
> What I did not understand from reading that is why he (or gentoo policy)
> does not like 'type=forking'. Reading the systemd man files, I thought
> that type=forking would be the "natural" choice for most daemons.

On the contrary; with Type=simple systemd has better control on the
service, since systemd itself execv() the service binary, and it can
know precisely its PID and when it finishes. With Type=forking systemd
has to guess what the PID is, and therefore it nees more work to know
the status of the service. It does a pretty good job, but it's easier
with Type=simple.

Type=forking is there for old daemons that don't have a --foreground
or similar option.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] looking for a couple of systemd units

2013-08-29 Thread Graham Murray
"Stefan G. Weichinger"  writes:

> Just found this note from Pacho on planet.gentoo.org:
>
> http://my.opera.com/pacho/blog/2013/08/27/how-to-write-proper-systemd-unit-files
>
> I will have to review some of my files then ;-)

What I did not understand from reading that is why he (or gentoo policy)
does not like 'type=forking'. Reading the systemd man files, I thought
that type=forking would be the "natural" choice for most daemons.



Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread J. Roeleveld
gottl...@nyu.edu wrote:
>On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
>
>> On Thu, Aug 29, 2013 at 4:19 PM,   wrote:
>>>
>>> I have experience with LVM, but not systemd or dracut or initramfs
>>>
>>> * both grub and grub2 support lvm
>>
>> Does GRUB legacy handles /boot in LVM? I haven't tried that yet.
>
>That I don't know.  I believe the LVM "companion manual" that I am
>seeking and that I used for previous installs advised against /boot on
>lvm (probably also /lib and others).  Perhaps this was simply
>reflecting
>no initramfs.  Hence any grub issue with /boot on lvm didn't arise.
>
>allan

No.

Grub legacy does not support LVM for the /boot.
That's why I have it there.

UEFI only understands FAT. Which means you need to have a boot partition 
outside of LVM for that.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread J. Roeleveld
"Canek Peláez Valdés"  wrote:
>On Thu, Aug 29, 2013 at 10:47 AM,   wrote:
>> I want to reinstall an old system to have combined root+usr.
>>
>> I have always used an lvm installation guide that was a "companion"
>to
>> the handbook.  That is it would tell you how to augment each handbook
>> installation chapter for lvm (actually lvm2).
>>
>> I can't find this documentation now on gentoo.org.  There is a big
>wiki
>> page, but that is different as are daniel's 2-volume "learning linux
>> lvm".
>>
>> The closest I found is the raid+lvm quick install guide, but i would
>be
>> happier with the one I have used often in the past.
>>
>> Any clues (I am emotionally prepared to learn that it is right there
>on
>> the installation web page, but my eyes and search commands are
>> deficient).
>
>As James said, the docs are being reorganized. However, I did a
>systemd+LVM installation (just because I was getting tired of not
>knowing what the fuss was all about), and (in my experience) there are
>almost no changes from the regular installation in the handbook.
>
>I put everything in LVM (/, /boot, everything). From my notes, the
>only changes are:
>
>From the livecd:
>1. Use partitions, not whole disks (GRUB2 got confused when I tried to
>use whole disks).
>2. Set the partition type as LVM (8e in fdisk).
>3. Create the Physical Volume, the Volume Group, and the Logical
>Volumes as desired.
>4. Continue the normal installation, just using /dev/vg0/lvolX (or
>whatever names you choose).
>
>After the chroot and emerging the kernel package:
>1. Se the LVM options in the kernel. Compile, install it.
>2. Emerge systemd.
>3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at
>least).
>4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
>5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
>touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
>autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
>investigated why.
>6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
>works with LVM, but GRUB2 does, so I used that.
>7. Set GRUB_PRELOAD_MODULES="lvm",
>GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
>/etc/default/grub.
>8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
>with grub2-install.
>9. Reboot. Everything works.
>
>GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
>simple (the VG was just the only partition of all my disks).
>dracut+systemd takes care of everything else; I didn't even had to do
>something special in fstab, since I used labels.
>
>To extend/reduce your Logical Volumes you will need a livecd, or a
>more complex initramfs, though.
>
>Regards.

Canek,

LVs can be resized while the system is running. It also depends on the actual 
filesystem, but extending can be done online with all filesystems I am aware of.
Shrinking is not possible with all.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread J. Roeleveld
"Canek Peláez Valdés"  wrote:
>On Thu, Aug 29, 2013 at 10:47 AM,   wrote:
>> I want to reinstall an old system to have combined root+usr.
>>
>> I have always used an lvm installation guide that was a "companion"
>to
>> the handbook.  That is it would tell you how to augment each handbook
>> installation chapter for lvm (actually lvm2).
>>
>> I can't find this documentation now on gentoo.org.  There is a big
>wiki
>> page, but that is different as are daniel's 2-volume "learning linux
>> lvm".
>>
>> The closest I found is the raid+lvm quick install guide, but i would
>be
>> happier with the one I have used often in the past.
>>
>> Any clues (I am emotionally prepared to learn that it is right there
>on
>> the installation web page, but my eyes and search commands are
>> deficient).
>
>As James said, the docs are being reorganized. However, I did a
>systemd+LVM installation (just because I was getting tired of not
>knowing what the fuss was all about), and (in my experience) there are
>almost no changes from the regular installation in the handbook.
>
>I put everything in LVM (/, /boot, everything). From my notes, the
>only changes are:
>
>From the livecd:
>1. Use partitions, not whole disks (GRUB2 got confused when I tried to
>use whole disks).
>2. Set the partition type as LVM (8e in fdisk).
>3. Create the Physical Volume, the Volume Group, and the Logical
>Volumes as desired.
>4. Continue the normal installation, just using /dev/vg0/lvolX (or
>whatever names you choose).
>
>After the chroot and emerging the kernel package:
>1. Se the LVM options in the kernel. Compile, install it.
>2. Emerge systemd.
>3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at
>least).
>4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
>5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
>touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
>autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
>investigated why.
>6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
>works with LVM, but GRUB2 does, so I used that.
>7. Set GRUB_PRELOAD_MODULES="lvm",
>GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
>/etc/default/grub.
>8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
>with grub2-install.
>9. Reboot. Everything works.
>
>GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
>simple (the VG was just the only partition of all my disks).
>dracut+systemd takes care of everything else; I didn't even had to do
>something special in fstab, since I used labels.
>
>To extend/reduce your Logical Volumes you will need a livecd, or a
>more complex initramfs, though.
>
>Regards.

Canek,

LVs can be resized while the system is running. It also depends on the actual 
filesystem, but extending can be done online with all filesystems I am aware of.
Shrinking is not possible with all.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread J. Roeleveld
gottl...@nyu.edu wrote:
>I want to reinstall an old system to have combined root+usr.
>
>I have always used an lvm installation guide that was a "companion" to
>the handbook.  That is it would tell you how to augment each handbook
>installation chapter for lvm (actually lvm2).
>
>I can't find this documentation now on gentoo.org.  There is a big wiki
>page, but that is different as are daniel's 2-volume "learning linux
>lvm".
>
>The closest I found is the raid+lvm quick install guide, but i would be
>happier with the one I have used often in the past.
>
>Any clues (I am emotionally prepared to learn that it is right there on
>the installation web page, but my eyes and search commands are
>deficient).
>
>thanks,
>allan

Allan,

Use the raid+LVM guide and skip all the raid steps.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Canek Peláez Valdés
On Thu, Aug 29, 2013 at 8:45 PM,   wrote:
> On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
>
>> On Thu, Aug 29, 2013 at 4:19 PM,   wrote:
>>>
>>> I have experience with LVM, but not systemd or dracut or initramfs
>>>
>>> * both grub and grub2 support lvm
>>
>> Does GRUB legacy handles /boot in LVM? I haven't tried that yet.
>
> That I don't know.  I believe the LVM "companion manual" that I am
> seeking and that I used for previous installs advised against /boot on
> lvm (probably also /lib and others).  Perhaps this was simply reflecting
> no initramfs.  Hence any grub issue with /boot on lvm didn't arise.

I believe is orthogonal to an initramfs. The initramfs lives in /boot,
and if the boot loader (LILO, GRUB, GRUB2) cannot mount /boot, then
there is no initramfs. That's why GRUB2 is so damn big (it implements
LVM among other things, or at least the minimal to mount partitions
read only), and why some people are pushing for "Linux to boot Linux",
sometimes called /firstboot.

GRUB2 can mount my /boot inside LVM. Perhaps with UEFI all this will
become irrelevant.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread gottlieb
On Thu, Aug 29 2013, Canek Peláez Valdés wrote:

> On Thu, Aug 29, 2013 at 4:19 PM,   wrote:
>>
>> I have experience with LVM, but not systemd or dracut or initramfs
>>
>> * both grub and grub2 support lvm
>
> Does GRUB legacy handles /boot in LVM? I haven't tried that yet.

That I don't know.  I believe the LVM "companion manual" that I am
seeking and that I used for previous installs advised against /boot on
lvm (probably also /lib and others).  Perhaps this was simply reflecting
no initramfs.  Hence any grub issue with /boot on lvm didn't arise.

allan



Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Canek Peláez Valdés
On Thu, Aug 29, 2013 at 4:19 PM,   wrote:
> On Thu, Aug 29 2013, Canek Peláez Valdés wrote:
>
>> As James said, the docs are being reorganized. However, I did a
>> systemd+LVM installation (just because I was getting tired of not
>> knowing what the fuss was all about), and (in my experience) there are
>> almost no changes from the regular installation in the handbook.
>>
>> I put everything in LVM (/, /boot, everything).
>
> I am not so ambitious.  /+/boot+/usr one ext4 partition not on lvm
>
>> From my notes, the only changes are:
>>
>>>From the livecd:
>> 1. Use partitions, not whole disks (GRUB2 got confused when I tried to
>> use whole disks).
>> 2. Set the partition type as LVM (8e in fdisk).
>> 3. Create the Physical Volume, the Volume Group, and the Logical
>> Volumes as desired.
>> 4. Continue the normal installation, just using /dev/vg0/lvolX (or
>> whatever names you choose).
>
> There is a little more (activating or something the LVs) especially if
> you shutdown in the middle of the installation and resume it later.
>
>> After the chroot and emerging the kernel package:
>> 1. Se the LVM options in the kernel. Compile, install it.
>> 2. Emerge systemd.
>> 3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at 
>> least).
>> 4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
>> 5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
>> touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
>> autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
>> investigated why.
>> 6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
>> works with LVM, but GRUB2 does, so I used that.
>> 7. Set GRUB_PRELOAD_MODULES="lvm",
>> GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
>> /etc/default/grub.
>> 8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
>> with grub2-install.
>> 9. Reboot. Everything works.
>>
>> GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
>> simple (the VG was just the only partition of all my disks).
>> dracut+systemd takes care of everything else; I didn't even had to do
>> something special in fstab, since I used labels.
>>
>> To extend/reduce your Logical Volumes you will need a livecd, or a
>> more complex initramfs, though.
>>
>> Regards.
>
> I have experience with LVM, but not systemd or dracut or initramfs
>
> * both grub and grub2 support lvm

Does GRUB legacy handles /boot in LVM? I haven't tried that yet.

> * Never did 2,3,4,5,7, or the initramfs part of 8
>
> My goal is to have this system (an older laptop) setup like my current
> laptop (grub2, openrc, root+/usr, etc).  Then I will convert OLD to
> systemd.  Once I have done this and moved my work from CURRENT to OLD, I
> will convert CURRENT to systemd and move back.

That sounds complex.

> thanks to you and james for your helpful comments.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread gottlieb
On Thu, Aug 29 2013, Canek Peláez Valdés wrote:

> As James said, the docs are being reorganized. However, I did a
> systemd+LVM installation (just because I was getting tired of not
> knowing what the fuss was all about), and (in my experience) there are
> almost no changes from the regular installation in the handbook.
>
> I put everything in LVM (/, /boot, everything).

I am not so ambitious.  /+/boot+/usr one ext4 partition not on lvm

> From my notes, the only changes are:
>
>>From the livecd:
> 1. Use partitions, not whole disks (GRUB2 got confused when I tried to
> use whole disks).
> 2. Set the partition type as LVM (8e in fdisk).
> 3. Create the Physical Volume, the Volume Group, and the Logical
> Volumes as desired.
> 4. Continue the normal installation, just using /dev/vg0/lvolX (or
> whatever names you choose).

There is a little more (activating or something the LVs) especially if
you shutdown in the middle of the installation and resume it later.

> After the chroot and emerging the kernel package:
> 1. Se the LVM options in the kernel. Compile, install it.
> 2. Emerge systemd.
> 3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at 
> least).
> 4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
> 5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
> touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
> autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
> investigated why.
> 6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
> works with LVM, but GRUB2 does, so I used that.
> 7. Set GRUB_PRELOAD_MODULES="lvm",
> GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
> /etc/default/grub.
> 8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
> with grub2-install.
> 9. Reboot. Everything works.
>
> GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
> simple (the VG was just the only partition of all my disks).
> dracut+systemd takes care of everything else; I didn't even had to do
> something special in fstab, since I used labels.
>
> To extend/reduce your Logical Volumes you will need a livecd, or a
> more complex initramfs, though.
>
> Regards.

I have experience with LVM, but not systemd or dracut or initramfs

* both grub and grub2 support lvm
* Never did 2,3,4,5,7, or the initramfs part of 8

My goal is to have this system (an older laptop) setup like my current
laptop (grub2, openrc, root+/usr, etc).  Then I will convert OLD to
systemd.  Once I have done this and moved my work from CURRENT to OLD, I
will convert CURRENT to systemd and move back.

thanks to you and james for your helpful comments.

allan



Re: [gentoo-user] Re: where did lvm installation guide go?

2013-08-29 Thread gottlieb
On Thu, Aug 29 2013, James wrote:

>   nyu.edu> writes:
>
>
>> I can't find this documentation now on gentoo.org.  There is a big wiki
>> page, but that is different as are daniel's 2-volume "learning linux
>> lvm".
>
> Gentoo is massively reorganizing documentation. The old
> "system" was arcane, and a fools errand to try to use.
> A Few stalwarts resisted change for a long time. Gentoo-doc
> teams needs lots of volunteers.

I should volunteer.

> You most accurate resource  is to communicate with the
> gentoo-doc team directly. At the least, old version
> of deprecated documents might still be around?
>
> Good-Hunting,
> James

Thanks,
allan



Re: [gentoo-user] where did lvm installation guide go?

2013-08-29 Thread Canek Peláez Valdés
On Thu, Aug 29, 2013 at 10:47 AM,   wrote:
> I want to reinstall an old system to have combined root+usr.
>
> I have always used an lvm installation guide that was a "companion" to
> the handbook.  That is it would tell you how to augment each handbook
> installation chapter for lvm (actually lvm2).
>
> I can't find this documentation now on gentoo.org.  There is a big wiki
> page, but that is different as are daniel's 2-volume "learning linux
> lvm".
>
> The closest I found is the raid+lvm quick install guide, but i would be
> happier with the one I have used often in the past.
>
> Any clues (I am emotionally prepared to learn that it is right there on
> the installation web page, but my eyes and search commands are
> deficient).

As James said, the docs are being reorganized. However, I did a
systemd+LVM installation (just because I was getting tired of not
knowing what the fuss was all about), and (in my experience) there are
almost no changes from the regular installation in the handbook.

I put everything in LVM (/, /boot, everything). From my notes, the
only changes are:

>From the livecd:
1. Use partitions, not whole disks (GRUB2 got confused when I tried to
use whole disks).
2. Set the partition type as LVM (8e in fdisk).
3. Create the Physical Volume, the Volume Group, and the Logical
Volumes as desired.
4. Continue the normal installation, just using /dev/vg0/lvolX (or
whatever names you choose).

After the chroot and emerging the kernel package:
1. Se the LVM options in the kernel. Compile, install it.
2. Emerge systemd.
3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at least).
4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
investigated why.
6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
works with LVM, but GRUB2 does, so I used that.
7. Set GRUB_PRELOAD_MODULES="lvm",
GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
/etc/default/grub.
8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
with grub2-install.
9. Reboot. Everything works.

GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
simple (the VG was just the only partition of all my disks).
dracut+systemd takes care of everything else; I didn't even had to do
something special in fstab, since I used labels.

To extend/reduce your Logical Volumes you will need a livecd, or a
more complex initramfs, though.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



[gentoo-user] Re: where did lvm installation guide go?

2013-08-29 Thread James
  nyu.edu> writes:


> I can't find this documentation now on gentoo.org.  There is a big wiki
> page, but that is different as are daniel's 2-volume "learning linux
> lvm".

Gentoo is massively reorganizing documentation. The old
"system" was arcane, and a fools errand to try to use.
A Few stalwarts resisted change for a long time. Gentoo-doc
teams needs lots of volunteers.

You most accurate resource  is to communicate with the
gentoo-doc team directly. At the least, old version
of deprecated documents might still be around?

Good-Hunting,
James

gentoo-...@lists.gentoo.org


On 07/24/13 16:59, Sven Vermeulen wrote:
> Hi guys
> 
> If you're following commits, you'll notice that I'm in the process of moving
> documents from the www.gentoo.org/doc/en location to the Gentoo wiki.
> Currently, I'm basing myself on the bugs we have open for the documents that
> haven't been touched in a while, or that are for guides that aren't fully
> maintained.
> 
> Once that is done, I will move the guides that haven't been touched in a
> while as well (starting last edit 2003, then 2004, etc.) and those that I am
> the main author for (as I'll be doing my edits in the Gentoo wiki).
> 
> The translation support in the Gentoo Wiki is working quite well imo
> (correct me if I'm wrong) as it supports translations almost simultaneously
> by multiple translators. Also, the process for editing is "now" rather than
> having people become potential recruitees first.
> 
> During the majority of documentation moves, I will probably update the main
> site link from the Gentoo site (towards /doc/en/list.xml) towards a page (or
> category) that presents all documents on the wiki that are marked as
> translatable. Personally, I think only those documents that are well
> reviewed and edited should be marked as translatable, which is why I haven't
> gone through the entire wiki site marking all articles as translatable.




[gentoo-user] where did lvm installation guide go?

2013-08-29 Thread gottlieb
I want to reinstall an old system to have combined root+usr.

I have always used an lvm installation guide that was a "companion" to
the handbook.  That is it would tell you how to augment each handbook
installation chapter for lvm (actually lvm2).

I can't find this documentation now on gentoo.org.  There is a big wiki
page, but that is different as are daniel's 2-volume "learning linux
lvm".

The closest I found is the raid+lvm quick install guide, but i would be
happier with the one I have used often in the past.

Any clues (I am emotionally prepared to learn that it is right there on
the installation web page, but my eyes and search commands are
deficient).

thanks,
allan



Re: [gentoo-user] HA-Proxy or iptables?

2013-08-29 Thread Pandu Poluan
On Aug 29, 2013 7:13 PM, "Randy Barlow"  wrote:
>
> Honestly, I think the best solution is to switch the company to using
domain names to access these resources. This makes it much easier to
silently introduce things like load balancers later on if you ever need to
scale. It's also much easier to communicate to new users how to find this
resource. Once you migrate to IPv6 it becomes a very long address to tell
people as well.
>

I agree, but considering that the split is Really Urgent™, I'll just have
to make do with redirection for the time being.

> To answer your specific question, I would just do it with iptables if you
must continue accessing it by IP address. I will point out that the service
on the new IP address now has doubled its chances of going out of service,
because it depends on both machines running, even though the first has
nothing to do with it. Also, doing this with firewall rules isn't very nice
from a systems management perspective for the future, as it's not very
obvious what's going on with some server rewriting packets for another one.
If someone sees that in two years, are they going to know what to do? What
if they want to take server 1 down, and forget that it also disrupts 2?
Using DNS is much cleaner for these reasons.

Again , I agree 100%.

Fortunately, nobody is allowed to bring down a server without my team's
blessing, so if they ever need to bring the server down, we will force them
to arrange a schedule with the other team.

Rgds,
--


Re: [gentoo-user] HA-Proxy or iptables?

2013-08-29 Thread Pandu Poluan
On Aug 29, 2013 7:46 PM, "thegeezer"  wrote:
>
> On 08/29/2013 01:12 PM, Randy Barlow wrote:
> > Honestly, I think the best solution is to switch the company to using
domain names to access these resources. This makes it much easier to
silently introduce things like load balancers later on if you ever need to
scale. It's also much easier to communicate to new users how to find this
resource. Once you migrate to IPv6 it becomes a very long address to tell
people as well.
> >
> > To answer your specific question, I would just do it with iptables if
you must continue accessing it by IP address. I will point out that the
service on the new IP address now has doubled its chances of going out of
service, because it depends on both machines running, even though the first
has nothing to do with it. Also, doing this with firewall rules isn't very
nice from a systems management perspective for the future, as it's not very
obvious what's going on with some server rewriting packets for another one.
If someone sees that in two years, are they going to know what to do? What
if they want to take server 1 down, and forget that it also disrupts 2?
Using DNS is much cleaner for these reasons.
> With iptables this could be tricky if everything is in the same LAN
> subnet, you will need to ensure you have both DNAT and SNAT otherwise
> you will have:
> PC ---> serverA:3000 ---DNAT> serverB
> serverB ---replies---> PC
> PC ignores packet "i wasn't talking to you, i was talking to serverA"
>

I do have some experience with double NAT-ting, but thanks for the reminder
anyways :-)

> Also bear in mind that from serverB's perspective, all connections on
> port 3000 will appear to come from serverA.  I know that a VT based
> terminal server can  set up users based on their originating IP, which
> would previously have been a good detector of which terminal they are
> connecting from.
>

Luckily, to the best of my knowledge, the apps do not make such
distinction, so I can get away with such sleight of hand...

> Rather than using iptables on serverA, you may like to consider EBtables
> or IPtables on a server that sits in front of both serverA and serverB.
> this would act as a bridge, and rewrite packets for serverA on port 3000
> to go to serverB on port 3000
> or
> it could act as a router for NAT (iptables) if you change the ip subnet
> of serverA and serverB, and make the NAT box have the original IP of
serverA
> this would allow connections by IP to be tracked
>

Interesting... I'll consider that. Although not strictly needed, tracking
by IP will certainly be helpful.

Thank you for the tip!


Re: [gentoo-user] grub2 or kernel config - unable to properly boot [NOT SOLVED]

2013-08-29 Thread Francisco Ares
2013/8/29 Gregory Shearman 

> In linux.gentoo.user, you wrote:
> >>
> >> search for CONSOLE in this file and find:
> >>
> >> # exec >${CONSOLE} <${CONSOLE} 2>&1
> >>
> >> Just remove the hash at the start of the line, rebuild my initramfs
> >> and it is ready to go.
> >>
> >> --
> >> Regards,
> >> Gregory.
> >>
> >>
> >
> > Thanks Gregory.
> >
> > I really would like to find that partition number limitation on genkernel
> > in the docs.
>
> I've never had that problem but then I've always made /boot my first
> partition.
>
> > I have already had that splash screen problem, very interesting your
> > solution. That's a big reason I love Gentoo, always learning something
> new.
> > Funny thing is that checking the file you've mentioned in this new
> system,
> > it has no hash at that line (line number 13, right?). On the other
> working
> > system, the same, no hash.
>
> No, the line is 149.
>
> You see, I've got this as part of my kernel command line:
>
> console=tty1
>
> The code section from the linuxrc file is part of the kernel command
> line check as part of a bash(sh) "do" loop:
>
> CONSOLE=*|console=*)
> CONSOLE=${x#*=}
> CONSOLE=$(basename ${CONSOLE})
> #   exec >${CONSOLE} <${CONSOLE} 2>&1
>
> If you change your "console=" value on the command line then the new
> console choice is redirected. If the hash is in place then the
> console is not redirected and usually you get console output writing all
> over your splash screen.
>
>
> > I'm using genkernel-3.4.45.1 on both systems, perhaps not the same as
> you.
> >
> > Regarding that last issue, the message complaining that the root
> partition
> > is not a valid block device _is still there_, only masked by the splash
> > (which now is "verbose").
> >
> > I was optimistic in believing everything would work as expected once I
> > found that detail.
>
> I'm not sure I can help you here. My root filesystem is on an LVM volume
> (as are all the rest of my filesystems except for my /boot partition.
>
> --
> Regards,
> Gregory.
>
>
Thanks, Gregory.


Best regards,
Francisco


Re: [gentoo-user] grub2 or kernel config - unable to properly boot [NOT SOLVED]

2013-08-29 Thread Gregory Shearman
In linux.gentoo.user, you wrote:
>>
>> search for CONSOLE in this file and find:
>>
>> # exec >${CONSOLE} <${CONSOLE} 2>&1
>>
>> Just remove the hash at the start of the line, rebuild my initramfs
>> and it is ready to go.
>>
>> --
>> Regards,
>> Gregory.
>>
>>
>
> Thanks Gregory.
>
> I really would like to find that partition number limitation on genkernel
> in the docs.

I've never had that problem but then I've always made /boot my first
partition.

> I have already had that splash screen problem, very interesting your
> solution. That's a big reason I love Gentoo, always learning something new.
> Funny thing is that checking the file you've mentioned in this new system,
> it has no hash at that line (line number 13, right?). On the other working
> system, the same, no hash.

No, the line is 149. 

You see, I've got this as part of my kernel command line:

console=tty1

The code section from the linuxrc file is part of the kernel command
line check as part of a bash(sh) "do" loop:

CONSOLE=*|console=*)
CONSOLE=${x#*=}
CONSOLE=$(basename ${CONSOLE})
#   exec >${CONSOLE} <${CONSOLE} 2>&1

If you change your "console=" value on the command line then the new
console choice is redirected. If the hash is in place then the
console is not redirected and usually you get console output writing all
over your splash screen.


> I'm using genkernel-3.4.45.1 on both systems, perhaps not the same as you.
>
> Regarding that last issue, the message complaining that the root partition
> is not a valid block device _is still there_, only masked by the splash
> (which now is "verbose").
>
> I was optimistic in believing everything would work as expected once I
> found that detail.

I'm not sure I can help you here. My root filesystem is on an LVM volume
(as are all the rest of my filesystems except for my /boot partition.

-- 
Regards,
Gregory.



Re: [gentoo-user] HA-Proxy or iptables?

2013-08-29 Thread thegeezer
On 08/29/2013 01:12 PM, Randy Barlow wrote:
> Honestly, I think the best solution is to switch the company to using domain 
> names to access these resources. This makes it much easier to silently 
> introduce things like load balancers later on if you ever need to scale. It's 
> also much easier to communicate to new users how to find this resource. Once 
> you migrate to IPv6 it becomes a very long address to tell people as well.
>
> To answer your specific question, I would just do it with iptables if you 
> must continue accessing it by IP address. I will point out that the service 
> on the new IP address now has doubled its chances of going out of service, 
> because it depends on both machines running, even though the first has 
> nothing to do with it. Also, doing this with firewall rules isn't very nice 
> from a systems management perspective for the future, as it's not very 
> obvious what's going on with some server rewriting packets for another one. 
> If someone sees that in two years, are they going to know what to do? What if 
> they want to take server 1 down, and forget that it also disrupts 2? Using 
> DNS is much cleaner for these reasons.
With iptables this could be tricky if everything is in the same LAN
subnet, you will need to ensure you have both DNAT and SNAT otherwise
you will have:
PC ---> serverA:3000 ---DNAT> serverB
serverB ---replies---> PC
PC ignores packet "i wasn't talking to you, i was talking to serverA"

Also bear in mind that from serverB's perspective, all connections on
port 3000 will appear to come from serverA.  I know that a VT based
terminal server can  set up users based on their originating IP, which
would previously have been a good detector of which terminal they are
connecting from.

Rather than using iptables on serverA, you may like to consider EBtables
or IPtables on a server that sits in front of both serverA and serverB.
this would act as a bridge, and rewrite packets for serverA on port 3000
to go to serverB on port 3000
or
it could act as a router for NAT (iptables) if you change the ip subnet
of serverA and serverB, and make the NAT box have the original IP of serverA
this would allow connections by IP to be tracked

hth





Re: [gentoo-user] HA-Proxy or iptables?

2013-08-29 Thread Randy Barlow
Honestly, I think the best solution is to switch the company to using domain 
names to access these resources. This makes it much easier to silently 
introduce things like load balancers later on if you ever need to scale. It's 
also much easier to communicate to new users how to find this resource. Once 
you migrate to IPv6 it becomes a very long address to tell people as well.

To answer your specific question, I would just do it with iptables if you must 
continue accessing it by IP address. I will point out that the service on the 
new IP address now has doubled its chances of going out of service, because it 
depends on both machines running, even though the first has nothing to do with 
it. Also, doing this with firewall rules isn't very nice from a systems 
management perspective for the future, as it's not very obvious what's going on 
with some server rewriting packets for another one. If someone sees that in two 
years, are they going to know what to do? What if they want to take server 1 
down, and forget that it also disrupts 2? Using DNS is much cleaner for these 
reasons.

Re: [gentoo-user] grub2 or kernel config - unable to properly boot [NOT SOLVED]

2013-08-29 Thread Francisco Ares
2013/8/28 Gregory Shearman 

> In linux.gentoo.user, you wrote:
> >
> > While trying to learn about dracut, I found a detail that made me look
> > closer to the genkernel generated initramfs, and I found that the error
> > message was perfectly clear: there was no /dev/sda5, where my "real_root"
> > is, that initramfs has just /dev/sda1 to /dev/sda4 .
> >
> > I think it must be a limitation on genkernel part, although I was unable
> to
> > find anything related to this issue up to now.
>
> It appears as if genkernel can only boot off real, not extended
> partitions.
>
> > So now I have rearranged the partitions, using just the first ones. Now I
> > got a stuck splash image, no initialization shown, no progress bar
> > moving... but this is another problem, probably I forgot to change
> > something to reflect the new partitioning scheme.
>
> It could be a tty problem. If I use genkernel unchanged I get a weird
> splash screen and the boot dialog writes all over my splash screen. What
> I have to do evey time an emerge updates my genkernel is:
>
> edit my /usr/share/genkernel/defaults/linuxrc file
>
> search for CONSOLE in this file and find:
>
> # exec >${CONSOLE} <${CONSOLE} 2>&1
>
> Just remove the hash at the start of the line, rebuild my initramfs
> and it is ready to go.
>
> --
> Regards,
> Gregory.
>
>

Thanks Gregory.

I really would like to find that partition number limitation on genkernel
in the docs.

I have already had that splash screen problem, very interesting your
solution. That's a big reason I love Gentoo, always learning something new.
Funny thing is that checking the file you've mentioned in this new system,
it has no hash at that line (line number 13, right?). On the other working
system, the same, no hash.

I'm using genkernel-3.4.45.1 on both systems, perhaps not the same as you.

Regarding that last issue, the message complaining that the root partition
is not a valid block device _is still there_, only masked by the splash
(which now is "verbose").

I was optimistic in believing everything would work as expected once I
found that detail.

Francisco


[gentoo-user] kernel with DRM = blank screen

2013-08-29 Thread Helmut Jarausch

Hi,

I have an old HP 625 laptop with an ATI RS880 HDMI Audio [Radeon HD  
4200 Series]

chip on board.

The xf86-video-ati driver needs DRM (direct rendering support) in the  
kernel.
Unfortunately, if (and only if) I enable DRM (built in or as module) in  
a recent kernel
like gentoo-sources-3.10.9, the kernel freezes with a blank screen  
during boot, i.e.

long before xorg-server is started (only by hand in my case).

So, what can I try to fix this (some IOAPIC switches on the boot  
command line)?


Many thanks for a hint,
Helmut


[gentoo-user] HA-Proxy or iptables?

2013-08-29 Thread Pandu Poluan
Hello list!

Here's my scenario:

Currently there is a server performing 2 functions; one runs on, let's
say, port 2000, and another one runs on port 3000.

Due to some necessary changes, especially the need to (1) provide more
resource for a function, and (2) delegate management of the functions
to different teams, we are going to split the server into two.

The problem is: Many users -- spread among 80+ branches throughout the
country -- access the server using IP Address instead of DNS name.

So, my plan was to leave port 2000's application on the original
server, implement port 3000's application on a new server, and have
all access to port 3000 of the original server to be redirected to
same port on the new server.

I can implement this using iptables SNAT & DNAT ... or I can use HA-Proxy.

Can anyone provide some benefit / drawback analysis on either solution?

Thank you very much!


-- 
FdS Pandu E Poluan
~ IT Optimizer ~

 • LOPSA Member #15248
 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan