Opened 16 years ago
Closed 15 years ago
#288 closed defect (fixed)
mindi --makemountlist fails on /etc/fstab with multiple (identical device) entries
Reported by: | bwiberg | Owned by: | Bruno Cornec |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.9 |
Component: | mindi | Version: | 2.2.7 |
Severity: | normal | Keywords: | |
Cc: |
Description
Multiple entries in /etc/fstab, where the device name (e.g. server/share) is identical, although the mount points for the two mounts differ, yield an error when calculating the partition size in SizeOfPartition() of mindi.
Multiple entries may occur e.g. for CIFS if mounting the same share as different users on different mount points.
Attaching suggested patch which assumes that all mounts of a device share a common amount of free space (however, is this true in the case of quotas on shares?).
sprinkle:~# /usr/sbin/mondoarchive -O -9 -d "/mnt/backup/bwiberg/bwiberg/mondorescue" -E "/home /mnt /mnt/backup/bwiberg/bwiberg/mondorescue" -F -i -N -p "sprinkle" -s 4700m -S "/tmp" -T "/tmp" -V Initializing... See /var/log/mondoarchive.log for details of backup run. Checking sanity of your Linux distribution mindi --makemountlist //mondo.tmp.8b5Lv8/mountlist.txt.test failed for some reas Please run that command by hand and examine /var/log/mindi.log for more information. Perhaps your /etc/fstab file is insane. Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see. Failed. Fatal error... Pre-param initialization phase failed. Please review the error messages above, make the specified changes, then try again. Exiting... ---FATALERROR--- Pre-param initialization phase failed. Please review the error messages above, make the specified changes, then try again. Exiting... If you require technical support, please contact the mailing list. See http://www.mondorescue.org for details. The list's members can help you, if you attach that file to your e-mail. Log file: /var/log/mondoarchive.log FYI, I have gzipped the log and saved it to /var/cache/mondo/MA.log.gz. Mondo has aborted. Execution run ended; result=254 Type 'less /var/log/mondoarchive.log' to see the output log
So, running mindi manually:
sprinkle:~# mindi --makemountlist /tmp/a.txt Your mountlist will look like this: Analyzing LVM... DEVICE MOUNTPOINT FORMAT SIZE (MB) LABEL/UUID /dev/sda1 / ext3 15390 //192.168.1.2/bwib /home/bwib cifs 472785 //192.168.1.2/bwiberg /home/bwiberg cifs 472785 /usr/sbin/mindi: line 1199: 484131936 484131936/1024: syntaxfel i uttryck (error token is "484131936/1024")
(Translation: "syntax error in expression")
Mindi Linux mini-distro generator v2.0.4-r2045 Latest Mindi is available from http://www.mondorescue.org BusyBox sources are available from http://www.busybox.net ------------------------------------------------------------------------------ Mindi-BusyBox v1.7.3-r2045 (2008-10-13 00:08:43 CEST) multi-call binary Do you want to use your own kernel to build the boot disk ([y]/n) ?^CFATAL ERROR. Program is terminating in response to signal received from OS/user Please e-mail a copy of /var/log/mindi.log to the mailing list. See http://www.mondorescue.org for more information. WE CANNOT HELP unless you enclose that file. sprinkle:~# cat /tmp/a.txt /dev/sda1 / ext3 15759733 //192.168.1.2/bwib /home/bwib cifs 484131936 //192.168.1.2/bwiberg /home/bwiberg cifs 484131936
(Note how only the two first CIFS entries appear above!)
sprinkle:~# apt-show-versions | grep mondo ^[[Amondo/unknown uptodate 2.2.7 sprinkle:~# apt-show-versions | grep mindi mindi/unknown uptodate 2.0.4 mindi-busybox/unknown uptodate 1.7.3-1 # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/sda1 / ext3 errors=remount-ro 0 1 //192.168.1.2/bwib /home/bwib cifs iocharset=utf8,nobrl,uid=bwib,gid=bwib,file_mode=0660,dir_mode=0770,username=bwib,password=SECRET 0 0 //192.168.1.2/bwiberg /home/bwiberg cifs iocharset=utf8,nobrl,uid=bwiberg,gid=bwiberg,file_mode=0660,dir_mode=0770,username=bwiberg,password=SECRET 0 0 //192.168.1.2/backup /mnt/backup/bwib cifs iocharset=utf8,nobrl,uid=bwib,gid=bwib,file_mode=0600,dir_mode=0700,username=bwib,password=SECRET 0 0 //192.168.1.2/backup /mnt/backup/bwiberg cifs iocharset=utf8,nobrl,uid=bwiberg,gid=bwiberg,file_mode=0600,dir_mode=0700,username=bwiberg,password=SECRET 0 0 //192.168.1.2/media /mnt/media cifs iocharset=utf8,nobrl,uid=bwiberg,gid=bwiberg,file_mode=0664,dir_mode=0775,username=bwiberg,password=SECRET 0 0 sprinkle:~# df -k Filsystem 1K-block Använt Tillgängl Anv% Monterat på /dev/sda1 15512328 1454092 13270252 10% / tmpfs 513760 0 513760 0% /lib/init/rw udev 10240 72 10168 1% /dev tmpfs 513760 0 513760 0% /dev/shm //192.168.1.2/bwib 484131936 239106592 245025344 50% /home/bwib //192.168.1.2/bwiberg 484131936 239106592 245025344 50% /home/bwiberg //192.168.1.2/backup 484131936 239106592 245025344 50% /mnt/backup/bwib //192.168.1.2/media 484131936 239106592 245025344 50% /mnt/media //192.168.1.2/backup 484131936 239106592 245025344 50% /mnt/backup/bwiberg sprinkle:~#
Attachments (9)
Change History (31)
by , 16 years ago
Attachment: | mindi.diff added |
---|
comment:1 by , 16 years ago
Version: | 2.2.6 |
---|
Suggested patch is not sufficient; generated mount list will repeat first entry (duplicate mount points). Need a better way to distinguish the fstab lines...
Replying to bwiberg:
Attaching suggested patch which assumes that all mounts of a device share a common amount of free space (however, is this true in the case of quotas on shares?).
by , 16 years ago
Attachment: | mountlist_after_patch.txt added |
---|
Generated mount list after applying the patch; duplicate mount points...
comment:2 by , 16 years ago
Status: | new → assigned |
---|
comment:3 by , 15 years ago
Milestone: | → 2.2.10 |
---|---|
Version: | → 2.2.7 |
comment:4 by , 15 years ago
Milestone: | 2.2.10 → 2.2.9 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
It seems fixed for me on a similar configuration as yours with latest mindi 2.0.7. Let me know for which distribution you'd like packages so that you could test it.
comment:5 by , 15 years ago
I'm using Debian 5.0 (repositories deb ftp://ftp.mondorescue.org/debian 5.0 contrib, deb-src ftp://ftp.mondorescue.org/debian 5.0 contrib) so Debian 5.0 .deb packages would be great. Thanks in advance!
(Currently I'm using mondo 2.2.9, mindi 2.0.7 and mindi-busybox 1.7.3-1. By the way, mondo-doc does not appear to be available at all from the repository?)
comment:6 by , 15 years ago
Could you try with the packages available at ftp://ftp.mondorescue.org/test/debian/5.0/mondo_2.2.9_i386.deb and ftp://ftp.mondorescue.org/test/debian/5.0/mindi_2.0.7_i386.deb and let me know ?
comment:7 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I installed the two .debs as asked (same version numbers but newer packages?), adjusted /etc/fstab to include the two "similar" mounts, and ran mondoarchive, but it sill bombs, and mindi shows:
sprinkle:~# mindi --makemountlist /tmp/a.txt Your mountlist will look like this: Analyzing LVM...
DEVICE MOUNTPOINT FORMAT SIZE (MB) LABEL/UUID /dev/sda1 / ext3 15390 192.168.1.2/bwib /home/bwib cifs 472785 192.168.1.2/bwiberg /home/bwiberg cifs 472785
/usr/sbin/mindi: line 1239: 484131936 484131936/1024: syntaxfel i uttryck (error token is "484131936/1024") Mindi Linux mini-distro generator v2.0.7-r2433M Latest Mindi is available from http://www.mondorescue.org BusyBox sources are available from http://www.busybox.net
Mindi-BusyBox v1.7.3-r2045 (2008-10-13 00:08:43 CEST) multi-call binary Do you want to use your own kernel to build the boot disk ([y]/n) ?
(break)
The /tmp/a.txt file shows:
/dev/sda1 / ext3 15759733 192.168.1.2/bwib /home/bwib cifs 484131936 192.168.1.2/bwiberg /home/bwiberg cifs 484131936
comment:9 by , 15 years ago
Using your fstab (that's the only one I can simulate) and with my latest mindi version, I get:
sudo mindi --makemountlist /tmp/2 Your mountlist will look like this: Analyzing LVM... DEVICE MOUNTPOINT FORMAT SIZE (MB) LABEL/UUID /dev/sda1 / ext3 0 //192.168.1.2/bwib /home/bwib cifs 0 //192.168.1.2/bwiberg /home/bwiberg cifs 0 //192.168.1.2/backup /mnt/backup/bwib cifs cifs 0 //192.168.1.2/backup /mnt/backup/bwib cifs cifs 0 //192.168.1.2/media /mnt/media cifs 0 WARNING: Duplicate device entry in mountlist WARNING: Duplicate mountpoint entry in mountlist
So could you retry again with the new one I just made, and if it still fails, could you edit the /usr/sbin/mindi script and add set -x at the begining, and attach again the resulting logs, which should be more detailed then.
TIA.
comment:10 by , 15 years ago
I have installed the new versions now, but it still fails.
I'll attach mindi.txt which is the result of:
mindi --makemountlist /tmp/2 2>&1 | tee ~/mindi.txt
...where mindi has "set -x" in it, and /var/log/mindi.log, as well as /etc/fstab. I have replaced the passwords but can assure you that they do not contain any umlaut or special characters.
I also tried unsetting and exporting (empty) LANG, LC_ALL and LC_CTYPE but that did not change anything.
by , 15 years ago
Attachment: | mindi.3.log added |
---|
comment:11 by , 15 years ago
Thanks for your help ! I think I've found where the issue was. I made the following change [2448] and regenerated 2 new packages (same place, same name)
follow-up: 13 comment:12 by , 15 years ago
I ran:
mindi --makemountlist /tmp/2
...which resulted in output:
Analyzing LVM...
DEVICE MOUNTPOINT FORMAT SIZE (MB) LABEL/UUID /dev/sda1 / ext3 15390 192.168.1.2/bwib /home/bwib cifs 472785 192.168.1.2/bwiberg /home/bwiberg cifs 472785 192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/media /mnt/media cifs 472785
WARNING: Duplicate device entry in mountlist WARNING: Duplicate mountpoint entry in mountlist
...and generated the following mount list (/tmp/2):
/dev/sda1 / ext3 15759733 192.168.1.2/bwib /home/bwib cifs 484131936 192.168.1.2/bwiberg /home/bwiberg cifs 484131936 192.168.1.2/backup /mnt/backup/bwib cifs cifs 484131936
192.168.1.2/backup /mnt/backup/bwib cifs cifs 484131936
192.168.1.2/media /mnt/media cifs 484131936
Notice:
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
,..in the output, is that really correct?
Shouldn't it output:
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/backup /mnt/backup/bwiberg cifs cifs 472785
...instead?
Just wanted to alert you regarding this (in case it would create an incorrect fstab because of this).
comment:13 by , 15 years ago
Replying to bwiberg:
Notice:
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
,..in the output, is that really correct?
Shouldn't it output:
192.168.1.2/backup /mnt/backup/bwib cifs cifs 472785
192.168.1.2/backup /mnt/backup/bwiberg cifs cifs 472785
...instead?
Just wanted to alert you regarding this (in case it would create an incorrect fstab because of this).
Yes, you're right. It shouldn't give that output. In fact, CIFS mounts should not even be analyzed for the mountlist, as they are just mounted. So they are now excluded (as were NFS mounts) in rev [2452].
I'll provide packages later on, as I was already re-building for another beta round.
comment:14 by , 15 years ago
OK, thanks, please let me know as soon as the packages are ready and I'll be happy to try them!
comment:15 by , 15 years ago
New packages have been delivered (same place, same name for the moment) for you to test and report.
Thanks.
comment:16 by , 15 years ago
Hello Bruno!
Looks fine now:
sprinkle:~# mount /dev/sda1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) 192.168.1.2/bwib on /home/bwib type cifs (rw) 192.168.1.2/bwiberg on /home/bwiberg type cifs (rw) 192.168.1.2/backup on /mnt/backup/bwiberg type cifs (rw) 192.168.1.2/media on /mnt/media type cifs (rw) 192.168.1.2/backup on /mnt/backup/bwib type cifs (rw)
sprinkle:~# mindi --makemountlist /tmp/2 Your mountlist will look like this: Analyzing LVM...
DEVICE MOUNTPOINT FORMAT SIZE (MB) LABEL/UUID /dev/sda1 / ext3 15390
sprinkle:~#
sprinkle:~# cat /tmp/2 /dev/sda1 / ext3 15759733
Thanks a lot for your help!
comment:17 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:18 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hmm, I ran mondoarchive but now got:
Calling MINDI to create boot+data disks Fatal error... The de facto standard location for your boot loader's config file is /boot/grub/menu.lst /boot/grub/grub.cfg or but I cannot find it there. What is wrong with your Linux distribution? ---FATALERROR--- The de facto standard location for your boot loader's config file is /boot/grub/menu.lst /boot/grub/grub.cfg or but I cannot find it there. What is wrong with your Linux distribution? If you require technical support, please contact the mailing list. See http://www.mondorescue.org for details. The list's members can help you, if you attach that file to your e-mail. Log file: /var/log/mondoarchive.log Mondo has aborted. Execution run ended; result=254 Type 'less /var/log/mondoarchive.log' to see the output log
I'll attach the logs in a minute.
comment:19 by , 15 years ago
sprinkle:~# ls -la /boot/grub/ totalt 228 drwxr-xr-x 2 root root 4096 6 sep 04.49 . drwxr-xr-x 3 root root 4096 6 sep 04.51 .. -rw-r--r-- 1 root root 197 2 nov 2008 default -rw-r--r-- 1 root root 30 2 nov 2008 device.map -rw-r--r-- 1 root root 8704 2 nov 2008 e2fs_stage1_5 -rw-r--r-- 1 root root 8544 2 nov 2008 fat_stage1_5 -rw-r--r-- 1 root root 9568 2 nov 2008 jfs_stage1_5 -rw-r--r-- 1 root root 3915 6 sep 04.49 menu.lst -rw-r--r-- 1 root root 3915 6 sep 04.49 menu.lst~ -rw-r--r-- 1 root root 7904 2 nov 2008 minix_stage1_5 -rw-r--r-- 1 root root 10720 2 nov 2008 reiserfs_stage1_5 -rw-r--r-- 1 root root 512 2 nov 2008 stage1 -rw-r--r-- 1 root root 128616 2 nov 2008 stage2 -rw-r--r-- 1 root root 10280 2 nov 2008 xfs_stage1_5 sprinkle:~#
comment:20 by , 15 years ago
Yep , this one was fixed in between :-( Error on my side. New packages need to be done again. On their way to the repo. Expect them there in 15 minutes or so.
comment:22 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
diff -c mindi.dpkg-dist mindi