I was taking truability test to assess my skills. I got the below question.
Create a puppet manifest in /root/puppet/lad.pp to mount the filesystem located in /root/files/LAD/disk.ext2 that:
- will mount the device at "/mnt/LAD"
- sets fstab to prevent the filesystem from being fsck'd and will prevent dump from running on it
- mounts the filesystem as ext2 via loopback device
- mounts the filesystem as read-writable
I just started with puppet and I am not pretty sure if what I have is correct. I have the below file.
mount { "/mnt/LAD": device => "/root/files/LAD/disk.ext2", fstype => "ext2", ensure => "mounted", options => "-o loop", } When I run the above puppet configuration, I get the error as,
err: /Stage[main]//Mount[/mnt/LAD]: Could not evaluate: Execution of '/bin/mount -o -o loop /mnt/LAD' returned 1: [mntent]: line 13 in /etc/fstab is bad mount: can't find /mnt/LAD in /etc/fstab or /etc/mtab The following option works perfectly fine.
mount -o loop /root/files/LAD/disk.ext2 /mnt/LAD Can someone point me where am doing wrong regarding the settings from puppet?
options => "-o loop",tooptions => "loop",? The error showsmount -o -o loopso you'd want to get rid of one of the-os.