Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: how to get lvm disks to work?

  1. #1
    sireasoning
    Guest

    how to get lvm disks to work?

    I have a hard drive which uses lvm. Unfortunately, Knoppix just mounts the lvm partition as say /dev/hdc (which is useless). How can I get the system to show my lvm logical volumes (similar to partitions) and mount them?

  2. #2
    sireasoning
    Guest

    lvm = logical volume management

    for those who don't know lvm = logical volume management

  3. #3
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: how to get lvm disks to work?

    --You could try ' apt-get install lvm2 '... Let me know if/how you get it working, I'm still using SuSE 7.3 (triple-boot) for my LVM stuff. Yast has a really decent frontend for it.

    Quote Originally Posted by sireasoning
    I have a hard drive which uses lvm. Unfortunately, Knoppix just mounts the lvm partition as say /dev/hdc (which is useless). How can I get the system to show my lvm logical volumes (similar to partitions) and mount them?

  4. #4
    sireasoning
    Guest

    lvm

    lvm is already part of the distribution (at least it appears to be). Unfortunately it is not setup to recognize lvm drives automatically at bootup so I was wondering if anyone had worked with knoppix and lvm before.

    I might just init 2 then try
    vgscan && vgchange -a y
    which is how it is started in the /etc/rc.d/rc.sysinit script in Mandrake 8.2
    However in the rc.sysinit script it is run before the swapfile is activated and I fear that the mounted drive (read-only) which contains the lvm partition and the mounted (read-only) drive that contains /etc/lvmtab may not be able to effectively talk to each other.

    has anyone gotten their lvm partitions up in knoppix?

  5. #5
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: lvm

    --I dunno if that alone will work; I think the /dev files have to be created / re-created somehow. You could try using mc to copy the /dev files for lvm from MDK over to Knoppix, and then do the cmds.

    --Knoppix mounts individual partitions r/o, not entire drives... If you run the lvm cmds manually, it should mount the lvm drives r/w. As far as /etc/lvmtab goes, I dunno if it would be better just to do a HD install rather than trying everything from CD.

    --Best of luck tho.

    ===========

    Quote Originally Posted by sireasoning
    lvm is already part of the distribution (at least it appears to be). Unfortunately it is not setup to recognize lvm drives automatically at bootup so I was wondering if anyone had worked with knoppix and lvm before.

    I might just init 2 then try vgscan && vgchange -a y
    which is how it is started in the /etc/rc.d/rc.sysinit script in Mandrake 8.2
    However in the rc.sysinit script it is run before the swapfile is activated and I fear that the mounted drive (read-only) which contains the lvm partition and the mounted (read-only) drive that contains /etc/lvmtab may not be able to effectively talk to each other.

    has anyone gotten their lvm partitions up in knoppix?

  6. #6
    sireasoning
    Guest

    lvm on knoppix

    I got it to work but it was quite convaluted.

    Here is what I did:

    - as root
    vgscan && vgchange -a y
    (this scans for the lvm partitions and then activates them)

    my lvm group is named mandrake and I have 6 volumes (partitions) named 1 2 3 4 5 6
    Knoppix correctly created a /dev/mandrake with these 6 volumes.

    Next I created the directories to hold them
    mkdir /mnt/mandrake1
    etc
    so I then went into /etc/fstab and added these 6 partitions
    /dev/mandrake/1 /mnt/mandrake1 auto noauto,users,exec 0 0
    etc...

    Afterwards I went into kde and from the desktop right clicked and chose
    Create New, hard disk
    and then filled in the info and made them read only (a little extra precaution since most cannot be written to except as root). If I did want to write to them I would then go to properties for that hard drive icon and click off read-only. It would be nice to have a way to have them auto created with Knoppix's extra menu option (to switch back and forth from read only)

    I guess my main question is... since lvm is already included in the distro and it seems to work properly, why not make it part of the bootup/shutdown configuration?

  7. #7
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: lvm on knoppix

    --I think the /mnt/mandrake1 ... 6 part is incorrect. True LVM gets mounted on only 1 directory (mount point.)

    --Try ' ls -l /dev/mandrake ' and see what's in there. On the SuSE side, my LVM is mounted as:

    Code:
    /dev/extralvm/extralvm /mnt/extra  reiserfs defaults,noatime,noexec,notail,rw 0 0
    /dev/scsilvm/scsilvm  /mnt/scsibkps  reiserfs  defaults,noauto,noatime,noexec,rw 0 0
    --As you can see, multiple partitions are mounted under 1 mount point. I think if you try to write to (say) /mnt/mandrake2, it could cause data corruption.

    Code:
    --Note that the LVM partition TYPE must also be 8e:
    /dev/hdc4           449      4849  17744832   8e  Linux LVM
    /dev/hda6           420       611   1542208+  8e  Linux LVM
    --All you should need is (say) /mnt/mandrakelvm, instead of 1-6.

    Quote Originally Posted by sireasoning
    I got it to work but it was quite convaluted.

    Here is what I did:

    - as root
    vgscan && vgchange -a y
    (this scans for the lvm partitions and then activates them)

    my lvm group is named mandrake and I have 6 volumes (partitions) named 1 2 3 4 5 6
    Knoppix correctly created a /dev/mandrake with these 6 volumes.

    Next I created the directories to hold them
    mkdir /mnt/mandrake1
    etc
    so I then went into /etc/fstab and added these 6 partitions
    /dev/mandrake/1 /mnt/mandrake1 auto noauto,users,exec 0 0
    etc...

    Afterwards I went into kde and from the desktop right clicked and chose
    Create New, hard disk
    and then filled in the info and made them read only (a little extra precaution since most cannot be written to except as root). If I did want to write to them I would then go to properties for that hard drive icon and click off read-only. It would be nice to have a way to have them auto created with Knoppix's extra menu option (to switch back and forth from read only)

    I guess my main question is... since lvm is already included in the distro and it seems to work properly, why not make it part of the bootup/shutdown configuration?

  8. #8
    Member registered user
    Join Date
    Jan 2003
    Posts
    38

    how I got mine to work

    $ ls -l /dev/mandrake
    total 0
    brw-rw---- 1 root disk 58, 0 Jan 23 04:06 1
    brw-rw---- 1 root disk 58, 1 Jan 23 04:06 2
    brw-rw---- 1 root disk 58, 2 Jan 23 04:06 3
    brw-rw---- 1 root disk 58, 3 Jan 23 04:06 4
    brw-rw---- 1 root disk 58, 4 Jan 23 04:06 5
    brw-rw---- 1 root disk 58, 5 Jan 23 04:06 6
    crw-r----- 1 root disk 109, 0 Jan 23 04:06 group

    This was created through the Mandrake 8.2 gui.

    Next I rebuilt /etc/fstab:
    none /proc proc defaults 0 0
    none /dev/pts devpts mode=0622 0 0
    /dev/fd0 /mnt/auto/floppy auto user,noauto,exec,umask=000 0 0
    /dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0
    /dev/cdrom1 /mnt/auto/cdrom1 auto users,noauto,exec,ro 0 0
    # Added by KNOPPIX
    /dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
    #rebuild mandrake at /home/knoppix/mnt
    /dev/hda6 /home/knoppix/mnt/ ext3 noatime 1 1
    /dev/hda5 /home/knoppix/mnt/boot ext2 noatime 1 2
    /dev/mandrake/3 /home/knoppix/mnt/home reiserfs noatime,notail 1 2
    /dev/mandrake/6 /home/knoppix/mnt/mnt/shared ext3 noatime 1 2
    /dev/mandrake/4 /home/knoppix/mnt/opt ext3 noatime 1 2
    /dev/mandrake/1 /home/knoppix/mnt/usr xfs noatime 1 2
    /dev/mandrake/2 /home/knoppix/mnt/var xfs noatime 1 2
    /dev/mandrake/5 /home/knoppix/mnt/var/spool ext3 noatime 1 2

    Then I created a couple of scripts in /home/knoppix, .lvmon and .lvmoff (I had to make them dot files so saveconfig would save them):

    .lvmon:
    sudo vgscan && sudo vgchange -a y
    mkdir /home/knoppix/mnt
    sudo mount /dev/hda6
    sudo mount /dev/hda5
    sudo mount /dev/mandrake/3
    sudo mount /dev/mandrake/6
    sudo mount /dev/mandrake/4
    sudo mount /dev/mandrake/1
    sudo mount /dev/mandrake/2
    sudo mount /dev/mandrake/5

    .lvmoff
    sudo umount /dev/mandrake/5
    sudo umount /dev/mandrake/2
    sudo umount /dev/mandrake/1
    sudo umount /dev/mandrake/4
    sudo umount /dev/mandrake/6
    sudo umount /dev/mandrake/3
    sudo umount /dev/hda5
    sudo umount /dev/hda6
    sudo vgchange -a n

    I have found that if I forget to do .lvmoff that it still seems to work ok the next bootup (all volumes are unmounted during halt but no "vgchange -a n" is run as far as I know.

    It would be nice if it could do something like this automatically without me having to manually rebuild like I did. Is lvm smart enough to do that? Is there a magic file that would rebuild /etc/fstab automagically, then properly mount it in the proper order?

    Also, now that I have my mandrake tree, is there a way to have knoppix recognize my libs, etc? I have tried to run programs that I have on mandrake through knoppix, but most fail because it could not find the proper .so files or libs.

  9. #9
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    Re: how I got mine to work

    --Hmmmm... This appears to be a different LVM than what I'm using. I have multiple physical drives LVM'ed into one mount point:

    ls /dev/scsilvm -l
    total 0
    crw-r----- 1 root disk 109, 1 Dec 6 12:37 group
    brw-rw---- 1 root disk 58, 1 Dec 6 12:37 scsilvm
    dave:~> ls /dev/extralvm -l
    total 0
    brw-rw---- 1 root disk 58, 0 Dec 6 12:37 extralvm
    crw-r----- 1 root disk 109, 0 Dec 6 12:37 group

    --To save yourself some code, you could try (at least for the umount)
    ' sudo umount /dev/mandrake/? '

    >> Also, now that I have my mandrake tree, is there a way to have knoppix recognize my libs, etc? I have tried to run programs that I have on mandrake through knoppix, but most fail because it could not find the proper .so files or libs.

    --Mount your Mandrake root partition and chroot to it.
    ' mkdir /mnt/mdkroot '
    ' mount /dev/hdaX /mnt/mdkroot '
    ' chroot /mnt/mdkroot '

    --You may have to mount things again inside, once you're chrooted. BTW, the chroot only works for the 1 VT (virtual-terminal) that you issued the command in.

    Quote Originally Posted by sireasoning
    $ ls -l /dev/mandrake
    total 0
    brw-rw---- 1 root disk 58, 0 Jan 23 04:06 1
    brw-rw---- 1 root disk 58, 1 Jan 23 04:06 2
    brw-rw---- 1 root disk 58, 2 Jan 23 04:06 3
    brw-rw---- 1 root disk 58, 3 Jan 23 04:06 4
    brw-rw---- 1 root disk 58, 4 Jan 23 04:06 5
    brw-rw---- 1 root disk 58, 5 Jan 23 04:06 6
    crw-r----- 1 root disk 109, 0 Jan 23 04:06 group

    This was created through the Mandrake 8.2 gui.

    Next I rebuilt /etc/fstab:
    none /proc proc defaults 0 0
    none /dev/pts devpts mode=0622 0 0
    /dev/fd0 /mnt/auto/floppy auto user,noauto,exec,umask=000 0 0
    /dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0
    /dev/cdrom1 /mnt/auto/cdrom1 auto users,noauto,exec,ro 0 0
    # Added by KNOPPIX
    /dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
    #rebuild mandrake at /home/knoppix/mnt
    /dev/hda6 /home/knoppix/mnt/ ext3 noatime 1 1
    /dev/hda5 /home/knoppix/mnt/boot ext2 noatime 1 2
    /dev/mandrake/3 /home/knoppix/mnt/home reiserfs noatime,notail 1 2
    /dev/mandrake/6 /home/knoppix/mnt/mnt/shared ext3 noatime 1 2
    /dev/mandrake/4 /home/knoppix/mnt/opt ext3 noatime 1 2
    /dev/mandrake/1 /home/knoppix/mnt/usr xfs noatime 1 2
    /dev/mandrake/2 /home/knoppix/mnt/var xfs noatime 1 2
    /dev/mandrake/5 /home/knoppix/mnt/var/spool ext3 noatime 1 2

    Then I created a couple of scripts in /home/knoppix, .lvmon and .lvmoff (I had to make them dot files so saveconfig would save them):

    .lvmon:
    sudo vgscan && sudo vgchange -a y
    mkdir /home/knoppix/mnt
    sudo mount /dev/hda6
    sudo mount /dev/hda5
    sudo mount /dev/mandrake/3
    sudo mount /dev/mandrake/6
    sudo mount /dev/mandrake/4
    sudo mount /dev/mandrake/1
    sudo mount /dev/mandrake/2
    sudo mount /dev/mandrake/5

    .lvmoff
    sudo umount /dev/mandrake/5
    sudo umount /dev/mandrake/2
    sudo umount /dev/mandrake/1
    sudo umount /dev/mandrake/4
    sudo umount /dev/mandrake/6
    sudo umount /dev/mandrake/3
    sudo umount /dev/hda5
    sudo umount /dev/hda6
    sudo vgchange -a n

    I have found that if I forget to do .lvmoff that it still seems to work ok the next bootup (all volumes are unmounted during halt but no "vgchange -a n" is run as far as I know.

    It would be nice if it could do something like this automatically without me having to manually rebuild like I did. Is lvm smart enough to do that? Is there a magic file that would rebuild /etc/fstab automagically, then properly mount it in the proper order?

    Also, now that I have my mandrake tree, is there a way to have knoppix recognize my libs, etc? I have tried to run programs that I have on mandrake through knoppix, but most fail because it could not find the proper .so files or libs.

  10. #10
    Member registered user
    Join Date
    Jan 2003
    Posts
    38

    Re: how I got mine to work

    Quote Originally Posted by Dave_Bechtel
    --Hmmmm... This appears to be a different LVM than what I'm using. I have multiple physical drives LVM'ed into one mount point:

    ls /dev/scsilvm -l
    total 0
    crw-r----- 1 root disk 109, 1 Dec 6 12:37 group
    brw-rw---- 1 root disk 58, 1 Dec 6 12:37 scsilvm
    dave:~> ls /dev/extralvm -l
    total 0
    brw-rw---- 1 root disk 58, 0 Dec 6 12:37 extralvm
    crw-r----- 1 root disk 109, 0 Dec 6 12:37 group

    --To save yourself some code, you could try (at least for the umount)
    ' sudo umount /dev/mandrake/? '

    >> Also, now that I have my mandrake tree, is there a way to have knoppix recognize my libs, etc? I have tried to run programs that I have on mandrake through knoppix, but most fail because it could not find the proper .so files or libs.

    --Mount your Mandrake root partition and chroot to it.
    ' mkdir /mnt/mdkroot '
    ' mount /dev/hdaX /mnt/mdkroot '
    ' chroot /mnt/mdkroot '

    --You may have to mount things again inside, once you're chrooted. BTW, the chroot only works for the 1 VT (virtual-terminal) that you issued the command in.
    I tried chroot, but it would not let the program run in X. It also ate ram like candy when I attempted to use mc.

Page 1 of 2 12 LastLast

Similar Threads

  1. disks needs to be checked for consistency
    By FallingStar in forum General Support
    Replies: 1
    Last Post: 02-24-2004, 04:50 AM
  2. Boot Disks
    By bftet in forum General Support
    Replies: 7
    Last Post: 02-17-2004, 03:02 AM
  3. 2 hard disks - how to do it
    By xbenchman in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 10-07-2003, 08:37 PM
  4. disks automount running from CD; why not after HDD install?
    By timothy in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 10-05-2003, 07:43 AM
  5. Problems with install with two disks.
    By drormata in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 07-01-2003, 10:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Cisco Catalyst 48-Port Manage Gigabit Switch w/ 2x 10G SFP+ WS-C2960S-48FPD-L picture

Cisco Catalyst 48-Port Manage Gigabit Switch w/ 2x 10G SFP+ WS-C2960S-48FPD-L

$59.99



Cisco Catalyst 3650 48-Port Managed PoE+ Gigabit Switch WS-C3650-48FS-E picture

Cisco Catalyst 3650 48-Port Managed PoE+ Gigabit Switch WS-C3650-48FS-E

$55.99



HP Procurve 2824 24 Gigabit Ports 10/100/1000 External Managed Switch J4903A picture

HP Procurve 2824 24 Gigabit Ports 10/100/1000 External Managed Switch J4903A

$74.99



8 Ports Unmanaged Industrial Ethernet Switch Network Gigabit Ethernet Switch picture

8 Ports Unmanaged Industrial Ethernet Switch Network Gigabit Ethernet Switch

$76.50



HP 2530-48G 48 Port Gigabit Ethernet Network Switch J9775A picture

HP 2530-48G 48 Port Gigabit Ethernet Network Switch J9775A

$30.95



New Linksys SE3005 5-port Gigabit Ethernet Switch picture

New Linksys SE3005 5-port Gigabit Ethernet Switch

$18.99



New 10/100 Mbps 8 Ports Fast Ethernet LAN Desktop RJ45 Network Switch Hub picture

New 10/100 Mbps 8 Ports Fast Ethernet LAN Desktop RJ45 Network Switch Hub

$11.49



HP ProCurve 2530-24G J9776A 24 Port Gigabit Ethernet Managed Network Switch picture

HP ProCurve 2530-24G J9776A 24 Port Gigabit Ethernet Managed Network Switch

$34.99



Juniper Networks EX3300-48P 48-Port PoE+ 4x SFP+ Network Switch w/ Power Cord picture

Juniper Networks EX3300-48P 48-Port PoE+ 4x SFP+ Network Switch w/ Power Cord

$43.95



HP Aruba 2530-8G-PoE+ 8x PoE+ RJ45 2x SFP Gigabit Switch J9774A No AC Adapter picture

HP Aruba 2530-8G-PoE+ 8x PoE+ RJ45 2x SFP Gigabit Switch J9774A No AC Adapter

$37.99