Skip to content

Conversation

@jsmeix
Copy link
Member

@jsmeix jsmeix commented Jun 27, 2016

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'

…'-U' and then fall back to the old way before issue 851 i.e. using mkfs without '-U' plus 'tunefs -U'
@jsmeix jsmeix added enhancement Adaptions and new features bug The code does not do what it is meant to do waiting for info Also used to mark an issue as stale, cf. stale.yml labels Jun 27, 2016
@jsmeix jsmeix added this to the Rear v1.19 milestone Jun 27, 2016
@jsmeix jsmeix self-assigned this Jun 27, 2016
@jsmeix
Copy link
Member Author

jsmeix commented Jun 27, 2016

I need to test if that works for me
on SLE11 and SLE12 with ext4 ...

@jsmeix
Copy link
Member Author

jsmeix commented Jun 27, 2016

Works well for me on SLE12 with ext4.

Some details FYI:

After "rear -d -D recover" in the recovery system
diskrestore.sh contains

# 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

@jsmeix
Copy link
Member Author

jsmeix commented Jun 27, 2016

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
diskrestore.sh contains

# 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.

@jsmeix
Copy link
Member Author

jsmeix commented Jun 27, 2016

Because it seems there are no regressions (at least not for me)
I merge it so that also others test it when using rear master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug The code does not do what it is meant to do enhancement Adaptions and new features fixed / solved / done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant