Why different partitions listed for two similar linodes?

Hi,

I created two Debian 10 linodes a few weeks apart. I just ran df -h on each of them and noticed that under 'filesystem' one linode has '/dev/sda' as the partition for the '/' mount, while the other has '/dev/root' listed for the '/' mount.

I created both linodes the same way through the admin console (although likely ran differing options after the initial setup - i.e. restore from image, resize swap) and I'm wondering why there would be this partition difference, or if it matters?

I'm not concerned about this if there isn't any impact, but just wanted to check.

Thanks!

6 Replies

My suspicion is that /dev/root is a symlink to /dev/sda and that df(1) is just reporting /dev/root one as the device for / because it's finding it first. Does the Linode reporting /dev/root mounted as / have more than one disc partition (/dev/sdb, /dev/sdc, etc)?

You can verify if /dev/root is a symlink with

ls -la /dev/root

-- sw

I just checked and ls -la does not report /dev/root as a link:

ls -la /dev/root
ls: cannot access '/dev/root': No such file or directory

I also ran:

readlink -f /dev/root
/dev/root

The linode only has the one disk partition (i.e. no /dev/sdb , etc)

Thanks for the help!

@cl-bos --

Try this instead:

ls -la /dev | grep root

My bad…sorry.

-- sw

I ran ls -la /dev | grep root

but there was no listing or link to '/dev/root'.

Here's the line from df -h

Filesystem   Size   Used   Avail   Use%   Mounted on
/dev/root      49G   18G     29G   39%       /

Thanks again..

Oh well… I guess it's one of those "Great Linux Mysteries™" ;-) You might pose your question in one of the Debian-specific fora mentioned here:

https://debian.org

and see if you get a response.

-- sw

Some more research (in-case anyone might find this useful in the future)..

The origin of this difference in the mount device (between the two linodes) seems to be a difference in the /proc/mounts file (also /etc/mtab - both link to /proc/self/mounts) where one linode lists the root filesystem device as /dev/sda and the other /dev/root.

Some info on /etc/mtab and /proc/mounts:
https://unix.stackexchange.com/questions/514078/what-is-etc-mtab-in-linux/514095#514095

It seems that /dev/root is a kernel "pointer" (not sure that is correct terminology) that points to an actual device (/dev/sda in the case of the linode listing /dev/root as the device).

The cause of this difference is not fully clear to me, but this HP thread sheds some light as to why one linode might be using /dev/root:

https://community.hpe.com/t5/lvm-and-vxvm/what-is-dev-root/m-p/2620771/highlight/true#M5857

I may try rebooting the "/dev/root" machine off hours and see if it updates to /dev/sda

If anyone has more info. on this, I'd appreciate it.

Thanks!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct