Comment 8 for bug 1807288

Revision history for this message
Steve Langasek (vorlon) wrote :

Bionic:

$ dd if=/dev/zero count=0 bs=1M seek=100 of=./fake.img
0+0 records in
0+0 records out
0 bytes copied, 7.2374e-05 s, 0.0 kB/s
$ mkdir -p stuff/journal
$ sudo apt install acl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/38.5 kB of archives.
After this operation, 205 kB of additional disk space will be used.
Get:1 file:/mirror/ubuntu bionic/main amd64 acl amd64 2.2.52-3build1 [38.5 kB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package acl.
(Reading database ... 23466 files and directories currently installed.)
Preparing to unpack .../acl_2.2.52-3build1_amd64.deb ...
Unpacking acl (2.2.52-3build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Not building database; man-db/auto-update is not 'true'.
Setting up acl (2.2.52-3build1) ...
$ setfacl -m g:adm:rwx stuff/journal
$ mkfs.ext4 -L lala -O -metadata_csum -T default -O uninit_bg fake.img -d ./stuff/
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 25600 4k blocks and 6400 inodes

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done

$ sudo mount ./fake.img /mnt
$ getfacl /mnt/journal
getfacl: /mnt/journal: Invalid argument
$ sudo umount /mnt
$ sudo apt install -y e2fsprogs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libext2fs2
Suggested packages:
  gpart parted fuse2fs e2fsck-static
Recommended packages:
  e2fsprogs-l10n
The following packages will be upgraded:
  e2fsprogs libext2fs2
2 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
Need to get 547 kB of archives.
After this operation, 6144 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 libext2fs2 amd64 1.44.1-1ubuntu1 [157 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 e2fsprogs amd64 1.44.1-1ubuntu1 [390 kB]
Fetched 547 kB in 2s (224 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 23478 files and directories currently installed.)
Preparing to unpack .../libext2fs2_1.44.1-1ubuntu1_amd64.deb ...
Unpacking libext2fs2:amd64 (1.44.1-1ubuntu1) over (1.44.1-1) ...
Setting up libext2fs2:amd64 (1.44.1-1ubuntu1) ...
(Reading database ... 23478 files and directories currently installed.)
Preparing to unpack .../e2fsprogs_1.44.1-1ubuntu1_amd64.deb ...
Unpacking e2fsprogs (1.44.1-1ubuntu1) over (1.44.1-1) ...
Setting up e2fsprogs (1.44.1-1ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Not building database; man-db/auto-update is not 'true'.
$ mkfs.ext4 -L lala -O -metadata_csum -T default -O uninit_bg fake.img -d ./stuff/
mke2fs 1.44.1 (24-Mar-2018)
fake.img contains a ext4 file system labelled 'lala'
 last mounted on Tue Dec 11 20:29:49 2018
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 25600 4k blocks and 6400 inodes

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done

$ sudo mount ./fake.img /mnt
$ getfacl /mnt/journal
getfacl: Removing leading '/' from absolute path names
# file: mnt/journal
# owner: vorlon
# group: vorlon
user::rwx
group::rwx
group:adm:rwx
mask::rwx
other::r-x

$

Verified.