Module: Mkfs

Defined in:
lib/mkfs.rb,
lib/mkfs/zfs.rb

Defined Under Namespace

Classes: Encrypt, Hybrid, Lvm, Root, Zfs

Class Method Summary collapse

Class Method Details

.ext4(path) ⇒ Object

Format a path using mkfs.ext4.

Parameters:

  • path, (string)

    full path e.g /dev/sda1



11
12
13
14
15
16
17
18
# File 'lib/mkfs.rb', line 11

def self.ext4(path)
  bs = Getch::Helpers.get_bs(path)
  if bs == '512'
    Getch::Command.new('mkfs.ext4', '-F', path)
  else
    Getch::Command.new('mkfs.ext4', '-F', '-b', bs, path)
  end
end