Why different partitions listed for two similar linodes?
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.
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
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
The linode only has the one disk partition (i.e. no /dev/sdb , etc)
Thanks for the help!
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% /
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:
and see if you get a response.
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:
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:
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.