* [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob @ 2003-12-18 23:15 Madison Kelly 2003-12-19 9:07 ` Jord Tanner 0 siblings, 1 reply; 12+ messages in thread From: Madison Kelly @ 2003-12-18 23:15 UTC (permalink / raw) To: linux-lvm Hi all, This is my first post to the list so forgive me please if I am making any mistakes of protocol! :) I am relatively new to LVM but I have read most of the docs that I could find on the topic and I am pretty strong on RAID and general storage tech. With that said, here is my problem/scenario: I have a small test server that I am trying to use to learn how to configure the '/' filesystem of a Fedora Core 1 install of linux to reside on a software RAID5 array with an LVM VG on top of it and the bulk of that partition on a single LV mounted as '/'. This so far is just fine. Oh, fwiw, the four drives are SCSI on an Adaptec 2940x PCI controller (three in use now, a forth to be used as a temp drive during FS convertion and later added to the array) with another IDE drive used for '/boot' and <swap>. Now what I am trying to do immidiately is to convert the '/' filesystem from 'ext3' to 'resierfs'. ReiserFS is not an install-time option and the LVM FAQ says simple to boot from a rescue CD, back the '/' LV data up, re-format the LV with a ReiserFS and then restore the data. Sounds easy enough, eh? Anyway, I have been able to do all of this and I am even pretty sure that the data is intact because when I boot the Fedora Core 1 Disk 1 using 'linux rescue' it scans for the install and finds it on both '/dev/sdd1' (the drive I am using temporarily to backup the '/' LV data to) and on '/dev/vg0/root' (the LV that started life as an ext3 filesystem during the OS install). The problem is that when I boot into the OS proper something somewhere is still telling something to do with LVM that the file system is still ext3 and thus it throws a kernel panic. I have edited '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to read 'reiserfs' instead of the original 'ext3'. Am I missing a file somewhere? Is there a command I need to run to tell '/etc/lvmtab' or '/etc/lvmtab.d/root' that the filesystem has changed? Am I missing something all together different? Anywho, as a little heads up and maybe a little request for comment; once I manage to get the '/' LV on ReiserFS the next thing I want to do is add a forth drive (the '/dev/sdd' drive) to the RAID5 array, extend it via 'raidreconf', add the new space to the PV, pass that space up to the VG and finally extend the 'root' LV and update the filesystem while online (hence the desire for ReiserFS). Am I on the right track? Does anyone who has done this before have any pointers? Thanks all for listening to a n00by!! Madison ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-18 23:15 [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob Madison Kelly @ 2003-12-19 9:07 ` Jord Tanner 2003-12-19 10:54 ` Madison Kelly 0 siblings, 1 reply; 12+ messages in thread From: Jord Tanner @ 2003-12-19 9:07 UTC (permalink / raw) To: linux-lvm You need to run "lvmcreate_initrd", which will create an lvm-initrd file in /boot. Then edit grub.conf to use the new initrd, and you are off to the races. This will make the lvm tools available at boot, then your VG will come online. On Thu, 2003-12-18 at 21:14, Madison Kelly wrote: > Hi all, > > This is my first post to the list so forgive me please if I am making > any mistakes of protocol! :) > > I am relatively new to LVM but I have read most of the docs that I > could find on the topic and I am pretty strong on RAID and general > storage tech. With that said, here is my problem/scenario: > > I have a small test server that I am trying to use to learn how to > configure the '/' filesystem of a Fedora Core 1 install of linux to > reside on a software RAID5 array with an LVM VG on top of it and the > bulk of that partition on a single LV mounted as '/'. This so far is > just fine. Oh, fwiw, the four drives are SCSI on an Adaptec 2940x PCI > controller (three in use now, a forth to be used as a temp drive during > FS convertion and later added to the array) with another IDE drive used > for '/boot' and <swap>. > > Now what I am trying to do immidiately is to convert the '/' > filesystem from 'ext3' to 'resierfs'. ReiserFS is not an install-time > option and the LVM FAQ says simple to boot from a rescue CD, back the > '/' LV data up, re-format the LV with a ReiserFS and then restore the > data. Sounds easy enough, eh? Anyway, I have been able to do all of this > and I am even pretty sure that the data is intact because when I boot > the Fedora Core 1 Disk 1 using 'linux rescue' it scans for the install > and finds it on both '/dev/sdd1' (the drive I am using temporarily to > backup the '/' LV data to) and on '/dev/vg0/root' (the LV that started > life as an ext3 filesystem during the OS install). > > The problem is that when I boot into the OS proper something > somewhere is still telling something to do with LVM that the file system > is still ext3 and thus it throws a kernel panic. I have edited > '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to read 'reiserfs' > instead of the original 'ext3'. Am I missing a file somewhere? Is there > a command I need to run to tell '/etc/lvmtab' or '/etc/lvmtab.d/root' > that the filesystem has changed? Am I missing something all together > different? > > Anywho, as a little heads up and maybe a little request for comment; > once I manage to get the '/' LV on ReiserFS the next thing I want to do > is add a forth drive (the '/dev/sdd' drive) to the RAID5 array, extend > it via 'raidreconf', add the new space to the PV, pass that space up to > the VG and finally extend the 'root' LV and update the filesystem while > online (hence the desire for ReiserFS). Am I on the right track? Does > anyone who has done this before have any pointers? > > Thanks all for listening to a n00by!! > > Madison > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@sistina.com > http://lists.sistina.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ -- Jord Tanner <jord@indygecko.com> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 9:07 ` Jord Tanner @ 2003-12-19 10:54 ` Madison Kelly 2003-12-19 11:19 ` Madison Kelly 2003-12-19 12:20 ` Jord Tanner 0 siblings, 2 replies; 12+ messages in thread From: Madison Kelly @ 2003-12-19 10:54 UTC (permalink / raw) To: linux-lvm Hi! Thank you very much for your reply! May I pick your brain just a little bit more? Because I can't boot I am currently accessing the LVM LV via the Fedora Core 1 Install 1 CD using the 'linux rescue' option. I tried running that command but it threw a lot of "file not found" errors so I syslinked the missing files into place and it seemed a lot better but I keep getting two more errors; To show you what I mean here is the output: -= First, 'df' before I begin... sh-2.05b# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 6120 3564 2206 62% / /dev/root.old 6120 3564 2206 62% / /tmp/cdrom 644864 644864 0 100% /mnt/source /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single (Note that I have an IDE for '/boot' and swap) -= Okay, my simlinks are in place. Now running 'lvmcreate_initrd' sh-2.05b# lvmcreate_initrd Logical Volume Manager 1.0.3 by Heinz Mauelshagen 02/19/2002 lvmcreate_initrd -- make LVM initial ram disk /boot/initrd-lvm-2.4.22-1.2115.nptl.gz lvmcreate_initrd -- finding required shared libraries lvmcreate_initrd -- stripping shared libraries lvmcreate_initrd -- calculating initrd filesystem parameters lvmcreate_initrd -- calculating loopback file size du: invalid option -- c BusyBox v0.60.5 (2003.01.24-22:44+000) multi-call binary Usage: du [-lsxhmk] [FILE]... lvmcreate_initrd -- making loopback file (541 kB) lvmcreate_initrd -- making ram disk filesystem 9238 inodes) lvmcreate_initrd -- mounting ramdisk filesystem lvmcreate_initrd -- creating new /etc/modules.conf lvmcreate_initrd -- creating new modules.dep depmod: Can't open /lib/modules/2.4.22-1.2115.nptl/modules.dep for writing lvmcreate_initrd -- ERROR running depmod rmdir: unable to remove '/tmp/mnt.1185': Device or resource busy -= It failed... Here is 'df' again, with the loopback still mounted sh-2.05b# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 6120 3564 2206 62% / /dev/root.old 6120 3564 2206 62% / /tmp/cdrom 644864 644864 0 100% /mnt/source /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single /dev/loop1 506 19 487 4% /tmp/mnt.1185 -= When I try to create a symlink to '/lib/modules' I am told: sh-2.05b# cd /lib sh-2.05b# ln -s /mnt/sysimage/lib/modules ln: creating symbolic link './modules' to '/mnt/sysimage/lib/modules': Read-only file system sh-2.05b# cd / sh-2.05b# ls -lah | grep lib lrwxrwxrwx 1 root root 16 Dec 19 12:05 lib -> /mnt/runtime/lib sh-2.05b# cd /mnt/runtime/ sh-2.05b# ls -lah | grep lib drwxr-xr-x 1 root root 1.6k Jan 1 1970 lib So, have I done something stupidly wrong?? :) Again, you help is -very- much appreciated! Madison Jord Tanner wrote: > You need to run "lvmcreate_initrd", which will create an lvm-initrd file > in /boot. Then edit grub.conf to use the new initrd, and you are off to > the races. This will make the lvm tools available at boot, then your VG > will come online. > > On Thu, 2003-12-18 at 21:14, Madison Kelly wrote: > >>Hi all, >> >> This is my first post to the list so forgive me please if I am making >>any mistakes of protocol! :) >> >> I am relatively new to LVM but I have read most of the docs that I >>could find on the topic and I am pretty strong on RAID and general >>storage tech. With that said, here is my problem/scenario: >> >> I have a small test server that I am trying to use to learn how to >>configure the '/' filesystem of a Fedora Core 1 install of linux to >>reside on a software RAID5 array with an LVM VG on top of it and the >>bulk of that partition on a single LV mounted as '/'. This so far is >>just fine. Oh, fwiw, the four drives are SCSI on an Adaptec 2940x PCI >>controller (three in use now, a forth to be used as a temp drive during >>FS convertion and later added to the array) with another IDE drive used >>for '/boot' and <swap>. >> >> Now what I am trying to do immidiately is to convert the '/' >>filesystem from 'ext3' to 'resierfs'. ReiserFS is not an install-time >>option and the LVM FAQ says simple to boot from a rescue CD, back the >>'/' LV data up, re-format the LV with a ReiserFS and then restore the >>data. Sounds easy enough, eh? Anyway, I have been able to do all of this >>and I am even pretty sure that the data is intact because when I boot >>the Fedora Core 1 Disk 1 using 'linux rescue' it scans for the install >>and finds it on both '/dev/sdd1' (the drive I am using temporarily to >>backup the '/' LV data to) and on '/dev/vg0/root' (the LV that started >>life as an ext3 filesystem during the OS install). >> >> The problem is that when I boot into the OS proper something >>somewhere is still telling something to do with LVM that the file system >>is still ext3 and thus it throws a kernel panic. I have edited >>'/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to read 'reiserfs' >>instead of the original 'ext3'. Am I missing a file somewhere? Is there >>a command I need to run to tell '/etc/lvmtab' or '/etc/lvmtab.d/root' >>that the filesystem has changed? Am I missing something all together >>different? >> >> Anywho, as a little heads up and maybe a little request for comment; >>once I manage to get the '/' LV on ReiserFS the next thing I want to do >>is add a forth drive (the '/dev/sdd' drive) to the RAID5 array, extend >>it via 'raidreconf', add the new space to the PV, pass that space up to >>the VG and finally extend the 'root' LV and update the filesystem while >>online (hence the desire for ReiserFS). Am I on the right track? Does >>anyone who has done this before have any pointers? >> >> Thanks all for listening to a n00by!! >> >>Madison ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 10:54 ` Madison Kelly @ 2003-12-19 11:19 ` Madison Kelly 2003-12-19 12:20 ` Jord Tanner 1 sibling, 0 replies; 12+ messages in thread From: Madison Kelly @ 2003-12-19 11:19 UTC (permalink / raw) To: linux-lvm Just to add in case it might help, here is the kernel panic: -= Kernel panic... ... Creating block devices Scanning logical volumes vgscan -- reading all physical volumes (this may take a while...) raid5: switching cache buffer size, 4096 --> 1024 vgscan -- found inactive volume group "vg0" vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume group Activating logical volumes vgchange -- volume group "vg0" successfully activate Mounting root filesystem VFS: Can't find ext3 filesystem on dev lvm(58,0). mount: error 22 mounting ext3 picotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2 umount /initrd/proc failed: 2 Freeing unused kernel memory: 136k freed Kernel panic: No init found. Try passing init= option to kernel. -= End kernel panic Again, thank you all very much! Madison Madison Kelly wrote: > Hi! > > Thank you very much for your reply! May I pick your brain just a > little bit more? Because I can't boot I am currently accessing the LVM > LV via the Fedora Core 1 Install 1 CD using the 'linux rescue' option. I > tried running that command but it threw a lot of "file not found" errors > so I syslinked the missing files into place and it seemed a lot better > but I keep getting two more errors; > > To show you what I mean here is the output: > > -= First, 'df' before I begin... > > sh-2.05b# df > Filesystem 1K-blocks Used Available Use% Mounted on > rootfs 6120 3564 2206 62% / > /dev/root.old 6120 3564 2206 62% / > /tmp/cdrom 644864 644864 0 100% /mnt/source > /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage > /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot > /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single > > (Note that I have an IDE for '/boot' and swap) > > -= Okay, my simlinks are in place. Now running 'lvmcreate_initrd' > > sh-2.05b# lvmcreate_initrd > Logical Volume Manager 1.0.3 by Heinz Mauelshagen 02/19/2002 > lvmcreate_initrd -- make LVM initial ram disk > /boot/initrd-lvm-2.4.22-1.2115.nptl.gz > > lvmcreate_initrd -- finding required shared libraries > lvmcreate_initrd -- stripping shared libraries > lvmcreate_initrd -- calculating initrd filesystem parameters > lvmcreate_initrd -- calculating loopback file size > du: invalid option -- c > BusyBox v0.60.5 (2003.01.24-22:44+000) multi-call binary > > Usage: du [-lsxhmk] [FILE]... > > lvmcreate_initrd -- making loopback file (541 kB) > lvmcreate_initrd -- making ram disk filesystem 9238 inodes) > lvmcreate_initrd -- mounting ramdisk filesystem > lvmcreate_initrd -- creating new /etc/modules.conf > lvmcreate_initrd -- creating new modules.dep > depmod: Can't open /lib/modules/2.4.22-1.2115.nptl/modules.dep for writing > lvmcreate_initrd -- ERROR running depmod > rmdir: unable to remove '/tmp/mnt.1185': Device or resource busy > > -= It failed... Here is 'df' again, with the loopback still mounted > > sh-2.05b# df > Filesystem 1K-blocks Used Available Use% Mounted on > rootfs 6120 3564 2206 62% / > /dev/root.old 6120 3564 2206 62% / > /tmp/cdrom 644864 644864 0 100% /mnt/source > /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage > /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot > /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single > /dev/loop1 506 19 487 4% /tmp/mnt.1185 > > -= When I try to create a symlink to '/lib/modules' I am told: > > sh-2.05b# cd /lib > sh-2.05b# ln -s /mnt/sysimage/lib/modules > ln: creating symbolic link './modules' to '/mnt/sysimage/lib/modules': > Read-only file system > sh-2.05b# cd / > sh-2.05b# ls -lah | grep lib > lrwxrwxrwx 1 root root 16 Dec 19 12:05 lib -> /mnt/runtime/lib > sh-2.05b# cd /mnt/runtime/ > sh-2.05b# ls -lah | grep lib > drwxr-xr-x 1 root root 1.6k Jan 1 1970 lib > > So, have I done something stupidly wrong?? :) > > Again, you help is -very- much appreciated! > > Madison > > Jord Tanner wrote: > >> You need to run "lvmcreate_initrd", which will create an lvm-initrd file >> in /boot. Then edit grub.conf to use the new initrd, and you are off to >> the races. This will make the lvm tools available at boot, then your VG >> will come online. >> >> On Thu, 2003-12-18 at 21:14, Madison Kelly wrote: >> >>> Hi all, >>> >>> This is my first post to the list so forgive me please if I am >>> making any mistakes of protocol! :) >>> >>> I am relatively new to LVM but I have read most of the docs that I >>> could find on the topic and I am pretty strong on RAID and general >>> storage tech. With that said, here is my problem/scenario: >>> >>> I have a small test server that I am trying to use to learn how to >>> configure the '/' filesystem of a Fedora Core 1 install of linux to >>> reside on a software RAID5 array with an LVM VG on top of it and the >>> bulk of that partition on a single LV mounted as '/'. This so far is >>> just fine. Oh, fwiw, the four drives are SCSI on an Adaptec 2940x PCI >>> controller (three in use now, a forth to be used as a temp drive >>> during FS convertion and later added to the array) with another IDE >>> drive used for '/boot' and <swap>. >>> >>> Now what I am trying to do immidiately is to convert the '/' >>> filesystem from 'ext3' to 'resierfs'. ReiserFS is not an install-time >>> option and the LVM FAQ says simple to boot from a rescue CD, back the >>> '/' LV data up, re-format the LV with a ReiserFS and then restore the >>> data. Sounds easy enough, eh? Anyway, I have been able to do all of >>> this and I am even pretty sure that the data is intact because when I >>> boot the Fedora Core 1 Disk 1 using 'linux rescue' it scans for the >>> install and finds it on both '/dev/sdd1' (the drive I am using >>> temporarily to backup the '/' LV data to) and on '/dev/vg0/root' (the >>> LV that started life as an ext3 filesystem during the OS install). >>> >>> The problem is that when I boot into the OS proper something >>> somewhere is still telling something to do with LVM that the file >>> system is still ext3 and thus it throws a kernel panic. I have edited >>> '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to read 'reiserfs' >>> instead of the original 'ext3'. Am I missing a file somewhere? Is >>> there a command I need to run to tell '/etc/lvmtab' or >>> '/etc/lvmtab.d/root' that the filesystem has changed? Am I missing >>> something all together different? >>> >>> Anywho, as a little heads up and maybe a little request for >>> comment; once I manage to get the '/' LV on ReiserFS the next thing I >>> want to do is add a forth drive (the '/dev/sdd' drive) to the RAID5 >>> array, extend it via 'raidreconf', add the new space to the PV, pass >>> that space up to the VG and finally extend the 'root' LV and update >>> the filesystem while online (hence the desire for ReiserFS). Am I on >>> the right track? Does anyone who has done this before have any pointers? >>> >>> Thanks all for listening to a n00by!! >>> >>> Madison > > > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@sistina.com > http://lists.sistina.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 10:54 ` Madison Kelly 2003-12-19 11:19 ` Madison Kelly @ 2003-12-19 12:20 ` Jord Tanner 2003-12-19 13:55 ` Madison Kelly 1 sibling, 1 reply; 12+ messages in thread From: Jord Tanner @ 2003-12-19 12:20 UTC (permalink / raw) To: linux-lvm Don't do any symlinking, instead try this: sh-2.05b# mount -t proc proc /mnt/sysimage/proc sh-2.05b# chroot /mnt/sysimage /bin/bash sh-2.05b# source /etc/profile [root@hostname /]# lvmcreate_initrd [root@hostname /]# exit sh-2.05b# umount /mnt/sysimage/proc sh-2.05b# shutdown -r now You may have more success. I think the reason you were getting errors is that lvmcreate_initrd assumes that your system file tree starts at /, not at /mnt/sysimage. You were able to fool it somewhat with symlinking, but the real solution is to chroot to the real /, then run lvmcreate_initrd. As always YMMV. On Fri, 2003-12-19 at 08:53, Madison Kelly wrote: > Hi! > > Thank you very much for your reply! May I pick your brain just a > little bit more? Because I can't boot I am currently accessing the LVM > LV via the Fedora Core 1 Install 1 CD using the 'linux rescue' option. I > tried running that command but it threw a lot of "file not found" errors > so I syslinked the missing files into place and it seemed a lot better > but I keep getting two more errors; > > To show you what I mean here is the output: > > -= First, 'df' before I begin... > > sh-2.05b# df > Filesystem 1K-blocks Used Available Use% Mounted on > rootfs 6120 3564 2206 62% / > /dev/root.old 6120 3564 2206 62% / > /tmp/cdrom 644864 644864 0 100% /mnt/source > /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage > /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot > /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single > > (Note that I have an IDE for '/boot' and swap) > > -= Okay, my simlinks are in place. Now running 'lvmcreate_initrd' > > sh-2.05b# lvmcreate_initrd > Logical Volume Manager 1.0.3 by Heinz Mauelshagen 02/19/2002 > lvmcreate_initrd -- make LVM initial ram disk > /boot/initrd-lvm-2.4.22-1.2115.nptl.gz > > lvmcreate_initrd -- finding required shared libraries > lvmcreate_initrd -- stripping shared libraries > lvmcreate_initrd -- calculating initrd filesystem parameters > lvmcreate_initrd -- calculating loopback file size > du: invalid option -- c > BusyBox v0.60.5 (2003.01.24-22:44+000) multi-call binary > > Usage: du [-lsxhmk] [FILE]... > > lvmcreate_initrd -- making loopback file (541 kB) > lvmcreate_initrd -- making ram disk filesystem 9238 inodes) > lvmcreate_initrd -- mounting ramdisk filesystem > lvmcreate_initrd -- creating new /etc/modules.conf > lvmcreate_initrd -- creating new modules.dep > depmod: Can't open /lib/modules/2.4.22-1.2115.nptl/modules.dep for writing > lvmcreate_initrd -- ERROR running depmod > rmdir: unable to remove '/tmp/mnt.1185': Device or resource busy > > -= It failed... Here is 'df' again, with the loopback still mounted > > sh-2.05b# df > Filesystem 1K-blocks Used Available Use% Mounted on > rootfs 6120 3564 2206 62% / > /dev/root.old 6120 3564 2206 62% / > /tmp/cdrom 644864 644864 0 100% /mnt/source > /dev/vg0/root 17919448 1916960 16002488 11% /mnt/sysimage > /dev/hda1 101086 6767 89100 8% /mnt/sysimage/boot > /dev/hda3 76304192 32828 72395284 1% /mnt/sysimage/single > /dev/loop1 506 19 487 4% /tmp/mnt.1185 > > -= When I try to create a symlink to '/lib/modules' I am told: > > sh-2.05b# cd /lib > sh-2.05b# ln -s /mnt/sysimage/lib/modules > ln: creating symbolic link './modules' to '/mnt/sysimage/lib/modules': > Read-only file system > sh-2.05b# cd / > sh-2.05b# ls -lah | grep lib > lrwxrwxrwx 1 root root 16 Dec 19 12:05 lib -> /mnt/runtime/lib > sh-2.05b# cd /mnt/runtime/ > sh-2.05b# ls -lah | grep lib > drwxr-xr-x 1 root root 1.6k Jan 1 1970 lib > > So, have I done something stupidly wrong?? :) > > Again, you help is -very- much appreciated! > > Madison > > Jord Tanner wrote: > > You need to run "lvmcreate_initrd", which will create an lvm-initrd file > > in /boot. Then edit grub.conf to use the new initrd, and you are off to > > the races. This will make the lvm tools available at boot, then your VG > > will come online. > > > > On Thu, 2003-12-18 at 21:14, Madison Kelly wrote: > > > >>Hi all, > >> > >> This is my first post to the list so forgive me please if I am making > >>any mistakes of protocol! :) > >> > >> I am relatively new to LVM but I have read most of the docs that I > >>could find on the topic and I am pretty strong on RAID and general > >>storage tech. With that said, here is my problem/scenario: > >> > >> I have a small test server that I am trying to use to learn how to > >>configure the '/' filesystem of a Fedora Core 1 install of linux to > >>reside on a software RAID5 array with an LVM VG on top of it and the > >>bulk of that partition on a single LV mounted as '/'. This so far is > >>just fine. Oh, fwiw, the four drives are SCSI on an Adaptec 2940x PCI > >>controller (three in use now, a forth to be used as a temp drive during > >>FS convertion and later added to the array) with another IDE drive used > >>for '/boot' and <swap>. > >> > >> Now what I am trying to do immidiately is to convert the '/' > >>filesystem from 'ext3' to 'resierfs'. ReiserFS is not an install-time > >>option and the LVM FAQ says simple to boot from a rescue CD, back the > >>'/' LV data up, re-format the LV with a ReiserFS and then restore the > >>data. Sounds easy enough, eh? Anyway, I have been able to do all of this > >>and I am even pretty sure that the data is intact because when I boot > >>the Fedora Core 1 Disk 1 using 'linux rescue' it scans for the install > >>and finds it on both '/dev/sdd1' (the drive I am using temporarily to > >>backup the '/' LV data to) and on '/dev/vg0/root' (the LV that started > >>life as an ext3 filesystem during the OS install). > >> > >> The problem is that when I boot into the OS proper something > >>somewhere is still telling something to do with LVM that the file system > >>is still ext3 and thus it throws a kernel panic. I have edited > >>'/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to read 'reiserfs' > >>instead of the original 'ext3'. Am I missing a file somewhere? Is there > >>a command I need to run to tell '/etc/lvmtab' or '/etc/lvmtab.d/root' > >>that the filesystem has changed? Am I missing something all together > >>different? > >> > >> Anywho, as a little heads up and maybe a little request for comment; > >>once I manage to get the '/' LV on ReiserFS the next thing I want to do > >>is add a forth drive (the '/dev/sdd' drive) to the RAID5 array, extend > >>it via 'raidreconf', add the new space to the PV, pass that space up to > >>the VG and finally extend the 'root' LV and update the filesystem while > >>online (hence the desire for ReiserFS). Am I on the right track? Does > >>anyone who has done this before have any pointers? > >> > >> Thanks all for listening to a n00by!! > >> > >>Madison > > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@sistina.com > http://lists.sistina.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ -- Jord Tanner <jord@indygecko.com> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 12:20 ` Jord Tanner @ 2003-12-19 13:55 ` Madison Kelly 2003-12-19 14:46 ` Chris Cox 0 siblings, 1 reply; 12+ messages in thread From: Madison Kelly @ 2003-12-19 13:55 UTC (permalink / raw) To: linux-lvm Time for me to feel really foolish... I am trying to do just this from '/' but I am getting a "Device or resource busy" error... '/proc' is mounted off of root already... I tried continuing on and it seemed to have worked anyway though it threw a LOT of: depmod: *** Unresolved symbol in /lib/modules/2.4.22-1.2115.nptl/unsupported/<dir/file> The rest seemed fine and I made the entry into grub.conf pointing to the new boot image. I ams till getting a kernel panic now but it no longer seems to have anything to do with LVM, simply it is -still- looking for an ext3 partition and obviously failing to find it. Is there an LV, LVM, VG or PV command I need to issue to tell the system that the filesystem is now resierfs? As I mentioned, I have edited '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to reflect the changes. What am I missing? Gah! I feel like I am so close yet so far! Madison Jord Tanner wrote: > Don't do any symlinking, instead try this: > > sh-2.05b# mount -t proc proc /mnt/sysimage/proc > sh-2.05b# chroot /mnt/sysimage /bin/bash > sh-2.05b# source /etc/profile > [root@hostname /]# lvmcreate_initrd > [root@hostname /]# exit > sh-2.05b# umount /mnt/sysimage/proc > sh-2.05b# shutdown -r now > > You may have more success. I think the reason you were getting errors is > that lvmcreate_initrd assumes that your system file tree starts at /, > not at /mnt/sysimage. You were able to fool it somewhat with symlinking, > but the real solution is to chroot to the real /, then run > lvmcreate_initrd. As always YMMV. > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 13:55 ` Madison Kelly @ 2003-12-19 14:46 ` Chris Cox 2003-12-19 14:54 ` Madison Kelly 0 siblings, 1 reply; 12+ messages in thread From: Chris Cox @ 2003-12-19 14:46 UTC (permalink / raw) To: linux-lvm Madison Kelly wrote: ... > > Is there an LV, LVM, VG or PV command I need to issue to tell the system > that the filesystem is now resierfs? As I mentioned, I have edited > '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to reflect the changes. > What am I missing? Gah! I feel like I am so close yet so far! Is reiserfs being loaded in by your initrd? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 14:46 ` Chris Cox @ 2003-12-19 14:54 ` Madison Kelly 2003-12-19 15:22 ` Chris Cox 0 siblings, 1 reply; 12+ messages in thread From: Madison Kelly @ 2003-12-19 14:54 UTC (permalink / raw) To: linux-lvm I am so sorry for asking but how would I check? Madison Chris Cox wrote: > Madison Kelly wrote: > ... > >> >> Is there an LV, LVM, VG or PV command I need to issue to tell the >> system that the filesystem is now resierfs? As I mentioned, I have >> edited '/etc/fstab', '/etc/mtab' and '/etc/blkid.tab' to reflect the >> changes. What am I missing? Gah! I feel like I am so close yet so far! > > > Is reiserfs being loaded in by your initrd? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 14:54 ` Madison Kelly @ 2003-12-19 15:22 ` Chris Cox 2003-12-19 16:31 ` Madison Kelly 0 siblings, 1 reply; 12+ messages in thread From: Chris Cox @ 2003-12-19 15:22 UTC (permalink / raw) To: linux-lvm Madison Kelly wrote: > I am so sorry for asking but how would I check? > I'm a SUSE user myself. It's mkinitrd script makes it pretty easy to add modules to your initrd. I'd check that lvm_mkinitrd script of yours... you may have to tweak it. In fact, SUSE's script detects (tries anyway) if your root filesystem is LVM's and automatically adds in the lvm_mod if it wasn't specified. There's probably a way to find out easily if it's there already.. just not sure off the top of my head. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob 2003-12-19 15:22 ` Chris Cox @ 2003-12-19 16:31 ` Madison Kelly 2003-12-21 15:47 ` [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem wopp 0 siblings, 1 reply; 12+ messages in thread From: Madison Kelly @ 2003-12-19 16:31 UTC (permalink / raw) To: linux-lvm I will investigate that further... May I make one more comment that may help me solve this? Quick note, since the last post I wiped the test server and re-installed, just in case I had foobar'ed something along the way. I have made a backup of '/' (from '/dev/vg0/root') to the backup drive (/dev/sdd1) and edited '/etc/fstab', '/etc/mtab' and deleted '/etc/blkid.tab' (which, if I understand is just a cache). I did this on both the '/' (/dev/vg0/root and /dev/sdd1) while under the Linux Rescue disk (Fedora Core 1 install in 'linux rescue') and finally I updated '/boot/grub/grub.conf' on both partitions as well to contain entries pointing '/' to '/dev/sdd1'. When I reboot (before converting the LVM LV to ReiserFS) and choose to boot into '/dev/sdd1' as root it -seems- to work. When I type: # df It shows '/' to be '/dev/sdd'. Now to verify this I did: # cd / # touch test.txt # mkdir vg0 # mount /dev/vg0/root /vg0 I then checked to see if the 'test.txt' file was there, and it was. How the heck can the original settings for '/dev/vg0/root' be -SO- persistent that even 'df' thinks that the wrong partition is mounted?!? Where are these settings stored? Side note: When I boot again off the rescue disk and run the same test (with '/dev/sdd1' mounted as '/') then it is fine, there '/' really is '/dev/sdd1'...) Anyway, I am off to try converting again now that I know to try passing "init=reiserfs" in grub (will it work though?... Off to see!) Thank you for being so helpful and patient while I pound my head through this! Madison Chris Cox wrote: > Madison Kelly wrote: > >> I am so sorry for asking but how would I check? >> > > I'm a SUSE user myself. It's mkinitrd script > makes it pretty easy to add modules to your > initrd. I'd check that lvm_mkinitrd script > of yours... you may have to tweak it. > In fact, SUSE's script detects (tries anyway) if > your root filesystem is LVM's and automatically > adds in the lvm_mod if it wasn't specified. > > There's probably a way to find out easily if > it's there already.. just not sure off the top of my head. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem 2003-12-19 16:31 ` Madison Kelly @ 2003-12-21 15:47 ` wopp 2003-12-21 21:10 ` Madison Kelly 0 siblings, 1 reply; 12+ messages in thread From: wopp @ 2003-12-21 15:47 UTC (permalink / raw) To: linux-lvm [-- Attachment #1: Type: text/plain, Size: 3484 bytes --] Hi, at some point in this thread, Madison Kelly wrote: > I am still getting a kernel panic now but it no longer > seems to have anything to do with LVM, simply it is -still- looking for > an ext3 partition and obviously failing to find it. sorry to say so, but it never did have anything to do with LVM. Unless I completely misunderstood you, you first had / on LVM as ext3, and it worked. When you try to boot with / on /dev/sdd1 as reiserfs, it doesn't work. It may sound obvious (and the thread has already come to this conclusion - I'm just trying to make it more clear), but your kernel doesn't support reiserfs, so you have to load reiserfs as a module from initrd - by whatever means Redhat provides or by manually creating an appropriate initrd (if you do that, use the one you have as a starting point). Or, of course, compile a kernel with reiserfs support built in. You don't need to do any of this from the 'rescue disk' (especially not compile a kernel ;-). You can just as well boot into your normal setup (with / as ext3). If I'm not totally mistaken, the FS type of / is not specified anywhere but rather autodetected by the kernel on boot. Between booting into your ext3 system on /dev/vg0/root and your reiserfs copy on /dev/sdd1, you don't have to change any files. Come to think of it, how would the kernel use any file-based information to determine the type of the root FS? It would obviously need to mount / before reading the configuration, so once it can read it, it doesn't need it any more. And you can most probably tell GRUB what root device it is to pass to the kernel on its boot command line too [I don't use GRUB, so I can't tell you how] - or specify two alternative boot targets in the configuration file. Concerning the 'df' output, 'df' takes its information from /etc/mtab, so if you put the line /dev/ttyS0 / ext3 rw 0 0 in there, it may appear as though your first serial port were mounted on / :-). Nothing really seems to need to know where / physically resides, or if they do (LILO ...), they have better means of finding out [though I've never tried running 'lilo' with /boot as a part of / and the above entry in /etc/mtab :-]. This seems to result in not much effort being put into writing the correct root device name into /etc/mtab on boot (see the 'rootfs' output of 'df' on your 'rescue disk' - that simply means 'well, whatever it may be'). It IS sometimes confusing when you want to be 100% sure which disk you are operating on. It might help to go by the size reported by 'df', which should be accurate in any case. > Anyway, I am off to try converting again now that I know to try passing > "init=reiserfs" in grub (will it work though?... Off to see!) What would that do? Run 'reiserfs' [relative to the CWD, probably /] instead of /sbin/init after mounting the root FS? ;-) A remark on your original question: > Am I on the right track? I don't think you'll be able to resize a software raid array and extend the PV. Can you create your array in degraded mode instead (with three data disks and the fourth one marked 'failed')? Then you'd have your spare disk for installation which you could later 'raidhotadd' to the array to get your parity information rebuilt. I don't think you're too worried about interruption of service during the installation ;-). I doubt a standard installation frontend supports this though, so you might need a bit of tweaking to get that to work. Hope that helps in some way. Holger [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem 2003-12-21 15:47 ` [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem wopp @ 2003-12-21 21:10 ` Madison Kelly 0 siblings, 0 replies; 12+ messages in thread From: Madison Kelly @ 2003-12-21 21:10 UTC (permalink / raw) To: linux-lvm Thank you for such a lengthy responce, Holger. While I backup '/' to '/etc/sdd1' I have '/dev/sdd1' formatted as 'ext3'. I will try making custom kernel in the morning to be sure that ReiserFS is natively supported. I guess the biggest question in that last post I had was how can I force the OS to use the '/etc/sdd1' as the root partition instead of '/dev/vg0/root'? It isn't directly an LVM question though so I may have stepped out of bounds asking that one here... The joys of being new. As for extending the RAID array, I feared that what you said may be true. I am trying to build a storage platform that can (after going live) survive a disk failure and have space added without taking the partition off-line. I've read about the raid tools and I hoped that once I extended the RAID5 array (assuming I can do so, one disk at a time) I then wanted to pass the new space along to LVM... Am I attempting the impossible? :p Thank you again, everyone here is so helpful! Madison wopp@parplies.de wrote: > Hi, > > at some point in this thread, Madison Kelly wrote: > >>I am still getting a kernel panic now but it no longer >>seems to have anything to do with LVM, simply it is -still- looking for >>an ext3 partition and obviously failing to find it. > > > sorry to say so, but it never did have anything to do with LVM. Unless I > completely misunderstood you, you first had / on LVM as ext3, and it worked. > When you try to boot with / on /dev/sdd1 as reiserfs, it doesn't work. > > It may sound obvious (and the thread has already come to this conclusion - > I'm just trying to make it more clear), but your kernel doesn't support > reiserfs, so you have to load reiserfs as a module from initrd - by whatever > means Redhat provides or by manually creating an appropriate initrd (if you > do that, use the one you have as a starting point). Or, of course, compile a > kernel with reiserfs support built in. > > You don't need to do any of this from the 'rescue disk' (especially not > compile a kernel ;-). You can just as well boot into your normal setup (with > / as ext3). If I'm not totally mistaken, the FS type of / is not specified > anywhere but rather autodetected by the kernel on boot. Between booting into > your ext3 system on /dev/vg0/root and your reiserfs copy on /dev/sdd1, you > don't have to change any files. Come to think of it, how would the kernel > use any file-based information to determine the type of the root FS? It would > obviously need to mount / before reading the configuration, so once it can > read it, it doesn't need it any more. > And you can most probably tell GRUB what root device it is to pass to the > kernel on its boot command line too [I don't use GRUB, so I can't tell you > how] - or specify two alternative boot targets in the configuration file. > > Concerning the 'df' output, 'df' takes its information from /etc/mtab, so if > you put the line > > /dev/ttyS0 / ext3 rw 0 0 > > in there, it may appear as though your first serial port were mounted on > / :-). Nothing really seems to need to know where / physically resides, or > if they do (LILO ...), they have better means of finding out [though I've > never tried running 'lilo' with /boot as a part of / and the above entry in > /etc/mtab :-]. This seems to result in not much effort being put into > writing the correct root device name into /etc/mtab on boot (see the > 'rootfs' output of 'df' on your 'rescue disk' - that simply means 'well, > whatever it may be'). > > It IS sometimes confusing when you want to be 100% sure which disk you are > operating on. It might help to go by the size reported by 'df', which should > be accurate in any case. > > >>Anyway, I am off to try converting again now that I know to try passing >>"init=reiserfs" in grub (will it work though?... Off to see!) > > > What would that do? Run 'reiserfs' [relative to the CWD, probably /] instead > of /sbin/init after mounting the root FS? ;-) > > > A remark on your original question: > >>Am I on the right track? > > > I don't think you'll be able to resize a software raid array and extend the > PV. Can you create your array in degraded mode instead (with three data disks > and the fourth one marked 'failed')? Then you'd have your spare disk for > installation which you could later 'raidhotadd' to the array to get your > parity information rebuilt. I don't think you're too worried about > interruption of service during the installation ;-). > I doubt a standard installation frontend supports this though, so you might > need a bit of tweaking to get that to work. > > Hope that helps in some way. > > Holger ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-12-21 21:10 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-12-18 23:15 [linux-lvm] Ext3 -> ReiserFS on '/' convertion prob Madison Kelly 2003-12-19 9:07 ` Jord Tanner 2003-12-19 10:54 ` Madison Kelly 2003-12-19 11:19 ` Madison Kelly 2003-12-19 12:20 ` Jord Tanner 2003-12-19 13:55 ` Madison Kelly 2003-12-19 14:46 ` Chris Cox 2003-12-19 14:54 ` Madison Kelly 2003-12-19 15:22 ` Chris Cox 2003-12-19 16:31 ` Madison Kelly 2003-12-21 15:47 ` [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem wopp 2003-12-21 21:10 ` Madison Kelly
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.