'df /dev/sda1' (rootfs) returns result for /dev on gce minimal images

Bug #1775291 reported by Robert C Jennings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
New
Undecided
Unassigned
coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

On base images the root FS shows up as /dev/sda1 in mount and df output. For minimized images the root FS shows up in df output as /dev/root. Scripts that call 'df /dev/sda1' to get information about the root FS will instead match to /dev not /

Robert C Jennings (rcj)
Changed in cloud-images:
status: New → Incomplete
Revision history for this message
Robert C Jennings (rcj) wrote :

Launching GCE minimal bionic image from --image-family ubuntu-minimal-1804-lts --image-project ubuntu-os-cloud-devel

## This is wrong
$ df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev

## Odd to see /dev/root not /dev/sda1
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.0T 799M 3.0T 1% /
devtmpfs 1.9G 0 1.9G 0% /dev
<snip>

## Mount output shows /dev/sda1 not /dev/root
$ mount
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1887700k,nr_inodes=471925,mode=755)
/dev/sda15 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
<snip>

$ dmesg|grep root=
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-1008-gcp root=KPARTUUID=09fc90e1-2f42-4dfd-baf7-859f8a494247 ro scsi_mod.use_blk_mq=Y console=ttyS0
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-1008-gcp root=KPARTUUID=09fc90e1-2f42-4dfd-baf7-859f8a494247 ro scsi_mod.use_blk_mq=Y console=ttyS0

## Both /dev/root and /dev/sda1 are the same device
$ ls -ln /dev|grep "8,"
crw------- 1 0 0 10 8, 0 Jun 5 22:30 ppp
brw------- 1 0 0 8, 1 Jun 5 22:30 root
brw-rw---- 1 0 6 8, 0 Jun 5 22:30 sda
brw-rw---- 1 0 6 8, 1 Jun 5 22:30 sda1
brw-rw---- 1 0 6 8, 14 Jun 5 22:30 sda14
brw-rw---- 1 0 6 8, 15 Jun 5 22:30 sda15

## df by mountpoint works
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.0T 799M 3.0T 1% /

## This is different from the non-minimzed image which would show /dev/sda1 instead
$ df -h /dev/root
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.0T 799M 3.0T 1% /

$ df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev

Changed in cloud-images:
status: Incomplete → New
description: updated
tags: added: id-5b1708a3bbd86872863972a4
tags: added: id-5b2bfc8fdeb1092dfb65ab49
tags: added: fr-231
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.