Skip to content
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

Resolve Issue 851: Fix problem with UUIDs on Fedora by using mkfs to … #854

Merged
merged 1 commit into from
Jun 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ function create_fs () {
done
# If available use wipefs to cleanup disk partition:
test "$has_wipefs" && echo "$wipefs_command" >> "$LAYOUT_CODE"
# Actually create the filesystem:
echo "mkfs -t ${fstype}${blocksize}${fragmentsize}${bytes_per_inode} $device >&2" >> "$LAYOUT_CODE"
# Actually create the filesystem with initially correct UUID
# (Addresses Fedora/systemd problem, see issue 851)
if [ -n "$uuid" ] ; then
echo "mkfs -t ${fstype}${blocksize}${fragmentsize}${bytes_per_inode} -U $uuid $device >&2" >> "$LAYOUT_CODE"
else
echo "mkfs -t ${fstype}${blocksize}${fragmentsize}${bytes_per_inode} $device >&2" >> "$LAYOUT_CODE"
fi
# Adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems:
local tunefs="tune2fs"
# On RHEL 5, tune2fs does not work on ext4.
Expand All @@ -85,10 +90,6 @@ function create_fs () {
if [ -n "$label" ] ; then
echo "$tunefs -L $label $device >&2" >> "$LAYOUT_CODE"
fi
# Set the UUID:
if [ -n "$uuid" ] ; then
echo "$tunefs -U $uuid $device >&2" >> "$LAYOUT_CODE"
fi
# Set the other tunable filesystem parameters:
tune2fsopts="${reserved_blocks}${max_mounts}${check_interval}${default_mount_options}"
if [ -n "$tune2fsopts" ] ; then
Expand Down