You are not logged in.

#1 2008-12-20 16:49:32

kanonmat
Member
From: Linköping, Sweden
Registered: 2008-10-30
Posts: 31

lvm and grub

I'm installing arch on a hp nc6220 laptop with 80Gb hdd over a lvm volume group. lvm is set up in SystemRescueCd
http://www.sysresccd.org
The volume group on /dev/sda2 is all of the hdd exept a /dev/sda1 winxp partition.
I'm going to install grub2 (Does it work? The grub2 wiki is very empty.), but arch has to be booted first.

I have supergrubdisk installed on a usb stick, but can't boot from it.

http://www.supergrubdisk.org

root (hd1,1)         #hd0 is the usb, I think. I tried many variations of this line. 
Filesystem type unknown, partition type 0x83
kernel /vmlinuz26 root=/dev/mapper/nonxp_volgroup-archslash

Error 17: Cannot mount the selected partition. 
Press teh "any" key

It would be the same story if I had a separate /boot, right?
According to http://wiki.archlinux.org/index.php/Lvm grub cannot be started from within lvm. It has to live on a separate /boot partition. I was optimistic and made no room for one and I found out that volume groups can't be resized. vgdisplay says it's "VG Status" is "resizeable" though. Can someone explain? (Ease of resizing "partitions" was my reason for trying lvm.) The last logical volume on the disk was resized, but I can't resize the physical volume that holds the volume group

/dev/sda2: cannot resize to 16191 extents as 16192 are allocated

If I would manage to remove (or deallocate) a couple of extents there's another obstacle: gparted doesnt think /dev/sda2 is resizeable and says "Unable to detect filesystem!" Does gparted work with lvm? What other limitations will there be with lvm?

A minor complication is a bad sector about 58 Gb in on the hdd. mkfs.ext3 -c was used on that volume.

Can I install grub2 before rebooting?
Is there a grub2 resource site somewhere?
Reinstall without lvm? Can I later move partitions onto lvm?
Is this a Catch 22? smile

Last edited by kanonmat (2008-12-20 16:50:09)


hp 6910p laptop // phenomII965, gigabyte GA-MA790XT-UD4P mobo, 8600gt desktop.
Sometimes I play xonotic, sometimes I sleep.

Offline

#2 2008-12-20 18:24:29

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: lvm and grub

The physical primary partition that LVM is on normally remains static. Resizing logical volumes within LVM should be simple but it will depend on the file system on each one (if any... I don't remember which ones, but I think either jfs or xfs don't support growing or shrinking the volume). I keep extra space on my LVM partition so that I can juggle logical volumes around (create a new one, format it, copy the old one, remove it). I don't know how grub2 works but if  you want to go with plain old grub, you would only need a 30-50 MB primary partition which is hardly anything on an 80 GB disk.

Also, on LVM the volume group is the equivalent of the hard disk and the logical volumes are the equivalent of partitions.

Sorry for the muddled reply. I've been up since yesterday and my mind is somewhere else.

*edit*
I don't think you can move data on a partition to an LVM partition later on. You'll have to wipe it when you set up LVM but you don't need to change the partition itself (but you'll need to change the file system from Linux to Linux LVM (with (c)fdisk or some other disk partitioner)).

Last edited by Xyne (2008-12-20 18:29:04)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB