lsblk & df giving different mount points

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

lsblk & df giving different mount points

Post by AndyMH »

Title says it all.

lsblk:

Code: Select all

andy@T431 ~ $ lsblk -nio mountpoint /dev/sdb1
/run/timeshift/backup
df:

Code: Select all

andy@T431 ~ $ df | grep sdb1
/dev/sdb1                  1911193164  901146448 922710912  50% /media/ultrabay
sdb1 is the destination for my timeshift snapshots (it's my backup drive for timeshift, backintime and image backups). You can have the same partition mounted in different locations simultaneously, but why are the two commands different? The correct output is that both commands should show both mount points :?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mikeflan
Level 17
Level 17
Posts: 7162
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: lsblk & df giving different mount points

Post by mikeflan »

Are they both listed in /proc/mounts ?
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: lsblk & df giving different mount points

Post by AndyMH »

Yes

Code: Select all

andy@T431 /proc $ grep sdb1 mounts
/dev/sdb1 /media/ultrabay ext4 rw,relatime 0 0
/dev/sdb1 /run/timeshift/backup ext4 rw,relatime 0 0
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
mikeflan
Level 17
Level 17
Posts: 7162
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: lsblk & df giving different mount points

Post by mikeflan »

I don't know. Just for grins lets see if this is different:

Code: Select all

df -h --output=source,target
I suspect it too will not list both mount points.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: lsblk & df giving different mount points

Post by AndyMH »

mikeflan wrote: Wed Mar 31, 2021 12:06 pm I suspect it too will not list both mount points.
Correct :), just the /media/ultrabay mount point (which is mounted via fstab, not that I can think of any reason why this should make any difference). I assume timeshift is using mount, but why this should take precedence in the lsblk output, no idea?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: lsblk & df giving different mount points

Post by donten »

This tripped me up a few days ago...I opened Nemo, and the drive I use for backups was gone; timeshift had not released it. I took a quick look at the Disks utility, and the mount point was "run/timeshift" something. confused? That's not playing nice :x I had to boot from the Mint iso to be able to start timeshift and restore from one of the backups. :x
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: lsblk & df giving different mount points

Post by donten »

Why does it say "confused," instead of "W T F?" :P
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: lsblk & df giving different mount points

Post by Larry78723 »

Could Timeshift be creating a softlink on the fly to the actual storage location (sdb1)?
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: lsblk & df giving different mount points

Post by AndyMH »

Could be, but life's too short to start digging around in the source code :). Pet peeve - virtually all the linux source code I've looked at has either zero or next to no comments. That's why foxclone has as many lines of comment as code.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: lsblk & df giving different mount points

Post by donten »

I checked again today, and timeshift did it again...But I got smart and simply unmounted the *hijacked* disk-- then I remounted it and Disks restored the original mount point of itself 8)
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: lsblk & df giving different mount points

Post by donten »

I found that by using the UUID of the drive as the mount point solves the issue.
Locked

Return to “Software & Applications”