Class: Fstab::Lvm
Instance Method Summary
collapse
Methods inherited from Root
#generate
Methods included from NiTo
cp, echo, echo_a, grep?, mkdir, mount, mount?, mv, rm, search_proc_swaps, sed, sh, swapoff, swapoff_dm, touch, umount
Constructor Details
#initialize(devs, options) ⇒ Lvm
Returns a new instance of Lvm.
5
6
7
8
|
# File 'lib/fstab/lvm.rb', line 5
def initialize(devs, options)
super
@vg = options[:vg_name]
end
|
Instance Method Details
#write_home ⇒ Object
20
21
22
23
|
# File 'lib/fstab/lvm.rb', line 20
def write_home
line = "/dev/#{@vg}/home /home #{@fs} rw,relatime 0 2"
echo_a @conf, line
end
|
#write_root ⇒ Object
15
16
17
18
|
# File 'lib/fstab/lvm.rb', line 15
def write_root
line = "/dev/#{@vg}/root / #{@fs} rw,relatime 0 1"
echo_a @conf, line
end
|
#write_swap ⇒ Object
10
11
12
13
|
# File 'lib/fstab/lvm.rb', line 10
def write_swap
line = "/dev/#{@vg}/swap swap swap rw,noatime,discard 0 0"
echo_a @conf, line
end
|