View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 24 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Jan 11, 2006 11:04 pm 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
I'm looking for some troubleshooting advice on a LVM problem.

I followed the LVM HowTo instructions (thanks to those that contributed) from the Wiki (http://knoppmythwiki.org/index.php?page=LvmHowTo), and everything worked great until step 11, the reboot. (I used sda1 everywhere it said hdb1)

/dev/vg/myth is not getting mounted at startup. If I manually execute
Code:
vgscan
vgchange -ay
mount /dev/vg/myth

then everything works fine.

I'm on R5A26 and at install time I only had 1 IDE drive. I then added a SATA drive and followed the instructions for setting up LVM with a second drive. I'm wondering since I didn't have any SATA at install time am I missing something?

I've checked /etc/init.d and the LVM script is there (as well as in rcS.d and rc1.d). I can't find any mention of vgscan in th syslogs, but I do get a line saying the device-mapper initialized.

Sorry for the long post, I'm just looking for some advice on where to look for any error messages or other info.

Thanks,
Tom


Last edited by thowell on Sat Feb 25, 2006 9:21 am, edited 2 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 11:38 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
A search for "lvm" should turn up lots of info. Fore example, just last week I helped someone who didn't have the right entry in /etc/fstab and had botched the init setup...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 7:33 am 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
Thanks for the reply. I've searched on LVM and vgscan and init.d and found some good information, but so far I can't find anything that looks wrong (to me) in my system's configuration. And I can't find anything that is getting errors on startup.
Here is my /etc/fstab:
Code:
# /etc/fstab: filesystem table.
#
# filesystem  mountpoint  type  options  dump  pass
/dev/hda1  /  ext3 defaults,errors=remount-ro  0  1
/dev/hda3  /cache  auto  defaults,auto  0  2
#/dev/hda4  /myth  ext3  defaults,auto  0  2
/dev/vg/myth  /myth  auto  defaults,auto  0  2

proc  /proc  proc  defaults  0  0
sysfs /sys   sysfs defaults  0  0
/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
/dev/cdrom /cdrom  iso9660  defaults,ro,user,noexec,noauto  0  0
/dev/cdromhdc /cdromhdc  iso9660  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/hda2 none swap defaults 0 0

One thing that doesn't look right to me is this section of my syslog on startup:
Code:
Jan 10 19:11:17 mythtv kernel: ata1: SATA max UDMA/133 cmd 0x9F0 ctl 0xBF2 bmdma
 0xE000 irq 11
Jan 10 19:11:17 mythtv kernel: ata2: SATA max UDMA/133 cmd 0x970 ctl 0xB72 bmdma
 0xE008 irq 11
Jan 10 19:11:18 mythtv kernel: ata1: dev 0 cfg 49:2f00 82:346b 83:7f01 84:4003 8
5:3469 86:3e01 87:4003 88:203f
Jan 10 19:11:18 mythtv kernel: ata1: dev 0 ATA, max UDMA/100, 586072368 sectors:
 lba48
Jan 10 19:11:18 mythtv kernel: ata1: dev 0 configured for UDMA/100
Jan 10 19:11:18 mythtv kernel: scsi0 : sata_nv
Jan 10 19:11:18 mythtv kernel: ata2: no device found (phy stat 00000000)
Jan 10 19:11:18 mythtv kernel: scsi1 : sata_nv
Jan 10 19:11:18 mythtv kernel:   Vendor: ATA       Model: WDC WD3000JD-19K  Rev:
 08.0
Jan 10 19:11:18 mythtv kernel:   Type:   Direct-Access                      ANSI
 SCSI revision: 05
Jan 10 19:11:18 mythtv kernel: SCSI device sda: 586072368 512-byte hdwr sectors
(300069 MB)
Jan 10 19:11:18 mythtv kernel: SCSI device sda: drive cache: write back
Jan 10 19:11:18 mythtv kernel: SCSI device sda: 586072368 512-byte hdwr sectors
(300069 MB)
Jan 10 19:11:18 mythtv kernel: SCSI device sda: drive cache: write back
Jan 10 19:11:18 mythtv kernel:  sda: sda1
Jan 10 19:11:18 mythtv kernel: Attached scsi disk sda at scsi0, channel 0, id 0,
 lun 0
Jan 10 19:11:18 mythtv pci.agent[3752]:      sata_nv: loaded successfully
Jan 10 19:11:18 mythtv pci.agent[3834]:      sata_nv: already loaded
Jan 10 19:11:19 mythtv scsi.agent[3800]: disk at /devices/pci0000:00/0000:00:0e.
0/host0/target0:0:0/0:0:0:0

I don't even have a SCSI controller in my box. Is it incorrectly setting my SATA drive as a SCSI drive? If so, how do I get it to re-detect it as the right drive?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 13, 2006 5:49 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
SATA is treated as SCSI for a variety of reasons, so this look OK. Did you double check to make sure you're starting things in the right order? The LVM init script needs to be run before you try to mount the /myth file system. Also make sure that you haven't over restricted the VG scan in /etc/lvm/lvm.conf, your rule should look something like:
Code:
filter = [ "a|/dev/[hs]d[ab]|", "r|.*|" ]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 15, 2006 11:17 am 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
Thanks for the SATA vs. SCSI information. I thought that might be the case since everything works fine when I manually do vgscan, etc. I have played with the lvm.conf (after reading another post here), but it hasn't made any difference. I've tried a couple of different filters, right now I'm using:
Code:
 filter =[ "a|/dev/hda|", "a|/dev/sda|", "r|.*|" ]


I hate to bug you with this, but I'm not sure if I'm looking in the right place to determine if the LVM init script is being run before the system tries to mount /myth. My /etc/rcS.d looks like this:
Code:
ls /etc/rcS.d
README           S26lvm          S39dns-clean    S48console-screen.sh
S05keymap.sh     S30checkfs.sh   S40hostname.sh  S50hwclock.sh
S10checkroot.sh  S30procps.sh    S40ifupdown     S55bootmisc.sh
S15isapnp        S30setserial    S40networking   S55urandom
S19KnoppMyth-tv  S35devpts.sh    S41portmap      S99initrd-tools.sh
S20modutils      S35mountall.sh  S45mountnfs.sh

I'm assuming the S35mountall.sh is what should be mounting /myth, but I don't see any signs that S26lvm even ran. Are these links in the rcS.d directory enough to get LVM up and /myth mounted?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 15, 2006 11:33 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Crap. My previous writeup on this seems to have disappeared, probably because the original posting was off topic and got purged. Sigh...

What you need to do is manaully clean up the previous mess and rerun the command. See if this does the trick:
Code:
rm -f /etc/rc1.d/K82lvm /etc/rcS.d/S26lvm
update-rc.d lvm start 26 S . stop 82 1 .

If not we can go through the detailed process. OBTW - Do this too to make sure we don't have any strays:
Code:
find /etc -name '*lvm' -print


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 11:19 am 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
I removed the 2 links and then re-added them
Code:
root@mythtv:~# rm -f /etc/rc1.d/K82lvm /etc/rcS.d/S26lvm
root@mythtv:~# update-rc.d lvm start 26 S . stop 82 1 .
 Adding system startup for /etc/init.d/lvm ...
   /etc/rc1.d/K82lvm -> ../init.d/lvm
   /etc/rcS.d/S26lvm -> ../init.d/lvm

then rebooted, but no luck. It still takes a manual vgscan and vgchange before it will mount the LVM partition.

The only other file that I didn't recognize was in /etc/devfs/conf.d
Code:
root@mythtv:~# find /etc -name '*lvm'
/etc/devfs/conf.d/50lvm
/etc/init.d/lvm
/etc/lvm
/etc/rc1.d/K82lvm
/etc/rcS.d/S26lvm
/etc/webmin/lvm

I moved 50lvm off to a safe place and rebooted but with the same results. Here are the contents of that file if it helps:
Code:
root@mythtv:~# cat /etc/devfs/conf.d/50lvm
LOOKUP          ^lvm$                  IGNORE
LOOKUP          ^vg[0-9]+$             IGNORE
LOOKUP          ^vg[0-9]+/.[^/]*$      IGNORE
REGISTER        ^lvm$                  PERMISSIONS     root.root       0600
REGISTER        ^vg[0-9]+/.[^/]*$      PERMISSIONS     root.disk       0660
REGISTER        ^vg[0-9]+/group$       PERMISSIONS     root.root       0600


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 7:42 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
That all look pretty kosher, I see a couple entries in your /etc/rcS.d that i don't have (S15isapnp, S35devpts.sh) but otherwise the order looks fine. What does you /etc/init.d/lvm script look like, and what version of KnoppMyth are you running?
Code:
root@black2:~# ls -al /etc/init.d/lvm
-rwxr-xr-x  1 root root 2344 Apr 12  2004 /etc/init.d/lvm
root@black2:~# md5sum /etc/init.d/lvm
14bb5c3fb1a23f7d6bb1f1b717ebcfc5  /etc/init.d/lvm


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 1:03 pm 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
I'm running the A26 build and when I run the directory listing and MD5 checksum I get identical results to what you've posted (including permissions, owner, group, date, md5sum, etc.).

I don't see anything that looks like it should cause a problem in S15isapnp or S35devpts.sh but let me know if it would help to see them.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 2:55 pm 
Offline
Joined: Thu Jan 29, 2004 2:29 pm
Posts: 14
I know nudging an older thread is just asking for a beatdown, but I just tried to set up LVM with 30.2 and ran into this same problem. No automount - although I didn't know that was (or could be) the problem until I found this thread. I'm only adding a comment here because thowell didn't seem to have resolved it either. Hey, Thowell, if you did fix this, let us know how.

I have installed from scratch 3 times, upgraded ivtv from the wiki (which is flawless now - nice guide!), went through the LVM setup on the wiki (which is also refreshingly clear!), rebooted and /myth is empty and /dev/vg/myth can't be found. So, I started over and did the LVM how-to twice. Everything looks fine until the reboot. Yes, I have checked /etc/fstab. I edited it exactly as the how-to says (and thowell has in his post).

I will follow the suggestions in this post to see if they help, but at least with some hardware and configurations, LVM seems to not automount after reboot. I have a Chaintech nforce2 board, 2200+, and 3 IDE Seagate 160G drives.

And yes, I am reading up on the LVM page for diagnostics. I will post closure for this when I find it.

N


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 10:04 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
nrj wrote:
upgraded ivtv from the wiki (which is flawless now - nice guide!),

Thank you, glad it worked for you. I've actually been meaning to overhaul the firmware section to work with Cecil's upcoming scheme.
nrj wrote:
went through the LVM setup on the wiki (which is also refreshingly clear!), rebooted and /myth is empty and /dev/vg/myth can't be found. So, I started over and did the LVM how-to twice. Everything looks fine until the reboot. Yes, I have checked /etc/fstab. I edited it exactly as the how-to says (and thowell has in his post).

Have trawled through the logs after a boot for anything related/interesting? Look for "mount" and scan that vicinity...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 12:26 pm 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
Sorry nrj, I still haven't fixed this problem.

My next step is to figure out how to get more detail in some of the startup logs. I've greped everything I can think of (dmesg, syslog, messages, kern.log, daemon.log) for anything related to scan or vg or lvm and it doesn't appear to capture anything related to LVM at the current log level. When I boot I do see some LVM related messages scroll off the screen (something about no volume groups) but it goes too fast.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 12:47 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Thowell, it might be worth a shot to upgrade to A30.2 just on general principles. It's got slightly more lvm awareness. You'll still need to follow the "upgrading with lvm" procedure on the wiki but I've done that a dozen or more times now with no hassle.

As with any upgrade, make a current backup and check that your backup is good first!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 11:42 pm 
Offline
Joined: Mon Jan 09, 2006 12:39 pm
Posts: 14
Yes, I should have mentioned that. I did upgrade to A30.2 the other week (hoping it might solve this and a LIRC issue). I followed the "upgrading with LVM" instructions and everything worked great, but I still have the same problem after a reboot.

After the upgrade I also went and re-checked everything that is listed in this thread (init scrits, LVM filters, etc.) and it all still looks fine.

The only other thing I can see that doesn't look right is this line
Code:
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

comes way after the LVM problems (no volume groups) during startup. It's almost the last thing in the log when I run dmesg. Can I safely move whatever is loading this sooner in the boot process?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 12:07 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Or move lvm later... The big thing is to get the ordering right so you're not trying to mount it before all it's precursors are in place. Sounds like you need scsi/sata, then lvm, then mount... Hang on while I look at the boot order... Hmmm... Nothing obvious. Reboot (without bumping lvm) and do this:
Code:
lsmod | sort >/tmp/before
/etc/init.d/lvm restart
lsmod | sort >/tmp/after
diff /tmp/before /tmp/after
cat /tmp/after

I suspect we may need to tweak the lvm script to get it to force some sata/scsi module to load.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu