'df /dev/sda1' (rootfs) returns result for /dev on gce minimal images
Bug #1775291 reported by
Robert C Jennings
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 /
Changed in cloud-images: | |
status: | New → Incomplete |
tags: | added: id-5b1708a3bbd86872863972a4 |
tags: | added: id-5b2bfc8fdeb1092dfb65ab49 |
tags: | added: fr-231 |
To post a comment you must log in.
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 data=ordered) size=1887700k, nr_inodes= 471925, mode=755) fmask=0022, dmask=0022, codepage= 437,iocharset= iso8859- 1,shortname= mixed,errors= remount- ro)
$ mount
/dev/sda1 on / type ext4 (rw,relatime,
devtmpfs on /dev type devtmpfs (rw,relatime,
/dev/sda15 on /boot/efi type vfat (rw,relatime,
<snip>
$ dmesg|grep root= /boot/vmlinuz- 4.15.0- 1008-gcp root=KPARTUUID= 09fc90e1- 2f42-4dfd- baf7-859f8a4942 47 ro scsi_mod. use_blk_ mq=Y console=ttyS0 /boot/vmlinuz- 4.15.0- 1008-gcp root=KPARTUUID= 09fc90e1- 2f42-4dfd- baf7-859f8a4942 47 ro scsi_mod. use_blk_ mq=Y console=ttyS0
[ 0.000000] Command line: BOOT_IMAGE=
[ 0.000000] Kernel command line: BOOT_IMAGE=
## 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