Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/: Not a XFS mount point. Why?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 923
Location: Romania

PostPosted: Sat Jul 06, 2019 3:50 pm    Post subject: Reply with quote

Perfect Gentleman wrote:
Code:
sdd                                                                           
└─sdd1 xfs    PX-G256M6e   681c1a22-4084-41c7-9c09-42a978436e34  202.8G    15% /
sde                                                                           
└─sde1 vfat                EC01-5458                               7.4G     0% /boot




I got confused by this. But why not try /dev/sdd1 instead of partuuid. which was my initial suggestion.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1982
Location: Frankfurt, Germany

PostPosted: Sat Jul 06, 2019 3:54 pm    Post subject: Reply with quote

Thanks for the "bash -x" output. So the "real" program calls are:
Code:
xfs_spaceman -p xfs_info -c info /home/MZ7WD240HAFV
xfs_spaceman -p xfs_info -c info /

I looked at the strace log of xfs_spaceman on my machine. The program reads '/proc/self/mounts'. Please post the ouput of:
Code:
cat /proc/self/mounts | egrep -v "^(cgroup|cgroup2|tmpfs|devpts|pstore|sysfs|proc|mqueue|debugfs|bpf|devtmpfs|fusectl) " | grep -v nfs
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Sat Jul 06, 2019 3:59 pm    Post subject: Reply with quote

axl wrote:
Perfect Gentleman wrote:
Code:
sdd                                                                           
└─sdd1 xfs    PX-G256M6e   681c1a22-4084-41c7-9c09-42a978436e34  202.8G    15% /
sde                                                                           
└─sde1 vfat                EC01-5458                               7.4G     0% /boot


I got confused by this. But why not try /dev/sdd1 instead of partuuid. which was my initial suggestion.

It's output of 'lsblk -f'. I'll try /dev/sdd1.

Code:
~ $ cat /proc/self/mounts | egrep -v "^(cgroup|cgroup2|tmpfs|devpts|pstore|sysfs|proc|mqueue|debugfs|bpf|devtmpfs|fusectl) " | grep -v nfs
/dev/root / xfs rw,noatime,attr2,inode64,noquota 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
none /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
/dev/sde1 /boot vfat rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/sda1 /home/MZ7WD240HAFV xfs rw,noatime,attr2,inode64,allocsize=1048576k,logbsize=256k,noquota 0 0
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Sat Jul 06, 2019 5:12 pm    Post subject: Reply with quote

/dev/sdd1 didn't help.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1982
Location: Frankfurt, Germany

PostPosted: Sat Jul 06, 2019 5:21 pm    Post subject: Reply with quote

Which version of sys-fs/xfsprogs is installed on your machine?

I started to look at the source code - and I want to make sure that I look at the right version...
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 923
Location: Romania

PostPosted: Sat Jul 06, 2019 5:22 pm    Post subject: Reply with quote

I had a long day. do not listen to me. i'm too tired to give out advice, but the next thing I would look at is initramfs file. none of my systems have /dev/root. i checked. maybe that's the problem. again, don't listen to me, i've run out of ideas.

what is /etc/mtab? should be a link to /proc/self/mounts

what is /dev/root? I _GUESS_ it should be a link to /dev/sdd1.

but how do you get /dev/root ?! has to be some kernel or genkernel thing. I don't have it.
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Sun Jul 07, 2019 2:26 am    Post subject: Reply with quote

mike155 wrote:
Which version of sys-fs/xfsprogs is installed on your machine?

5.1.0-rc0. I tried 5.0.0 and 4.20.; it's all the same.
Quote:
but how do you get /dev/root ?!

Code:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=/dev/sdd1 rw rootfstype=xfs rootflags=attr2,inode64,allocsize=1048576k,logbsize=256k,noquota nfs.nfs4_disable_idmapping=0 nfsd.nfs4_disable_idmapping=0 libata.force=3:3.0G"


I think it's bug when EFISTUB is used, because I have Microserver with grub; xfs on /root which is also is /boot. Everything is okay.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Sun Jul 07, 2019 9:26 am    Post subject: Reply with quote

does it work if you bind it elsewhere?

Code:

mkdir /mnt/root
mount --bind / /mnt/root
xfs_info /mnt/root
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Sun Jul 07, 2019 1:02 pm    Post subject: Reply with quote

Code:
 ~ $ sudo mkdir /mnt/root
 ~ $ sudo mount --bind / /mnt/root
 ~ $ xfs_info /mnt/root
/mnt/root: cannot find mount point.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Sun Jul 14, 2019 8:32 am    Post subject: Reply with quote

OK, I can reproduce your issue now.

1. create a LV with XFS filesystem
2. find out which dm-XXX name that LV is ( ls -l /dev/VG/LV )

Code:

# ls -l /dev/SSD/root
lrwxrwxrwx 1 root root 8 Jul 14 08:07 /dev/SSD/test -> ../dm-76
# ls -l /dev/dm-76
brw-rw---- 1 root disk 253, 76 Jul 14 08:07 /dev/dm-76


3. give the device an odd, non-standard name instead

Code:

# cp -a /dev/dm-76 /dev/foobarbaz


4. mount it using the nonstandard name

Code:

# mount /dev/foobarbaz /mnt/foobarbaz


5. verify it shows up as non-standard name in /proc/mounts

Code:

# grep foobar /proc/mounts
/dev/foobarbaz /mnt/foobarbaz xfs ro,relatime,attr2,inode64,noquota 0 0


6. test xfs_info with the device existing vs. not existing vs. existing as a symlink only

Code:

# xfs_info /mnt/foobarbaz
meta-data=/dev/foobarbaz
[...]
# rm /dev/foobarbaz
# xfs_info /mnt/foobarbaz
/mnt/foobarbaz: cannot find mount point.
# ln -s /dev/dm-76 /dev/foobarbaz
# xfs_info /mnt/foobarbaz
meta-data=/dev/foobarbaz
[...]




So that makes me think you have an initramfs, or a static /dev on your rootfs, where /dev/root actually exists, points to some other device, and gets mounted with that device name as a reference in /proc/mounts.

Then you boot, udev replaces initramfs and static /dev, and that strange device name no longer exists and hence, xfs_info which trusts the device names given by /proc/mounts fails to locate the correct device.

You can restore functionality by symlinking the missing device node (make sure it's the correct device and not something else).

And you can avoid the issue by getting rid of the non-standard device name where ever it might hide itself in your installation. You have to find out where it is (if you don't use initramfs, check out /mnt/root/dev after the bind-mount. otherwise check out the initramfs /dev.). Stick to the standard /dev names for everything. Aliases are great but bad if they stop existing later on in the boot process.

Good luck.
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Mon Jul 22, 2019 8:20 am    Post subject: Reply with quote

Quote:
OK, I can reproduce your issue now.

Thanx for helping.
Quote:
So that makes me think you have an initramfs,

I don't have it.
Code:
 ~ $ ls /boot/
config-5.2.0-gentoo  System.map-5.2.0-gentoo  vmlinuz-5.2.0-gentoo

Code:
~ $ grep -i initr /boot/config-5.2.0-gentoo
# CONFIG_BLK_DEV_INITRD is not set

Quote:
or a static /dev on your rootfs, where /dev/root actually exists

Code:
~ $ ls /dev/root
ls: cannot access '/dev/root': No such file or directory


Quote:
And you can avoid the issue by getting rid of the non-standard device name where ever it might hide itself in your installation. You have to find out where it is (if you don't use initramfs, check out /mnt/root/dev after the bind-mount. otherwise check out the initramfs /dev.). Stick to the standard /dev names for everything. Aliases are great but bad if they stop existing later on in the boot process.

What do you mean by that? I didn't choose non-standard device names. How can I prove it?
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 923
Location: Romania

PostPosted: Mon Jul 22, 2019 9:51 am    Post subject: Reply with quote

I found a system where I could reproduce. It has the /dev/root as root.

well, a simple hack would be to just do a link.

I think in your case was:

ln -s /dev/sdd1 /dev/root

then xfs_info will start working.

I'm still confused how /dev/root appeared in the first place, but i'm ready to let that go.
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Mon Jul 22, 2019 2:02 pm    Post subject: Reply with quote

@axl, thanx. That hack works.
But I don't get why my system has no /dev/root.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 923
Location: Romania

PostPosted: Mon Jul 22, 2019 2:50 pm    Post subject: Reply with quote

Perfect Gentleman wrote:
@axl, thanx. That hack works.
But I don't get why my system has no /dev/root.


Well, assuming it is an openrc setup, you can set "rc_dev_root_symlink="YES"" in /etc/conf.d/udev-trigger and it will be created. Don't know about systemd.

But I think I figured it out. So, as it turns out, on the one system where /dev/root issue showed up, is a systemd enabled, no initramfs, kernel directly mounts /root at boot. and what happens is: kernel does the mount for / when /dev wasn't mounted yet. Therefor the first entry in /proc/self/mounts is an entry for /dev/root. Then again, nothing in systemd takes care to create that link. So header of /proc/self/mounts looks something like this (root first):

Code:
/dev/root / xfs rw,noatime,nodiratime,attr2,inode64,noquota 0 0
devtmpfs /dev devtmpfs rw,relatime,size=12304776k,nr_inodes=3076194,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0


On other systems that do have an initramfs file, the init inside the initramfs does take care to mount /proc /dev first, and the rootfs is mounted by the init, AFTER /dev was mounted, and therefor when root is mounted is mounted with it's real device name instead of the generic /dev/root. so header of /proc/self/mounts looks something like this (dev first):

Code:
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=3856804,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/nvme0n1 / xfs rw,noatime,nodiratime,attr2,inode64,noquota 0 0


so. to solve this, you could use an initramfs file. or googling 61-dev-root-link.rules you could add an udev rule to create /dev/root.
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 921

PostPosted: Tue Jul 23, 2019 2:12 pm    Post subject: Reply with quote

Quote:
Well, assuming it is an openrc setup, you can set "rc_dev_root_symlink="YES"" in /etc/conf.d/udev-trigger and it will be created.

Thanx, that helped.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Thu Aug 01, 2019 10:05 pm    Post subject: Reply with quote

Perfect Gentleman wrote:

Quote:
or a static /dev on your rootfs, where /dev/root actually exists

Code:
~ $ ls /dev/root
ls: cannot access '/dev/root': No such file or directory



normally that'd check the udev /dev not the rootfs /dev

Code:

mkdir /mnt/root
mount --bind / /mnt/root
ls -l /mnt/root/dev/{,root}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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 vote in polls in this forum