atrull/filesystem_cookbook — pull request #11 by jperville (2014-12-05 10:05:20+00:00)
Title: Generate more useful /etc/fstab entries when using loopbacked files.

This PR generates fstab entries for files that use the `-o loop`; this should help with remounting the loopback volumes on reboot and not only when chef-client runs.

No tests but the code should be simple enough.
On my test-kitchen, converging the following resource:

```ruby
filesystem "docker" do
fstype "btrfs"
device '/dev/loop0'
file '/opt/docker-fs'
size '3000'
mount '/var/lib/docker'
action [:create, :enable, :mount]
end
```

Has the following effects

```sh
vagrant@deployments-ubuntu-1404:~$ mount | grep loop0
/dev/loop0 on /var/lib/docker type btrfs (rw)
vagrant@deployments-ubuntu-1404:~$ cat /etc/fstab | grep loop0
/opt/docker-fs /var/lib/docker auto defaults,loop=/dev/loop0 0 0
```