opensuse 12.3 trying to mount /dev/mapper/system-root on /root

Hi…

I am currently playing aroung with some new set-ups, in particular I am interested in the current state of BtrFS (removing disks, breaking the filesystem and stuff like that). This is purely for fun, so I am aware of the problems that may come with using BtrFS.

That said:
I came a cross a problem using an encrypted system partion (LVM -> btrfs root + swap on it). When I boot I always get the following error message:

ENTER LV PASSWORD THEN…
2 logical volume(s) in volumn gropu system now active
2 logical volume(s) in volumn gropu system now active
2 logical volume(s) in volumn gropu system now active
Waiting for device in /dev/mapper/system-root to appear: ok
fsck from util-linux 2.21.2
[/sbin/fsck.btrfs (1) – /] fsck.btrfs -a /dev/mapper/system-root
fsck succeeded. Mounting root device read-write.
Mounting root /dev/mapper/system-root
mount -o rw,defaults -t btrfs /dev/mapper/system-root /root
mount: /root not mounted or bad option
In some cases useful info is found in syslog - try
dmesg | tail or so
22.549784] irg 16: nobody cared…

After this is I can login just fine, and do all the stupid things to the filesystem that I want to… no problems at all. I typed this error message from a second screen as it isn’t shown in any logs that I am aware off.

This is the complete contents of my /etc/fstab file### pseudo file systems
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

root filesystem

/dev/system/swap swap swap defaults 0 0
UUID=04cfb422-502e-4d3c-9faf-98a57b1fec51 / btrfs noatime 0 0
UUID=1eacd53a-8103-436a-85ae-edac9c095528 /boot ext4 noatime 1 2

data storage

LABEL=srv /srv btrfs defaults 0 0

Disk Information:
host:/ # ll /dev/disk/by-uuid/04cfb422-502e-4d3c-9faf-98a57b1fec51
lrwxrwxrwx 1 root root 10 Feb 27 23:40 /dev/disk/by-uuid/04cfb422-502e-4d3c-9faf-98a57b1fec51 → …/…/dm-1

host:/ # ll /dev/system/
total 0
lrwxrwxrwx 1 root root 7 Feb 27 23:40 root → …/dm-1
lrwxrwxrwx 1 root root 7 Feb 27 23:40 swap → …/dm-2

host:/ # ll /dev/mapper/
total 0
crw------- 1 root root 10, 236 Feb 27 23:40 control
lrwxrwxrwx 1 root root 7 Feb 27 23:40 cr_ata-ST160LM003_HN-M160MBB_S2SYJ9KC202779-part2 → …/dm-0
lrwxrwxrwx 1 root root 7 Feb 27 23:40 system-root → …/dm-1
lrwxrwxrwx 1 root root 7 Feb 27 23:40 system-swap → …/dm-2

I did find one or two bug reports from previous versions of opensuse (namely 12.1) but in those cases the system didn’t finish booting. Mine does. Also the bug is stated as being closed. https://bugzilla.novell.com/show_bug.cgi?id=708756

So I guess my questions are: why is the system trying to mount /dev/mapper/system-root to /root (and not /)? is this a bug?

Also on a second note: When I create a BtrFS file system using YaST I can select the acl and user_xattr options for that device (fstab includes acl,user_xattr as mount options). If I then try to mount this partion I get an error message that something went wrong while trying to mount the file system:
mount: wrong fs type, bad option, bad superblock on /dev/sdb,ee
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Removing the acl and user_xattr options from /etc/fstab solves the problem.

Cheers
Christian

First some Forums technical information. When you copy/paste computer text from a terminal emulator into a post, do so please between CODE tags. You get the CODE tags by clicking on the # button in the toolbar above the post editor.

THen this one looks trange to me

mount -o rw,defaults -t btrfs /dev/mapper/system-root /root

I wonder why that mount at /root is tried. Very unusual. Can you either explain or show the output of

cat /etc/fstab

This is very usual in initrd.

OK, when you say so.

Well, initrd mounts root filesystem and then switches to it. It obviously needs to mount it somewhere and /root looks like a good name for what is going to be root fileysstem :slight_smile:

It is of course a name as good as any, but when the system runs /root is existing for something completley different and thus confusion may arise (as was the case here).

I was actually loking for this and obviously missed it :frowning:

It’s in my first post, and it’s the complete fstab.


### pseudo file systems
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

### root filesystem
/dev/system/swap swap swap defaults 0 0
UUID=04cfb422-502e-4d3c-9faf-98a57b1fec51 / btrfs noatime 0 0
UUID=1eacd53a-8103-436a-85ae-edac9c095528 /boot ext4 noatime 1 2

### data storage
LABEL=srv /srv btrfs defaults 0 0

The CODE tags are not obvious to find. That is why I explained it. Itt would still be (much) better when you post withing those tags the complete thing. That is: ptompt, command, output and next prompt. Then there is also no need to tell “THis is the complete fstab”, because we all see who you were, where you were, what you did and what you got in one sweep ofthe mouse.

BTW. I guesss you read above that my guess about that mounting on /root (what is normaly the home directory of user root) is something complete different. Thus I am on the wrong path.

And, while you way of working with UUID= identifications in fstab works, it is definitely not the way YaST does it IMHO. It uses the /dev/disk/by-uuid files (when asked to mount by UUID).

Oh yes, and avidjaar points to the fact that this “error” is about mounting in initrd, not using fstab. Maybe an mkinitrd will help.

I think I figured out what the problem is / was: When I use YaST to set-up the partions and when I select BtrFS as filetype it still lets me select the ‘acl’ and ‘user_xattr’ options. This in turn puts ‘acl,user_xattr’ into the fstab mount options column (instead of ‘defaults’) as expected. When trying to mount the filesystem it won’t work giving the above mentioned error message (mount: wrong fs type, bad option, bad superblock…). When I remove acl and user_xattr from the options column everything works fine.

I would probably call it a bug in YaST for letting me select these options but that’s as always up to the definition of bug :wink:

thanks for the comments
Christian

(how do I mark this thread as solved other then putting [solved] in the title of my response?)

On 2013-03-06 02:36, wildcart wrote:
> I would probably call it a bug in YaST for letting me select these
> options but that’s as always up to the definition of bug :wink:

Please report this in Bugzilla.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

When I first saw your post, I was puzzled by it, particularly the mounting as “/root”.

Today, it occurred to me that I should check my own boot log. And here is part of what I see:


Waiting for device /dev/mapper/homesys-root to appear:  ok
fsck from util-linux 2.21.2
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/mapper/homesys-root 
/dev/mapper/homesys-root: clean, 241014/2621440 files, 1847073/10485760 blocks
fsck succeeded. Mounting root device read-write.
Mounting root /dev/mapper/homesys-root
mount -o rw,acl,user_xattr -t ext4 /dev/mapper/homesys-root /root

So that mounting as “/root” seems normal. Let’s remember that the system is running from the “initrd” ramdisk at this stage of booting.

A little later in the log, I see:


[ESC[1;32m  OK  ESC[0m] Started LSB: Set default boot entry if called.
[ESC[1;32m  OK  ESC[0m] Started udev Kernel Device Manager.
         Starting LSB: Start LVM2...
[ESC[1;32m  OK  ESC[0m] Started Show Plymouth Boot Screen.
[ESC[1;32m  OK  ESC[0m] Found device /dev/homesys/home.
[ESC[1;32m  OK  ESC[0m] Found device /dev/homesys/swap.
         Activating swap /dev/homesys/swap...
[ESC[1;32m  OK  ESC[0m] Activated swap /dev/homesys/swap.
[ESC[1;32m  OK  ESC[0m] Reached target Swap.
[ESC[1;32m  OK  ESC[0m] Found device /dev/mapper/cr_ata-SAMSUNG_HD642JJ_S1JNJ90QA04749-part2.
[ESC[1;32m  OK  ESC[0m] Started LSB: Start LVM2.

So now it is starting the LVM from which it had already mounted “/root”.

It all works, so I am not worrying about it.

Sorry about those escape sequences, but they are in the log (viewed using “less”), so I thought it better to leave them there in full.

I tried to reproduce this before writing the bug report and I couldn’t. Since 12.3 is currently at RC 2 and I previously used the NET install of RC 1 this may have been fixed in the meantime. The only way to add the ‘acl’ and ‘user_xattr’ options now is to type them in the ‘Arbitrary Option Value’ field and I wouldn’t consider this a bug in YaST per se. Maybe be ‘feature request’ would be the better term in this case: validate options put into the ‘Arbitrary Option Value’ field based on the selected file system.

So either it has been fixed in RC 2 or it may have been me putting the options in the ‘Arbitrary Option Value’ field manually. But I can’t remember doing this and it’s also not in the notes I took while installing / playing with the system.

If it was me sorry for the fuss, otherwise, it seems to be solved. In both cases thanks for the replies…

Christian

On 2013-03-06 13:16, wildcart wrote:

> If it was me sorry for the fuss, otherwise, it seems to be solved. In
> both cases thanks for the replies…

No problem, we all make mistakes, hit into errors that we do not know if
we caused them or not… it is normal :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))