-
-
Notifications
You must be signed in to change notification settings - Fork 268
fall back to old way when 'mkfs -U' fails (issue 890 and issue 851) #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fall back to old way when 'mkfs -U' fails (issue 890 and issue 851) #894
Conversation
…'-U' and then fall back to the old way before issue 851 i.e. using mkfs without '-U' plus 'tunefs -U'
|
I need to test if that works for me |
|
Works well for me on SLE12 with ext4. Some details FYI: After "rear -d -D recover" in the recovery system # Try 'mkfs -U' to create the filesystem with initially correct UUID
# but if that fails assume it failed because of missing support for '-U'
# (e.g. in RHEL 5 it fails, see https://github.com/rear/rear/issues/890)
# then fall back to using mkfs without '-U' plus 'tune2fs/tune4fs -U'
if ! mkfs -t ext4 -b 4096 -i 16370 -U 6a661d11-b4cf-4892-8d64-5735eef68309 /dev/sda2 >&2 ; then
mkfs -t ext4 -b 4096 -i 16370 /dev/sda2 >&2
tune2fs -U 6a661d11-b4cf-4892-8d64-5735eef68309 /dev/sda2 >&2
fi
and var/log/rear/rear-e229.log contains +++ mkfs -t ext4 -b 4096 -i 16370 -U 6a661d11-b4cf-4892-8d64-5735eef68309 /dev/sda2
mke2fs 1.42.11 (09-Jul-2014)
Discarding device blocks: done
Creating filesystem with 4859392 4k blocks and 1218224 inodes
Filesystem UUID: 6a661d11-b4cf-4892-8d64-5735eef68309
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
|
|
Works also well for me on SLE11 with ext3. Some details (basically the same as for SLE12 with ext4): After "rear -d -D recover" in the recovery system # Try 'mkfs -U' to create the filesystem with initially correct UUID
# but if that fails assume it failed because of missing support for '-U'
# (e.g. in RHEL 5 it fails, see https://github.com/rear/rear/issues/890)
# then fall back to using mkfs without '-U' plus 'tune2fs/tune4fs -U'
if ! mkfs -t ext3 -b 4096 -i 16370 -U de51dda4-8a5d-4206-b5ee-6eaa9e88bec3 /dev/sda2 >&2 ; then
mkfs -t ext3 -b 4096 -i 16370 /dev/sda2 >&2
tune2fs -U de51dda4-8a5d-4206-b5ee-6eaa9e88bec3 /dev/sda2 >&2
fi
and var/log/rear/rear-f96.log contains +++ mkfs -t ext3 -b 4096 -i 16370 -U de51dda4-8a5d-4206-b5ee-6eaa9e88bec3 /dev/sda2
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1218224 inodes, 4859392 blocks
242969 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
149 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
|
|
Because it seems there are no regressions (at least not for me) |
try to create the filesystem with initially correct UUID (#851)
but when 'mkfs -U' fails (e.g. on RHEL 5, #890)
assume it failed because of missing support for '-U'
and then fall back to the old way before issue 851
i.e. using mkfs without '-U' plus 'tunefs -U'