Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just upgraded to Fedora 7. I have two hard disks in my machine. Here's what I get from 'fdisk -l':
Disk /dev/sda: 27.3 GB, 27373731840 bytes
255 heads, 63 sectors/track, 3328 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3328 26627737+ 8e Linux LVM
Disk /dev/sdb: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 9039 72501345 8e Linux LVM
My previous OS is installed on the larger disk so when I went to upgrade, I just unplugged it and installed Fedora 7 on the smaller disk.
After installation, I plugged the disk back in and rebooted but now when I try to mount the disk with 'mount /dev/sdb2 /mnt', I get a 'mount: /dev/sdb2 already mounted or /mnt busy' error. It's not mounted or busy as far as I can tell.
I noticed others had problems with dm-mod/dm-mirror interferring so I tried uncommenting those lines from modules.dep but that didn't work. Also looked for locks in 'lsof' but nothing.
If you've got two Fedora systems installed, they probably have the same named VGs and LVs. Especially if the installer couldn't see the other disk - presumably would use the default names.
I think I have some idea of what happened at least. At some point, LVM2 could not see the larger disk so it just overwrote the previous logical volume. I get the following from 'lvscan':
WARNING: Duplicate VG name VolGroup00: Existing 8u2SkJ-28V0-iXPD-BSt3-o6KD-y6dx-rjLCVw (created here) takes precedence over 2NwURw-UN8n-bk21-sJqw-W8HZ-6w3A-HOXGFY
Why would you unplug the disk? Your drive assignments for one of the disk will be wrong in menu.lst and /etc/fstab. You will need to correct your /boot/grub/menu.lst and fstab files correcting the drive assignments. You might as well combine the entries from the other installs menu.lst so that both are on the same menu. Just use grub one of the first disks so that you don't get into a dueling MBR situation. Only update grub for one distro.
If there is a conflict between what grub sees as (hd0,0) when booting and what it sees as (hd0,0) after Linux is running, then edit the /boot/grub/device.map file to fix it.
Code:
(hd1) /dev/sda
(hd0) /dev/hda
It is simply a text file. The problem is if the root partition is (hd0) but when you boot the system is saying that hd0 is /dev/sda. Then it would try to boot from the wrong disk.
Another possibility is if there is drive information in an LVM or raid superblock and the kernel procedes to assemble the array. Then later, your /etc/fstab information is wrong and it tries to mount /dev/hdb2 instead of /dev/hda2.
You will need to correct your /boot/grub/menu.lst and fstab files correcting the drive assignments.
Here's my /boot/grub/menu.lst file:
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3228.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
Quote:
Originally Posted by jschiwal
You might as well combine the entries from the other installs menu.lst so that both are on the same menu. Just use grub one of the first disks so that you don't get into a dueling MBR situation. Only update grub for one distro.
If there is a conflict between what grub sees as (hd0,0) when booting and what it sees as (hd0,0) after Linux is running, then edit the /boot/grub/device.map file to fix it.
Code:
(hd1) /dev/sda
(hd0) /dev/hda
It is simply a text file. The problem is if the root partition is (hd0) but when you boot the system is saying that hd0 is /dev/sda. Then it would try to boot from the wrong disk.
Another possibility is if there is drive information in an LVM or raid superblock and the kernel procedes to assemble the array. Then later, your /etc/fstab information is wrong and it tries to mount /dev/hdb2 instead of /dev/hda2.
I think that is the case. I can still mount the other logical volumes on the larger disk just not the root partition.
Personally I would leave them as separate systems, and change the boot disk via the BIOS. Then use a (new) shared partition to copy/move share data to. If you really need to get at the data, you'll probably have to rename LVs (at least) - maybe even the VGs as well.
Ugh.
Then, of course, there'll be issues with the systems that owned that data originally.
Double ugh.
There's a lvm guide at tldp.org - start reading there.
Caveat: I don't use LVM (this sort of thing is one of the reasons why), so this is just me theorizing.
If you've got two Fedora systems installed, they probably have the same named VGs and LVs. Especially if the installer couldn't see the other disk - presumably would use the default names.
I see that:
Code:
# vgdisplay
WARNING: Duplicate VG name VolGroup00: Existing 8u2SkJ-28V0-iXPD-BSt3-o6KD-y6dx-rjLCVw (created here) takes precedence over 2NwURw-UN8n-bk21-sJqw-W8HZ-6w3A-HOXGFY
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 23
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 69.12 GB
PE Size 32.00 MB
Total PE 2212
Alloc PE / Size 2211 / 69.09 GB
Free PE / Size 1 / 32.00 MB
VG UUID 2NwURw-UN8n-bk21-sJqw-W8HZ-6w3A-HOXGFY
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 25.38 GB
PE Size 32.00 MB
Total PE 812
Alloc PE / Size 811 / 25.34 GB
Free PE / Size 1 / 32.00 MB
VG UUID 8u2SkJ-28V0-iXPD-BSt3-o6KD-y6dx-rjLCVw
Is this menu.lst from the FC7 you installed on the second disk?
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3228.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
The root disk indicated is (hd0,0) which I think is /dev/sda1 instead of /dev/sdb1 which is the one you installed FC7 on. However check the device.map file to make sure that (hd0,0) is /dev/sda1. When you installed it with the first disk out, (hd1,0) became (hd0,0). Now with it in again, it is (hd1,0) again.
The root disk indicated is (hd0,0) which I think is /dev/sda1 instead of /dev/sdb1 which is the one you installed FC7 on. However check the device.map file to make sure that (hd0,0) is /dev/sda1. When you installed it with the first disk out, (hd1,0) became (hd0,0). Now with it in again, it is (hd1,0) again.
Not sure what that has to do with my problem. I just need to be able to mount the root volume on the disk. The problem is that both root volumes have the same name and, currently, LVM2 is not capable of resolving the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.