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

Add storage checks #468

Merged
merged 21 commits into from Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/y2storage/boot_requirements_strategies/zipl.rb
Expand Up @@ -70,8 +70,8 @@ def zipl_volume

@zipl_volume = VolumeSpecification.new({})
@zipl_volume.mount_point = "/boot/zipl"
@zipl_volume.fs_types = [Filesystems::Type::EXT2]
@zipl_volume.fs_type = Filesystems::Type::EXT2
@zipl_volume.fs_types = Filesystems::Type.zipl_filesystems
@zipl_volume.fs_type = Filesystems::Type.zipl_filesystems.first
@zipl_volume.min_size = DiskSize.MiB(100)
@zipl_volume.desired_size = DiskSize.MiB(200)
@zipl_volume.max_size = DiskSize.GiB(1)
Expand Down
15 changes: 14 additions & 1 deletion src/lib/y2storage/filesystems/type.rb
Expand Up @@ -120,9 +120,11 @@ class Type

LEGACY_HOME_FILESYSTEMS = [:reiserfs]

ZIPL_FILESYSTEMS = [:ext2, :ext3, :ext4, :xfs]

private_constant :PROPERTIES, :ROOT_FILESYSTEMS, :HOME_FILESYSTEMS,
:COMMON_FSTAB_OPTIONS, :EXT_FSTAB_OPTIONS, :LEGACY_ROOT_FILESYSTEMS,
:LEGACY_HOME_FILESYSTEMS
:LEGACY_HOME_FILESYSTEMS, :ZIPL_FILESYSTEMS

# Allowed filesystems for root
#
Expand Down Expand Up @@ -152,6 +154,17 @@ def self.legacy_home_filesystems
LEGACY_HOME_FILESYSTEMS.map { |f| find(f) }
end

# Allowed filesystems for zipl boot partition
#
# @note See page 13 in following link
# https://share.confex.com/share/123/webprogram/Handout/\
# Session15694/SHARE_Bootloader_Ihno_PittsPPT_0.09.pdf
#
# @return [Array<Filesystems::Type>]
def self.zipl_filesystems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be mentioned that the first one is the preferred one (i.e. used by the guided setup)

ZIPL_FILESYSTEMS.map { |f| find(f) }
end

# Check if filesystem is usable as root (mountpoint "/") filesystem.
#
# return [Boolean]
Expand Down