FS#40691 - [e2fsprogs] 1.42.10 make file system on a file is down

Attached to Project: Arch Linux
Opened by Lacsap (lacsap) - Wednesday, 04 June 2014, 21:12 GMT
Last edited by Evangelos Foutras (foutrelis) - Saturday, 27 September 2014, 04:56 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Hi,

I tried to report the bug directly on e2fsprogs upstream but didin't find the good page to do it :-(

mkfs.ext4 doesn't work on a file but works on the file "looped".

same way for mkfs.ext2 and 3.

Thanks


Additional info:

e2fsprogs 1.42.10


Steps to reproduce:

truncate -s 1G test

mkfs.ext4 test
mke2fs 1.42.10 (18-May-2014)
Could not open test: Value too large for defined data type

mkfs.ext4 -F test
mke2fs 1.42.10 (18-May-2014)
Could not open test: Value too large for defined data type

losetup -f
/dev/loop1

losetup -f test

mkfs.ext4 /dev/loop1
mke2fs 1.42.10 (18-May-2014)
Discarding device blocks: done
Creating filesystem with 622336 4k blocks and 155648 inodes
Filesystem UUID: 70bd9768-d8c0-44bc-b9e6-3891431d4b79
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Saturday, 27 September 2014, 04:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  e2fsprogs 1.42.11-1
Comment by Dave Reisner (falconindy) - Wednesday, 04 June 2014, 22:15 GMT
Works for me...

$ truncate -s 1G foo
$ mkfs.ext4 -F foo
mke2fs 1.42.10 (18-May-2014)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: ef4f08f8-480c-4297-a444-cfdb597ebddb
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

Is your install i686 or x86_64?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 05 June 2014, 00:34 GMT
Works for me too, i686 as the OP and x86_64.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 05 June 2014, 00:37 GMT
curiously, output values for superblocks and journal size differs for the same target size (me == Dave but != Lacsap), do you touched mke2fs.conf?
Comment by Dave Reisner (falconindy) - Thursday, 05 June 2014, 00:39 GMT
$ pacman -Qii e2fsprogs | grep mke2fs
UNMODIFIED /etc/mke2fs.conf
Comment by Lacsap (lacsap) - Thursday, 05 June 2014, 07:57 GMT
Hi,
It was late last night and I missed some stuff! ;-)
I encountered this problem with mkarchiso (hi Gerardo) after updating my system.
I tangled my brushes with my files (which explains the commentary on the superblocks) but the file size seems to be decisive.
I just properly retest.

8<----------------------------------

[root@arch] ~ # grep sdb3 /proc/mounts
/dev/sdb3 /media/tmp3 ext4 rw,relatime,data=ordered 0 0

[root@arch] ~ # cd /media/tmp3/
[root@arch] tmp3 # export LANG=us

[root@arch] tmp3 # truncate -s 1G test.file
[root@arch] tmp3 # mkfs.ext4 test.file
mke2fs 1.42.10 (18-May-2014)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 3c027666-b822-4d01-aca8-919e0c1ba83b
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

[root@arch] tmp3 # rm test.file
rm: remove regular file 'test.file'? y
[root@arch] tmp3 # truncate -s 2G test.file
[root@arch] tmp3 # mkfs.ext4 test.file
mke2fs 1.42.10 (18-May-2014)
Could not open test.file: Value too large for defined data type

[root@arch] tmp3 # losetup -f
/dev/loop0
[root@arch] tmp3 # losetup -f test.file
[root@arch] tmp3 # mkfs.ext4 /dev/loop0
mke2fs 1.42.10 (18-May-2014)
Discarding device blocks: done
Creating filesystem with 524288 4k blocks and 131072 inodes
Filesystem UUID: 6b8bb425-cb8b-4e86-b126-f6761e6fae4c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

[root@arch] tmp3 # losetup -d /dev/loop0
[root@arch] tmp3 # mkfs.ext4 test.file
mke2fs 1.42.10 (18-May-2014)
Could not open test.file: Value too large for defined data type

[root@arch] tmp3 # rm test.file
rm: remove regular file 'test.file'? y
[root@arch] tmp3 # truncate -s 1G test.file
[root@arch] tmp3 # mkfs.ext4 test.file
mke2fs 1.42.10 (18-May-2014)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 40615b4e-9855-4a78-b421-edcadd66e5c8
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

[root@arch] tmp3 # pacman -U /var/cache/pacman/pkg/e2fsprogs-1.42.9-2-i686.pkg.tar.xz
loading packages...
warning: downgrading package e2fsprogs (1.42.10-1 => 1.42.9-2)
resolving dependencies...
looking for inter-conflicts...

Packages (1): e2fsprogs-1.42.9-2

Total Installed Size: 2.62 MiB
Net Upgrade Size: -0.30 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
(1/1) downgrading e2fsprogs [######################] 100%

[root@arch] tmp3 # rm test.file
rm: remove regular file 'test.file'? y
[root@arch] tmp3 # truncate -s 2G test.file
[root@arch] tmp3 # mkfs.ext4 test.file
mke2fs 1.42.9 (28-Dec-2013)
test.file is not a block special device.
Proceed anyway? (y,n) y
warning: Unable to get device geometry for test.file
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

[root@arch] tmp3 # mkfs.ext4 -F test.file
mke2fs 1.42.9 (28-Dec-2013)
warning: Unable to get device geometry for test.file
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
Comment by Tarqi Kazan (Tarqi) - Friday, 13 June 2014, 21:51 GMT
Can confirm this on i686. Using a big(ger) file will not work, using a loop device works.

-e2fsprogs 1.42.10-1
-linux 3.14.6-1

Loading...