Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-28 Thread ccox
 On Mon, 27.07.15 16:35, c...@endlessnow.com (c...@endlessnow.com) wrote:

  On Mon, 27.07.15 01:18, Christopher Cox (c...@endlessnow.com) wrote:
 
  I suspect that somebody here knows why, but all mounts now fail...
 well
  all but /.
 
  Has anyone run across this before?  What did I miss?
 
  I accidentally messed up my boot mbr. and I did a rescue cd and
 chroot
  in
  order to rerun grub2-mkconfig and do a grub2-install.
 
  Now the system boots to a grub menu and tries to boot, root fileystem
  mounts
  but all other mounts fail so goes into emergency mode.  From that
  shell I
  cannot seem to mount anything, they all fail saying that whatever I'm
  trying
  to mount is already mounted or it's in use.  I can't fsck umounted
  filesystems either.  They all say in use.
 
  Maybe your changed the order of your partitions or changed their
  partition UUID? If so, then /etc/fstab will reference incorrect
  partitions now. Make sure bring /etc/fstab into sync with your actual
  partitions.

 A root is getting mounted and I figure it's the same but will double
 check (away from system right now).  Would some kind of root getting
 mounted at startup and being different from root in /etc/fstab make some
 sort of difference?

 Nope, mounted is mounted. systemd doesn't really care where something
 is mounted from, it only cares whether it is mounted at all. And the
 mount source it will only use if it needs to mount something because
 nobody else has mounted it yet.

 Would that cause manual mounts of old style nonportable dev
 shortnames (e.g. mount /dev/sda7 /mnt) to fail with the error of
 busy when done at the command line? (from emergency shell).

 Well if you use references such as /dev/sda7 then you are of course
 very vulnerable to partition renumbering if you redoo your partition
 table. Use /dev/disks/by-uuid/ and you should be safe regarding that.

 Lennart

Thanks Lennart.  It did turn out that the upgrades to this host over the
years...  that the switch from ata names to scsi names happened (not
sure why it worked before though).  Once I changed the names from
ata-blah to scsi-blah in /etc/fstab, all came back to normal.  So
thanks for the tip.

But why would having a failed mount due to a bad name in /etc/fstab cause
nothing to be mountable?  Not even foreign objects could be mounted...
(that is things the system hadn't seen before).

It was an adventure to be sure...   Very cryptic.  Not like
troubleshooting from a couple of years ago.





___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread Lennart Poettering
On Mon, 27.07.15 01:18, Christopher Cox (c...@endlessnow.com) wrote:

 I suspect that somebody here knows why, but all mounts now fail... well all 
 but /.
 
 Has anyone run across this before?  What did I miss?
 
 I accidentally messed up my boot mbr. and I did a rescue cd and chroot in
 order to rerun grub2-mkconfig and do a grub2-install.
 
 Now the system boots to a grub menu and tries to boot, root fileystem mounts
 but all other mounts fail so goes into emergency mode.  From that shell I
 cannot seem to mount anything, they all fail saying that whatever I'm trying
 to mount is already mounted or it's in use.  I can't fsck umounted
 filesystems either.  They all say in use.

Maybe your changed the order of your partitions or changed their
partition UUID? If so, then /etc/fstab will reference incorrect
partitions now. Make sure bring /etc/fstab into sync with your actual
partitions.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread ccox
 On Mon, 27.07.15 01:18, Christopher Cox (c...@endlessnow.com) wrote:

 I suspect that somebody here knows why, but all mounts now fail... well
 all but /.

 Has anyone run across this before?  What did I miss?

 I accidentally messed up my boot mbr. and I did a rescue cd and chroot
 in
 order to rerun grub2-mkconfig and do a grub2-install.

 Now the system boots to a grub menu and tries to boot, root fileystem
 mounts
 but all other mounts fail so goes into emergency mode.  From that
 shell I
 cannot seem to mount anything, they all fail saying that whatever I'm
 trying
 to mount is already mounted or it's in use.  I can't fsck umounted
 filesystems either.  They all say in use.

 Maybe your changed the order of your partitions or changed their
 partition UUID? If so, then /etc/fstab will reference incorrect
 partitions now. Make sure bring /etc/fstab into sync with your actual
 partitions.

A root is getting mounted and I figure it's the same but will double
check (away from system right now).  Would some kind of root getting
mounted at startup and being different from root in /etc/fstab make some
sort of difference?  Would that cause manual mounts of old style
nonportable dev shortnames (e.g. mount /dev/sda7 /mnt) to fail with the
error of busy when done at the command line? (from emergency shell).

I may just back the data off and do a reinstall.  So if anyone can chime
in with other things to try, please do it now before I have to blow it all
away.


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread Felix Miata
c...@endlessnow.com composed on 2015-07-27 16:35 (UTC-0500):

 A root is getting mounted and I figure it's the same but will double
 check (away from system right now).  Would some kind of root getting
 mounted at startup and being different from root in /etc/fstab make some
 sort of difference?  Would that cause manual mounts of old style
 nonportable dev shortnames (e.g. mount /dev/sda7 /mnt) to fail with the
 error of busy when done at the command line? (from emergency shell).

 I may just back the data off and do a reinstall.  So if anyone can chime
 in with other things to try, please do it now before I have to blow it all
 away.

As for things to try I would reduce fstab to one line for /, then try booting
normally. I've seen dracut at various times hard code swap or other partition
UUIDs that become out of sync with what's on the HD following updates or
restoring from backup, e.g.:
http://bugzilla.opensuse.org/show_bug.cgi?id=936964  cf.
http://lists.opensuse.org/opensuse/2015-07/msg00080.html
https://bugzilla.redhat.com/show_bug.cgi?id=1187007
-- 
The wise are known for their understanding, and pleasant
words are persuasive. Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread Lennart Poettering
On Mon, 27.07.15 16:35, c...@endlessnow.com (c...@endlessnow.com) wrote:

  On Mon, 27.07.15 01:18, Christopher Cox (c...@endlessnow.com) wrote:
 
  I suspect that somebody here knows why, but all mounts now fail... well
  all but /.
 
  Has anyone run across this before?  What did I miss?
 
  I accidentally messed up my boot mbr. and I did a rescue cd and chroot
  in
  order to rerun grub2-mkconfig and do a grub2-install.
 
  Now the system boots to a grub menu and tries to boot, root fileystem
  mounts
  but all other mounts fail so goes into emergency mode.  From that
  shell I
  cannot seem to mount anything, they all fail saying that whatever I'm
  trying
  to mount is already mounted or it's in use.  I can't fsck umounted
  filesystems either.  They all say in use.
 
  Maybe your changed the order of your partitions or changed their
  partition UUID? If so, then /etc/fstab will reference incorrect
  partitions now. Make sure bring /etc/fstab into sync with your actual
  partitions.
 
 A root is getting mounted and I figure it's the same but will double
 check (away from system right now).  Would some kind of root getting
 mounted at startup and being different from root in /etc/fstab make some
 sort of difference?  

Nope, mounted is mounted. systemd doesn't really care where something
is mounted from, it only cares whether it is mounted at all. And the
mount source it will only use if it needs to mount something because
nobody else has mounted it yet.

 Would that cause manual mounts of old style nonportable dev
 shortnames (e.g. mount /dev/sda7 /mnt) to fail with the error of
 busy when done at the command line? (from emergency shell).

Well if you use references such as /dev/sda7 then you are of course
very vulnerable to partition renumbering if you redoo your partition
table. Use /dev/disks/by-uuid/ and you should be safe regarding that.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread Christopher Cox

I suspect that somebody here knows why, but all mounts now fail... well all but 
/.

Has anyone run across this before?  What did I miss?

I accidentally messed up my boot mbr. and I did a rescue cd and chroot in order 
to rerun grub2-mkconfig and do a grub2-install.


Now the system boots to a grub menu and tries to boot, root fileystem mounts but 
all other mounts fail so goes into emergency mode.  From that shell I cannot 
seem to mount anything, they all fail saying that whatever I'm trying to mount 
is already mounted or it's in use.  I can't fsck umounted filesystems either. 
 They all say in use.


Any hints?  I'm running openSUSE 13.2 if that matters.



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Cannot mount anything after recovering and redoing boot mbr

2015-07-27 Thread Richard Maw
On Mon, Jul 27, 2015 at 01:18:55AM -0500, Christopher Cox wrote:
 I suspect that somebody here knows why, but all mounts now fail... well all 
 but /.
 
 Has anyone run across this before?  What did I miss?

I have seen this happen when I was using a kernel that was old and
didn't have CONFIG_FHANDLE turned on (there now exists a work-around
using /proc/self/fdinfo if your kernel is new enough), which may be worth
checking, but given your later comments about manually mounting failing,
this seems less likely to be the problem.

 I accidentally messed up my boot mbr. and I did a rescue cd and
 chroot in order to rerun grub2-mkconfig and do a grub2-install.
 
 Now the system boots to a grub menu and tries to boot, root
 fileystem mounts but all other mounts fail so goes into emergency
 mode.  From that shell I cannot seem to mount anything, they all
 fail saying that whatever I'm trying to mount is already mounted or
 it's in use.  I can't fsck umounted filesystems either.  They all
 say in use.

This sounds like a udev malfunction to me, but I'm not familiar enough with how
it works to do any more than guess.

My best guess is that there's some locking going wrong, since
udevd will flock(…, LOCK_SH|LOCK_NB) device nodes, and fsck will
flock(…, LOCK_EX|LOCK_NB), so udev doesn't try to use a device while
it is being fsck'd.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel