Ext3 -> ReiserFS on '/' convertion prob
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
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.
Quoted 56 lines · Madison Kelly
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
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 1 line
Jord Tanner <[email protected]>
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
Quoted 30 lines · Jord Tanner
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.Quoted 23 lines · Madison Kelly
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
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
Quoted 116 lines · Madison Kelly
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.old6120 3564 2206 62% //tmp/cdrom644864 644864 0 100%/mnt/source/dev/vg0/root17919448 1916960 16002488 11%/mnt/sysimage/dev/hda1101086 6767 89100 8%/mnt/sysimage/boot/dev/hda376304192 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/2002lvmcreate_initrd-- make LVM initial ram disk/boot/initrd-lvm-2.4.22-1.2115.nptl.gz
lvmcreate_initrd-- finding required shared librarieslvmcreate_initrd-- stripping shared librarieslvmcreate_initrd-- calculating initrd filesystem parameterslvmcreate_initrd-- calculating loopback file size
du: invalid option -- c
BusyBox v0.60.5 (2003.01.24-22:44+000) multi-call binaryUsage: du [-lsxhmk] [FILE]...
lvmcreate_initrd-- making loopback file (541 kB)lvmcreate_initrd-- making ram disk filesystem 9238 inodes)lvmcreate_initrd-- mounting ramdisk filesystemlvmcreate_initrd-- creating new/etc/modules.conflvmcreate_initrd-- creating new modules.dep
depmod: Can't open/lib/modules/2.4.22-1.2115.nptl/modules.depfor writinglvmcreate_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.old6120 3564 2206 62% //tmp/cdrom644864 644864 0 100%/mnt/source/dev/vg0/root17919448 1916960 16002488 11%/mnt/sysimage/dev/hda1101086 6767 89100 8%/mnt/sysimage/boot/dev/hda376304192 32828 72395284 1%/mnt/sysimage/single/dev/loop1506 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 libSo, have I done something stupidly wrong?? :)
Again, you help is -very- much appreciated!
Madison
Quoted 5 lines · Jord Tanner
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.Quoted 25 lines
Quoted 23 lines · Madison Kelly
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
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
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.
Quoted 145 lines · Madison Kelly
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.old6120 3564 2206 62% //tmp/cdrom644864 644864 0 100%/mnt/source/dev/vg0/root17919448 1916960 16002488 11%/mnt/sysimage/dev/hda1101086 6767 89100 8%/mnt/sysimage/boot/dev/hda376304192 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/2002lvmcreate_initrd-- make LVM initial ram disk/boot/initrd-lvm-2.4.22-1.2115.nptl.gz
lvmcreate_initrd-- finding required shared librarieslvmcreate_initrd-- stripping shared librarieslvmcreate_initrd-- calculating initrd filesystem parameterslvmcreate_initrd-- calculating loopback file size
du: invalid option -- c
BusyBox v0.60.5 (2003.01.24-22:44+000) multi-call binaryUsage: du [-lsxhmk] [FILE]...
lvmcreate_initrd-- making loopback file (541 kB)lvmcreate_initrd-- making ram disk filesystem 9238 inodes)lvmcreate_initrd-- mounting ramdisk filesystemlvmcreate_initrd-- creating new/etc/modules.conflvmcreate_initrd-- creating new modules.dep
depmod: Can't open/lib/modules/2.4.22-1.2115.nptl/modules.depfor writinglvmcreate_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.old6120 3564 2206 62% //tmp/cdrom644864 644864 0 100%/mnt/source/dev/vg0/root17919448 1916960 16002488 11%/mnt/sysimage/dev/hda1101086 6767 89100 8%/mnt/sysimage/boot/dev/hda376304192 32828 72395284 1%/mnt/sysimage/single/dev/loop1506 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 libSo, have I done something stupidly wrong?? :)
Again, you help is -very- much appreciated!
Madison
Quoted 5 lines · Jord Tanner
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.Quoted 51 lines
Quoted 49 lines · Madison Kelly
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
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 1 line
Jord Tanner <[email protected]>
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
Quoted 16 lines · Jord Tanner
Don't do any symlinking, instead try this:
sh-2.05b# mount -t proc proc
/mnt/sysimage/procsh-2.05b# chroot/mnt/sysimage/bin/bashsh-2.05b# source/etc/profile[root@hostname /]#lvmcreate_initrd[root@hostname /]# exit
sh-2.05b# umount/mnt/sysimage/procsh-2.05b# shutdown -r nowYou may have more success. I think the reason you were getting errors is that
lvmcreate_initrdassumes 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 runlvmcreate_initrd. As always YMMV.
Madison Kelly wrote:
...
Quoted 2 lines
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?
I am so sorry for asking but how would I check?
Madison
Quoted 8 lines · Chris Cox
Madison Kelly wrote:
...Quoted 2 lines
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?
Quoted 2 lines · Madison Kelly
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.
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
Quoted 15 lines · Chris Cox
Quoted 2 lines · Madison Kelly
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_mkinitrdscript 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 thelvm_modif 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.
Re: [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem
Hi,
Quoted 3 lines · Madison Kelly
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.
Quoted 2 lines
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:
Quoted 1 line
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
Re: [linux-lvm] Ext3 -> ReiserFS on '/' conversion problem
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
Quoted 77 lines · [email protected] wrote:
Hi,
Quoted 3 lines · Madison Kelly
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/sdd1as 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/rootand 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 0in 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/mtabon 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.
Quoted 2 lines
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/initafter mounting the root FS? ;-)A remark on your original question:
Quoted 1 line
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