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?
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?
for those who don't know lvm = logical volume management
--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.
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?
--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.
===========
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?
--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:
--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:/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
--All you should need is (say) /mnt/mandrakelvm, instead of 1-6.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
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.
--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.
Originally Posted by sireasoning
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.Originally Posted by Dave_Bechtel
SAS - HGST Ultrastar 7K4000 HUS724040ALA640 0F14688 3.5" 4TB 7.2K RPM 64MB HDD
$19.99
HITACHI HUS724040ALA640 4TB 7200RPM 64MB SATA 6.0Gb/s 3.5" HARD DRIVE ZERO HOURS
$52.00
Seagate ST1000VM002 1TB 64MB SATA6Gb/s 3.5" (Low Power) Hard Drive -PC, CCTV DVR
$24.99
Seagate ST8000NM0055 8TB 7200RPM 256MB SATA 6.0 Gb/s 3.5" Enterprise Hard Drive
$34.33
HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5" Enterprise HDD- HUH721212ALE601
$74.99
Seagate ST12000NM0127 12TB SATA 6Gb/s 256MB 7200RPM 3.5" Enterprise Hard Drive
$99.99
1TB HDD/SSD 2.5" SATA Hard Drive with Windows 10 or Windows 11 Pro Installed
$18.99
Seagate Exos X20 18TB SATA 6Gb/s 3.5" Enterprise Hard Drive - ST18000NM003D
$168.00
Western Digital Gold Enterprise 4TB,7200 RPM Internal Hard Disk Drive WD4002FYYZ
$39.95
Seagate ST8000NM0055 8TB 7200RPM 256MB SATA 6.0 Gb/s 3.5" Enterprise Hard Drive
$34.33