You are not logged in.

#1 2003-10-15 18:53:48

cybrjackle
Member
From: Missouri, USA
Registered: 2003-06-14
Posts: 2

Anyone do a LVM install?

I'm kind of a LVM junkie and was wanting to know if I could do it in arch?

I could alway's create the slices before the install, but will the install see them for mounting and will LVM work after the base install is finished?  Are LVM packages included in base install?

Obivoulsly this isn't a problem (yet) wink so MOD's move it if I put it in the wrong thread.

Thanks,

Offline

#2 2005-01-19 13:45:29

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

Have you been able to install arch on an already prepared lvm hd???

Does anyone knows if its possible?

Thank you very much

Offline

#3 2005-01-19 14:34:18

cybrjackle
Member
From: Missouri, USA
Registered: 2003-06-14
Posts: 2

Re: Anyone do a LVM install?

No, I moved away from arch sorry big_smile

My main box is a x86_64 anyway which isn't supported by Arch.

Offline

#4 2005-01-19 22:55:56

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

Quite possible.  I run a RAID/LVM box with Arch on it.

The /arch/setup script does not handle LVM installs itself, though.  You should prepare your paritions, RAID arrays, and physical/logical/volume groups yourself, then mkfs them and mount them properly under /mnt.  If you're familiar with LVM, I'm sure you have no problem with this kind of manual setup.

Note: The later releases of Arch are using mdadm instead of raidtools.  mdadm and lvm (2) are provided on the install ISO.

When the various partitions are properly mounted under /mnt, you have two options for the actual Arch install.

1) Use the /arch/setup script, but skip the hard drive prep stuff.  When it asks, tell it where you mounted the destination root (/mnt) and it should plug away happily.  Make sure you tweak /mnt/boot/grub/menu.lst and /mnt/etc/fstab manually, as the installer won't know what to write in there.

2) Use the /arch/quickinst script to install the base packages into /mnt, then set up the various files (fstab, menu.lst, rc.conf) manually.  I prefer this method.

Make sure you set USELVM="yes" in your /etc/rc.conf before rebooting.

Offline

#5 2005-01-19 23:02:19

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

Are LVM packages included in base install?

No, you'll have to install the lvm2 package from system.  If you only have a base-only iso, you can cheat and copy these two files from the install system to your new one.

/tmp/addons/bin/lvm => /mnt/sbin/lvm
/tmp/addons/lib/libdevmapper.so.1.00 => /mnt/lib/libdevmapper.so.1.00

Then install the lvm2 package properly when you've booted into your newly-installed system.

Offline

#6 2005-01-25 22:02:46

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

apeiro wrote:

Quite possible.  I run a RAID/LVM box with Arch on it.

The /arch/setup script does not handle LVM installs itself, though.  You should prepare your paritions, RAID arrays, and physical/logical/volume groups yourself, then mkfs them and mount them properly under /mnt.  If you're familiar with LVM, I'm sure you have no problem with this kind of manual setup.

Note: The later releases of Arch are using mdadm instead of raidtools.  mdadm and lvm (2) are provided on the install ISO.

When the various partitions are properly mounted under /mnt, you have two options for the actual Arch install.

1) Use the /arch/setup script, but skip the hard drive prep stuff.  When it asks, tell it where you mounted the destination root (/mnt) and it should plug away happily.  Make sure you tweak /mnt/boot/grub/menu.lst and /mnt/etc/fstab manually, as the installer won't know what to write in there.

2) Use the /arch/quickinst script to install the base packages into /mnt, then set up the various files (fstab, menu.lst, rc.conf) manually.  I prefer this method.

Make sure you set USELVM="yes" in your /etc/rc.conf before rebooting.

So if I understand well... I'd need to setup my hd in lvm before booting the arch cd because the install cd doesn't support creating lvm volumes, but can install on lvm volumes if they are mounted  via the setup?
I would need to mount the already created volumes to "/", "/boot" and "/home", isn't it?

Looking that way I would prefer trying your first method... Why the second would be preferable?

Thanx

Offline

#7 2005-01-28 01:48:37

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

big_gie wrote:

So if I understand well... I'd need to setup my hd in lvm before booting the arch cd because the install cd doesn't support creating lvm volumes, but can install on lvm volumes if they are mounted  via the setup?

Nope.  The install CD comes with the necessary tools to set up RAID and/or LVM groups.  I just meant that the installation script we use is too dumb to handle special setups like that, so you have to run the commands yourself from the CLI.

So yes -- you can create everything from within the Arch CD.  Just make sure that, after you do the install, you have the lvm2 package on your new system.  Otherwise the new Arch system won't be able to activate your volume groups on bootup.

Why the second would be preferable?

It's just faster, I guess.  Either script will work fine.

Offline

#8 2005-01-31 22:26:02

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

Hi,

I tryed installing arch with an existing lvm prepared hd. Here is how it is setup:

Primary:
    150 Mb /dev/hda1 as ext2 /boot
    800 Mb /dev/hda2 as swap
    59 Gb /dev/hda3 as extended
        600 Mb /dev/hda4 as logical reiserfs / (FC3)
        600 Mb /dev/hda5 as logical reiserfs / (Arch)
        Remaining space in physical volume /dev/hda6 with those logical volumes:
            /dev/disque/a_usr 5 Gb reiserfs for Arch /usr
            /dev/disque/a_tmp 1 Gb reiserfs for Arch /tmp
            /dev/disque/f_usr 5 Gb reiserfs for FC3 /usr
            /dev/disque/f_tmp 1 Gb reiserfs for FC3 /tmp
            /dev/disque/home remaining ~45 Gb reiserfs for /home (shared between FC3 and Gentoo)

But I can't do a thing from the cd... after booting the cd kernel, each time I try to execute a command begining with "lvm" ("lvm vgscan" for example) I get a segmentation fault... So I can't access my lvm partitions... I,ve downloaded gentoo minimal live cd, booted it, and created my lvm partitions following this guide : http://www.gentoo.org/doc/en/lvm2.xml

When you say "mount them properly under /mnt" what do you mean? That I should mount /dev/<vgname>/a_usr as /mnt/usr ??? What about "/" ? where should I mount it? as "/mnt/archroot" and install it from there? (This one is not lvm...)

Also, is the kernel sources included in the install cd? I absolutly need them to compile ndiswrapper so I can access the net. I can't download the sources once the system is up because I need ndiswrapper to be compiled wich need to have the kernel sources downloaded wich need internet access wich need...
Is it included? If not where could I download it before booting the cd?

Thank you very much for your help!

Offline

#9 2005-02-01 18:06:31

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

big_gie wrote:

But I can't do a thing from the cd... after booting the cd kernel, each time I try to execute a command begining with "lvm" ("lvm vgscan" for example) I get a segmentation fault...

Whoops, that means I forgot something important for LVM on the install CD -- the mounting of /sys.

lvm isn't too graceful when it fails.  It's looking for special files in /sys and it just happily segfaults all over the place when it can't find them.

# mkdir /sys
# mount -t sysfs none /sys
# lvm vgscan
# lvm vgchange -a y

Try something like that from the install CD.

Offline

#10 2005-02-02 08:10:07

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

apeiro wrote:

Whoops, that means I forgot something important for LVM on the install CD -- the mounting of /sys.

tongue

I've managed to install Gentoo yesterday. I just need to install ndiswrapper and it should be ok. Saddly I've installed Gentoo before Arch... tongue

I WILL try Arch sometime this week. I hope it will found my partitions...

After mouting /sys and scan for volume groups, I should mount them in (volume group is "disque")
/mnt/usr (/dev/disque/a_usr)
/mnt/var (/dev/disque/a_var)
/mnt/tmp (/dev/disque/tmp)
/mnt/home (/dev/disque/home)
/mnt/boot (/dev/hda1)
Where should I  mount /dev/hda7 which should be / ? On /mnt? Or if it doesn't mater I could mount /dev/hda7 as /mnt/arch/ and others in /mnt/arch/usr etc... I think Gentoo setup mounts "/" to "/mnt/gentoo" and usr in "/mnt/gentoo/usr" so it should be possible too with arch...


Mounting is done, I /arch/setup but don't touch the hd section, am I right? Just before copying files it should ask me where to put them so I point to /mnt/arch, isn't it?

Talking about it just makes me want to do it right now... smile I just can't for the moment... But I'm still gathering information on it smile

Thanks for you time apeiro!!! I really apreciate it!!!

Offline

#11 2005-02-02 18:25:32

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

big_gie wrote:

Where should I  mount /dev/hda7 which should be / ? On /mnt?

Yep, your / should be mounted at /mnt, and it should be the first one you mount, before all others.  You'll probably want to mkfs each filesystem before mounting it, unless you're re-using some old partitions like /home and whatnot.

Mounting is done, I /arch/setup but don't touch the hd section, am I right? Just before copying files it should ask me where to put them so I point to /mnt/arch, isn't it?

Yep, run /arch/setup but skip all the HD prep stuff, since you did that part yourself.  When it asks where your destination is mounted, say /mnt.  It should be the default, anyway.

Offline

#12 2005-02-02 18:45:24

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

Oh yeah! Arch is installed... smile

Heres what I did:

1. Create a directory in /mnt. I called it arch:

mkdir /mnt/arch

2. Mount the partition I'd like to use as "/" in /mnt/arch:

mount /dev/discs/disc0/part7 /mnt/arch

3. Create new directories inside of /mnt/arch and mount its appropriate partitions (Note, "disque" is my volume group name):

mkdir /mnt/arch/usr /mnt/arch/var /mnt/arch/tmp /mnt/arch/boot /mnt/arch/home
mount /dev/disque/a_usr /mnt/arch/usr
mount /dev/disque/a_var /mnt/arch/var
mount /dev/disque/home /mnt/arch/home
mount /dev/disque/tmp /mnt/arch/tmp

I did not mounted yet my boot partition because the script will say the file "boot/grub/menu.lst" already exist (I have 2 other distros' kernel on my /boot").

4. Mount the cd:

mkdir /mnt/cdrom
mount /dev/cdroms/cdrom0 /mnt/cdrom

5. I ran /arch/quickinst:

/arch/quickinst cd /mnt/arch /mnt/cdrom/arch/pkg

6. Everything is copied. I moved /mnt/arch/boot/diag1.img and /mnt/arch/boot/grub/menu.lst to a temp folder, delete /mnt/arch/boot, recreate it, and mount the right partition to /mnt/arch/boot:

mv /mnt/arch/boot/diag1.img /mnt/diag1.img
mv /mnt/arch/boot/grub/menu.lst /mnt/menu.lst
rm -fr /mnt/arch/boot
mkdir /mnt/arch/boot
mount /dev/discs/disc0/part1 /mnt/arch/boot
mv /mnt/diag1.img /mnt/arch/boot/diag1-arch.img

Sadly, there is no kernel!!!I'll need to check on this... But once there is a kernel, I'll rename it to /mnt/arch/boot/kernel-2.6-???-arch and update the /mnt/arch/boot/grub/menu.lst to include it.

After this I should have a arch running computer smile

Thanx for your help!

By the way... Where can I get the kernel sources??? I absolutly need them!!! They don't seems to be included on the livecd...

Thanx again!

Offline

#13 2005-02-02 18:51:16

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Anyone do a LVM install?

hehe you responded while I was typing smile

I've used /mnt/arch, but it shall not be a problem, well I think smile

What about the kernel? Could it be installed somewhere else? menu.lst points to /boot/vmlinuz but there is no /mnt/arch/boot/vzmlinuz... only /mnt/arch/boot/diag1.img!!! Should I use the /mnt/cdrom/isolinux/vmlinux (the cd kernel) ?

Offline

#14 2005-02-07 07:06:59

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Anyone do a LVM install?

big_gie wrote:

What about the kernel? Could it be installed somewhere else?

The kernel packages aren't part of base, so quickinst doesn't install them.  You'll have to install one manually with pacman.

# /tmp/usr/bin/pacman -U -r /mnt/arch /mnt/cdrom/arch/pkg/kernel26-2.6.10-3.pkg.tar.gz

The kernel sources should be in /mnt/cdrom/arch/

Offline

Board footer

Powered by FluxBB