Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to setup LVM (Logical Volume Manager) including root und
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon May 06, 2002 5:48 pm    Post subject: How to setup LVM (Logical Volume Manager) including root und Reply with quote

How to setup LVM (Logical Volume Manager) including root under Gentoo

ChangeLog: 05/20/2002 - Added in need to compile devfs mounted at boot for the kernel and the fact that you can use resize2fs to resize ext3 partitions.

Preface
This document describes how I setup LVM on Gentoo, along with any tiny items you should know along the way.
I used Gentoo 1.1a for this example. This is meant to compliment the Gentoo installation instructions.
This is best done during system installation, as then you don't have to swap around contents of a drive.
However, feel free to explore on your own and try new things!

1. Before going too far, you need to first plot out how your going to setup your partitions. (any partitions
you setup in LVM can be resized) Mine are as follows:
Code:

Filesystem      Type      Size  Used Avail Use% Mounted on
/dev/hda6       ext3       23M  4.2M   17M  20% /boot
/dev/nostripevg/rootlv ext3      147M  112M   28M  80% /
/dev/nostripevg/usrlv ext3      1.7G  978M  677M  60% /usr
/dev/nostripevg/varlv   reiserfs  252M   40M  212M  16% /var
/dev/nostripevg/homelv  reiserfs 1000M   40M  960M   4% /home
/dev/nostripevg/x11lv   ext3      170M  112M   50M  69% /usr/X11R6
tmpfs          tmpfs     1.0M  112K  912K  11% /mnt/.init.d

Keep your partitioning as a reference during the installation.

2. Go through the instructions until section 6 (Set Up Partitions). This section needs a little clarifying.
You need 2 partitions (aside from the one(s) for LVM), one for your /boot partition and one for swap.
So, for this example, we're going to create the following partitions: swap, LVM, boot.

Inside fdisk:

  • Create the partition for /boot to be between 20-50MB as you would any other partition.
    (It only holds your initrd, kernel, and grub items)
  • Change the "type" to 83 (Linux) with the "t" command.
  • Create your LVM partition partition to be the size of your full system. (Mine is 5.6 Gigabytes)
  • Change the "type" to 8e (Linux LVM) with the "t" command
  • Create your swap partition. (Size is at your discretion. Standards are >=2*RAM, but I use 136mb)
  • Change the "type" to 82 (Linux swap) with the "t" command

After You've done that, if you type "p" in fdisk it should resemble my setup (seen below):
Code:

Disk /dev/hda: 255 heads, 63 sectors, 1247 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda6  *        523       525     24066   83  Linux
/dev/hda7           526      1230   5662881   8e  Linux LVM
/dev/hda8          1231      1247    136521   82  Linux swap

After your sure everything is fine, use the "w" command to write the changes to disk.

3. Time to setup LVM!

  • Type: vgscan
  • Create your physical volume for the LVM partition we made. Type: pvcreate /dev/hd?? (change ?? to your partition)
  • Create your volume group for LVM. The volume group is whats used to allocate your logical volumes in LVM.
    If your not using devfs
    Type:
    Code:
    vgcreate my_volume_group /dev/hda1

    (replace hda1 with the partition made for LVM, and my_volume_group with a name for your Logical Volume)
    If you ARE using devfs
    Type:
    Code:
    vgcreate my_volume_group /dev/ide/host0/bus0/target0/lun0/part1

    (you have to use the full devfs name for the drive/partition. Above is equal to /dev/hda1)
  • Create your logical volumes. (basically, "partitions" as you originally thought of them, only created in LVM)
    Type: lvcreate -LsizeMB -ntestlv testvg
    Replace sizeMB with how many megabytes you want the partition to be, testlv with the name of your partition,
    and testvg with the name of the volume group you gave in the last step.
    You can name your logical volumes anything easy to remember, as I use rootlv, usrlv, homelv, etc...
    You need to do this for all of the partitions you planned out in the beginning.
  • After that, time to create filesystems on the partitions we've created.
    Please note that out of all the filesystems, XFS is *NOT* able to shrink at all. It can only grow. Also note that as of this date, resize_reiserfs is not included in the boot cd so be careful when you allocate space for reiserfs. You can resize ext3 partitions with the tool resize2fs.

    1. Do the /boot partition. You have a choice of filesystems, so use the one your most comfortable with.
      Follow section 6 of the installation instructions for examples.
    2. Do the swap. (mkswap /dev/hda8 for example)
    3. Now, on to the LVM partitions. Instead of being /dev/hda1, /dev/hda2, and so on, LVM has a different setup
      LVM names it's partitions in the following way: /dev/volumegroup/logicalvolume (e.g. /dev/test_vg/rootlv)
      So, suppose my volume group was "testvg" and I created a logical volume inside of it called "linuxlv".
      It would be called, "/dev/testvg/linuxlv". You can format it as you do any other device.
      Code:
      e.g. mke2fs /dev/testvg/linuxlv



4. Mounting LVM Partitions
It's quite simple, and the same as you would any other drive.
To mount our linuxlv partition to the root, we do the following:
Code:
mount /dev/testvg/linuxlv /

Make sure when you follow section 7 of the install instructions to mount ALL of your LVM partitions.
Also, be sure to include the partition we created for /boot

5. Onto step 14, you will notice that the Gentoo linux-sources has changed a bit from the instructions.
I personally used sys-kernel/gentoo-sources because I am not using XFS but it does include LVM.
You can grab any of them except for the vanilla-sources. Be sure to include built-in support for LVM
when compiling the kernel.
Options needed when running make menuconfig:

  • LVM support
  • built-in ramdisk support with initrd
  • DEVfs support
  • mount dev filesystem at boot
  • loopback support

I have noticed issues with grsecurity in the kernel and LVM, but that's my own personal experience.
When you are finished compiling your kernel, modules, and installing both, perform the command:
Code:
 lvmcreate_initrd 2.4.19-gentoo-r1
replacing 2.4.19-gentoo-r1 with the version of kernel you installed.
You will notice module errors, this is normal. (your not running the kernel yet!)
Notice the size of the loopback file. It will say:
Code:
lvmcreate_initrd -- making loopback file (3238 kB)

except your size will be different. Please make sure that the size of your ramdisk is larger than this.

6. Onto step 16, perform the steps as the instructions tell you, but be sure to use the full LVM name of the partition.
(e.g. /dev/testvg/linuxlv as our previous example could be mounted to / )
Also be sure to include /boot. This is necessary for your system to operate.

7. When you are creating your /boot/grub/menu.lst, include a line under your "kernel" line saying the following:
Code:
initrd=/boot/2.4.19-gentoo-r1.gz

Be sure to change the name of the initrd file listed above if that is not the name. Never hurts to verify!

Follow the installation instructions, and after you reboot you should be able to have everything working if you followed
the instructions.

If you want a more thorough (and non-gentoo specific) howto, please see the great Howto created by the makers of LVM at
Sistina.com Howto at http://www.sistina.com/lvm_howtos/lvm_howto

I am a relatively new user of LVM, but I wanted everyone to at least have something Gentoo specific to read before diving
in like I did. I hope this helps out! I'd also like to update this occasionally, so if anyone finds any errors please let
me know on the Gentoo message board (my username is "arkane" or my email address at dan_lund@hotmail.com)



Last edited by arkane on Mon Jan 20, 2003 7:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
Praxxus
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 193
Location: Indiana, US

PostPosted: Thu Jan 09, 2003 11:28 pm    Post subject: LVM note Reply with quote

I may very well be overlooking something, but I haven't seen this specifically mentioned yet.

In addition to the built-in support (devfs/mounted at boot, LVM, initrd) you've mentioned, it seems I had to buid loopback device support (block devices) directly into the kernel before I could get LVM working.
_________________
My glaucoma just got worse!
Back to top
View user's profile Send private message
uxbod
Guru
Guru


Joined: 30 Dec 2002
Posts: 474
Location: UK

PostPosted: Fri Jan 10, 2003 12:27 am    Post subject: Reply with quote

Coming from a HP-UX SA background and do not see the point of running LVM at home. I have just build some new servers @ work using RedHat AS and the only partitions that are LVM are /oracle & /data. All system partitions are ext3. My rationale behind this is that they will be (i hope) the only two partions that shall ever need expanding. LVM is great for that.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sun Jan 19, 2003 6:56 pm    Post subject: Reply with quote

Thanks, I hadn't worked out how to get a root partition onto LVM so that's quite useful (although I don't envisage a root partition needing snapshots or resizing).

Quote:
Coming from a HP-UX SA background and do not see the point of running LVM at home


It's down to choice I suppose. It may not be for Joe Bloggs, but I don't think it's inconceivable that some users would appreciate the features on offer. You may want to run it at home because you want to keep abreast of the technology (that defintely applies to me). The ability to aggregate storage containers (say, upon buying a new hard disk) may be another.

As for a server setup, I generally agree. But I think /home is definitely a candidate, and maybe /var. You can imagine people underestimating future capacity requirements for users. And snapshots provide a proper mechanism for dealing with consistent, point-in-time backups, which apply to other things than just Oracle.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Jan 20, 2003 7:57 pm    Post subject: Re: LVM note Reply with quote

Praxxus wrote:
I may very well be overlooking something, but I haven't seen this specifically mentioned yet.

In addition to the built-in support (devfs/mounted at boot, LVM, initrd) you've mentioned, it seems I had to buid loopback device support (block devices) directly into the kernel before I could get LVM working.


Thanks for bringing that up, Praxxus. I just added that into the listing.
I've been neglecting the forums for quite a while now because of school, family, and so forth. I apologize.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Jan 20, 2003 7:59 pm    Post subject: Reply with quote

uxbod wrote:
Coming from a HP-UX SA background and do not see the point of running LVM at home. I have just build some new servers @ work using RedHat AS and the only partitions that are LVM are /oracle & /data. All system partitions are ext3. My rationale behind this is that they will be (i hope) the only two partions that shall ever need expanding. LVM is great for that.


I use it primarily to be able to shrink and grow my partitions as needed. It gives me the best of both worlds.. having partitions to isolate storage from one another (to keep things from keeping other things from operating due to going haywire with disk usage), and sharing space throughout the entire system. I've had to grow my /var and /usr/portage directory a couple times for certain things, then I just shrink them back up after I'm done with that.
Back to top
View user's profile Send private message
jeremy_
n00b
n00b


Joined: 05 Apr 2003
Posts: 4
Location: austin,tx

PostPosted: Sat Apr 05, 2003 9:59 pm    Post subject: fun with grub and lvm - Use evms Reply with quote

well, after spending about 4 hours trying to get a laptop to boot with a fresh instal of gentoo 1.4 and to use lvm, I figured I'd post the fix here. Hope it's the right place.

I tried pretty much everything, and yet I could never get grub to see my lvm partitions.

I read a post elsewhere that evms will automatically setup your lvm partitions for you and make them active upon boot. I compiled evms statically into my kernel (NOT as a module) and booted, and voila, all of my lvm partitions were located at /dev/evms/lvm/volume_group/logical_vol

All that was left was to tell grub that my root was located at root=/dev/evms/lvm/Volume00/rootfs and to adjust my fstab to also point to the evms locations.

Boom! four hours of work.... 5 lines of text editted, and I'm gentoo-lvm-luvin!
_________________
...signatures are lame...
Join the campaign to rid the net of sigs now!
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Sun Apr 06, 2003 8:34 am    Post subject: Reply with quote

To make LVM (without EVMS) work with root on a LVM volume you just have to use a adequate initrd (which can be made with lvmcreate_initrd). I think this is mentioned in this thread and described in the LVM howto. initrd is a ram disk which gets mounted as root after the kernel is loaded. Then things like lvm detection/activation can be done and afterwards the kernel mounts the actual rootfs.

EVMS is more comfortable in this regard because with EVMS the kernel itself (which means the EVMS stuff which gets compiled into the kernel) detects and activates LVM volumes at boot time. Then there is no need to have an initrd.

But note that EVMS 2, which was released a couple of days ago, has no longer boot-time volume activation. You have to use the initrd mechanism with EVMS2 too. This is because of architectural changes in the Linux kernel. With the upcoming kernel all detections and activations like LVM, EVMS, etc. will be done in user space, which means that these things are no longer done by the kernel. A initrd-like mechanism is then madatory (AFAIK initrd will be replaced in Linux 2.6 too, but I have no further information on that.)
Back to top
View user's profile Send private message
jeremy_
n00b
n00b


Joined: 05 Apr 2003
Posts: 4
Location: austin,tx

PostPosted: Sun Apr 06, 2003 3:58 pm    Post subject: Reply with quote

I had tried initrd, but to no avail.

Hmmm... guess I'll start figuring it again once I have to upgrade my kernel past 2.4. :(
_________________
...signatures are lame...
Join the campaign to rid the net of sigs now!
Back to top
View user's profile Send private message
Simba
n00b
n00b


Joined: 08 Nov 2002
Posts: 60

PostPosted: Mon Apr 07, 2003 12:00 am    Post subject: kernel can't find root fs in lvm Reply with quote

I have root fs in lvm, and in the grub.conf I use kernel option root=/dev/localvg/rootlv . I have also initrd in /boot partition. but if I reboot
the pc, linux kernel don't try to find the rootlv at all, but it tried to boot it from
rootnfs, here is the warning:
Root-NFS: No NFS server available, giving up
VFS: Unable to mount root fs via NFS
...

how can I tell the kernel not to use rootnfs, but try to mount the root from
LVM? but If I use kernel option root=3a01 , where 3a01 is the major/minor number of rootlv device, it works perfectly, but I don't want to boot it in this way.
thanks,
cahya
Back to top
View user's profile Send private message
asimon
l33t
l33t


Joined: 27 Jun 2002
Posts: 979
Location: Germany, Old Europe

PostPosted: Mon Apr 07, 2003 11:07 am    Post subject: Re: kernel can't find root fs in lvm Reply with quote

Simba wrote:
I have root fs in lvm, and in the grub.conf I use kernel option root=/dev/localvg/rootlv . I have also initrd in /boot partition. but if I reboot
the pc, linux kernel don't try to find the rootlv at all, but it tried to boot it from
rootnfs, here is the warning:
Root-NFS: No NFS server available, giving up
VFS: Unable to mount root fs via NFS
...

how can I tell the kernel not to use rootnfs, but try to mount the root from
LVM? but If I use kernel option root=3a01 , where 3a01 is the major/minor number of rootlv device, it works perfectly, but I don't want to boot it in this way.
thanks,
cahya


I have the following in my grub.conf:
Code:

title=Gentoo Linux 2.4.20-rck4
        root (hd1,0)
        kernel /bzImage-2.4.20-rck4 root=/dev/main_vg/root_lv hdb=ide-scsi
        initrd /initrd-lvm-2.4.20-rck4.gz


whereas initrd-lvm-2.4.20-rck4.gz was created with lvmcreate_initrd. I never had problems with that.

Do you have by any change configured your kernel to have it's "Root file system on NFS" (in Network file systems)? Otherwise it could be some strange devfs problem. But if it's not that kernel options than I dunno what causes your problem.
Back to top
View user's profile Send private message
atac
Apprentice
Apprentice


Joined: 04 Jan 2003
Posts: 234
Location: haninge, swe

PostPosted: Fri Apr 11, 2003 12:59 pm    Post subject: Reply with quote

this was just what i was looking for, gonna try it out :)
_________________
1 + 1 + 1 = 11
Back to top
View user's profile Send private message
Simba
n00b
n00b


Joined: 08 Nov 2002
Posts: 60

PostPosted: Fri Apr 25, 2003 8:41 am    Post subject: Reply with quote

After I removed the "Root file system on NFS" from the kernel, the boot
process in my laptop works perfectly. With this experience I want also to setup our compaq server (with hardisk raid) to have root fs on lvm. I do the same in the kernel:
# LVM support
# built-in ramdisk support with initrd
# DEVfs support
# mount dev filesystem at boot
# loopback support

and here is my grub.conf:

Code:

title=Linux 2.4.20-XFS
root (hd0,0)
kernel /boot/bzImage-2.4.20-xfs-r2 root=/dev/cciss/c0d0p2
 
title=Linux 2.4.20-XFS LVM Root
root (hd0,0)
kernel /boot/bzImage-2.4.20-xfs-r2 root=/dev/localvg/rootlv
initrd /boot/initrd-lvm-2.4.20-xfs-r2.gz


the first grub menu is working fine,
but if I use the second menu with initrd I get this kernel panic at the end:

Code:

RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096k freed
XFS: bad magic number
XFS: SB validate failed
Kernel panic: VFS: Unable to mount root fs on 00:00


and I try to replace /dev/localvg/rootlv with /dev/cciss/c0d0p2 like the first
grub menu and with
the same initrd, I though it will work because the first grub menu works fine, but it still doesn't work, I got the same Kernel panic: VFS: Unable to mount root fs on 68:01.
and then I try to change linuxrc in the initrd-lvm, I insert there a line /bin/bash , so I can check something before the initrd is freed again from memory during booting, but I never get in to it, it seems that my initrd is not used at all. can someone help me or give me a hint what I still did wrong here?
thanks again in advance.
cahya.
Back to top
View user's profile Send private message
Crimson Rider
Guru
Guru


Joined: 23 Jun 2003
Posts: 462
Location: Delft, the Netherlands

PostPosted: Tue Jun 24, 2003 7:21 am    Post subject: Reply with quote

I can complete allmost all the steps, up to and including booting with GRUB, however, at the end of the line, vgscan and vgchange come up with zilch. nothing nada. It' doesn't find my /dev/lv/ide volume group, could that have something to do with the fact that it is on a promise onboard non-raid ide controller ?
Back to top
View user's profile Send private message
alexbuell
Guru
Guru


Joined: 18 Jul 2002
Posts: 490
Location: "Hemp"shire, UK

PostPosted: Thu Jul 31, 2003 6:27 pm    Post subject: LVM *and* RAID? Reply with quote

Can I use both LVM and RAID? Is it even safe?
_________________
Cheers,
Alex.

Linux - the best text adventure game ever.
Back to top
View user's profile Send private message
Xenophon
n00b
n00b


Joined: 08 Jun 2003
Posts: 20
Location: London, UK

PostPosted: Mon Aug 04, 2003 3:45 pm    Post subject: Reply with quote

I have successfully created the partitions suggested above (root, boot, swap, and lvm) and have created four logical volumes (tmp, usr, var, home). I have mounted everything accordingly:
Code:
cdimage root # mount
proc on /proc type proc (rw)
 . . . .
/dev/hda3 on /mnt/gentoo type reiserfs (rw)
/dev/hda1 on /mnt/gentoo/boot type ext2 (rw)
/dev/master/usr on /mnt/gentoo/usr type reiserfs (rw)
/dev/master/home on /mnt/gentoo/home type reiserfs (rw)
/dev/master/tmp on /mnt/gentoo/tmp type reiserfs (rw)
/dev/master/var on /mnt/gentoo/var type reiserfs (rw)
proc on /mnt/gentoo/proc type proc (rw)

I then unpacked a stage 1 tarball, edited make.conf to allow portage sandboxing, and ran scripts/bootstrap.sh.
It died:
Code:
Configuring environment...
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.48-r5 to /
>>> md5 ;-) portage-2.0.48-r5.tar.bz2
>>> /tmp/sandboxpids.tmp file mode: r+ open: Permission denied
>>> pids file write: Illegal seek

How do I need to mount /tmp to allow writes by users?
Back to top
View user's profile Send private message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Tue Aug 26, 2003 2:57 pm    Post subject: Reply with quote

Xenophon wrote:
How do I need to mount /tmp to allow writes by users?


I have done it like this:
Code:
/dev/main/lv_tmp on /tmp type reiserfs (rw,nosuid,nodev,noatime)

Make sure you add exec to lvm_volumes other than standard /usr /opt etc if you'd like execution rights. Unreal installer use /tmp as temp dir and execs from there.
Back to top
View user's profile Send private message
JollyToad
n00b
n00b


Joined: 30 Apr 2003
Posts: 3
Location: England

PostPosted: Fri Sep 05, 2003 2:19 pm    Post subject: Don't forget ext2! Reply with quote

Hello to all you brave LVM users.

I've just spent several hours of head scratching and chin stroking trying to install
our new server with root on LVM, here's a little story for you:

I decided to use reiserfs for all filesystems, so when it came to kernel compilation
(using gs-sources) I selected ONLY reiserfs (who needs ext2 - I thought).
Anyway, after much tweaking, many reboots, lots of kernel panics, and close
scruntity of lvmcreate_initrd - i discovered it uses ext2 on the initrd! :oops:
One kernel recompile and reboot later - and hey presto - a working root on LVM.

The moral of this story is:
Don't forget to compile 'EXT2' filesystem support into the kernel
Back to top
View user's profile Send private message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Tue Sep 09, 2003 6:55 am    Post subject: Re: Don't forget ext2! Reply with quote

JollyToad wrote:
Hello to all you brave LVM users.

I've just spent several hours of head scratching and chin stroking trying to install
our new server with root on LVM, here's a little story for you:


Why would you do that? You know LVM is out of kernel 2.6 don't you?
In my opinion go with EVMS2, at least LVM2 if you want LVM.
Back to top
View user's profile Send private message
Birdman
n00b
n00b


Joined: 11 Aug 2003
Posts: 1

PostPosted: Thu Nov 27, 2003 7:22 am    Post subject: Reply with quote

Xenophon wrote:

How do I need to mount /tmp to allow writes by users?


Do a

Code:
chmod 1777 /tmp


To ensure that anubody can write to /tmp. You should only need to do this once.
Back to top
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Sat Mar 06, 2004 7:17 pm    Post subject: Reply with quote

hello.

I decided to use lvm and i've done all things described as in here, but got following error:

vgcreate main /dev/ide/host2/bus0/target0/lun0/part4
vgcreate -- no valid physical volumes in command line

lvm-mod is aktivated in my 2.4.22-r7 gentoo-sources kernel, devfs is also up and running.
my partition scheme looks like this:

Name Flags Part. Typ Dateisystemtyp [Bezeichner] Size
------------------------------------------------------------------------------
hde1 Primäre Linux ext3 49,36
hde2 Primäre Linux ext3 246,76
hde3 Primäre Linux swap 1998,75
hde4 Primäre Linux LVM 117761,34

/boot, /, swap and lvm volume in the above order.

I executed vgscan before and got this:

vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group

Whats the problem, what i am doing wrong.

thx and best regards

Neo
Back to top
View user's profile Send private message
deepthink
n00b
n00b


Joined: 25 Mar 2003
Posts: 35

PostPosted: Wed Mar 10, 2004 9:03 pm    Post subject: Reply with quote

I intalled LVM on my new laptop. This is my current setup:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             142M   91M   51M  65% /
/dev/vg/home          5.0G  4.1G  941M  82% /home
/dev/vg/opt           2.0G  505M  1.6G  25% /opt
/dev/vg/var           5.0G  1.3G  3.8G  26% /var
/dev/vg/tmp           2.0G   39M  2.0G   2% /tmp
/dev/vg/usr            10G  7.1G  3.0G  71% /usr
/dev/hda1             9.8G  4.8G  5.0G  50% /mnt/win
none                  252M     0  252M   0% /dev/shm
Code:
     Name            Flags         Part Type     FS Type               [Label]             Size (MB)
 -------------------------------------------------------------------------------------------------------
     hda1            Boot           Primary      W95 FAT32 (LBA)                            10487.24     
     hda2                           Primary      Linux ext2                                    49.36
     hda5                           Logical      Linux ReiserFS                               148.06
     hda6                           Logical      Linux LVM                                  49327.01

I created a 512MB swap-partition as a logical volume but that didn't seem to work. Can I somehow make it work? Can I resize the physical LWM partition (/dev/hda6)?

Perhaps I should just shink down windows even more since I never use it.
Back to top
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Wed Mar 10, 2004 10:16 pm    Post subject: Reply with quote

I've took lvm2 and get following more detailed error:

vgcreate main /dev/ide/host2/bus0/target0/lun0/part4
No physical volume label read from /dev/ide/host2/bus0/target0/lun0/part4
/dev/ide/host2/bus0/target0/lun0/part4 not identified as an existing physical volume
Unable to add physical volume '/dev/ide/host2/bus0/target0/lun0/part4' to volume group 'main'.

What i am doing wrong?

best regards
Back to top
View user's profile Send private message
One
n00b
n00b


Joined: 15 Jun 2002
Posts: 51
Location: Darmstadt, Germany

PostPosted: Wed Apr 14, 2004 11:48 pm    Post subject: easy Reply with quote

this is quite easy I think.

before you can use a partition with lvm you have to initialize this partition as a physical lvm partition ...

this is done by executing pvcreate (partition-name)

I hope this solves your problem :-)
Back to top
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Thu Apr 22, 2004 6:47 pm    Post subject: Reply with quote

thx very much.
now it works.

best regards
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum