1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Bruno Tavares
5f98b97749 Nuke when graphdir is a mount
Previously, when the graphdir was a root of a mountpoint, we would not
be able to cleanup the graphdir, as the script would umount in case
target dir is a mount itself

```/etc/mtab
/dev/xvdc1 /var/lib/docker btrfs
```

When running the script, the graphdir would be unmounted and it would
remove a (possibly) empty folder.

```
Nuking /var/lib/docker ...
  (if this is wrong, press Ctrl+C NOW!)

  + sleep 10

  + umount -f /var/lib/docker
  + rm -rf /var/lib/docker
  ```

This PR includes the necessary changes to nuke the folder on this
scenario, including when the graphdir is a btrfs mount iself.

Signed-off-by: Bruno Tavares <btavare@thoughtworks.com>
2016-11-01 22:22:25 -02:00
Adam Mills
c3aa75c5a7 nuke-graph-directory.sh: Improve subvolume search
This change allows btrfs subvolumes to be found in additional system
configurations. The old logic failed to correctly identify subvolumes
when the root fs was mounted as a subvolume that was not the btrfs
filesystem root.

Signed-off-by: Adam Mills <adam@armills.info>
2016-08-08 13:00:21 -04:00
Joe Ferguson
d2e9f6c0c1 Fix nuke script to remove from end of path
Signed-off-by: Joe Ferguson <joe@infosiftr.com>
2015-09-09 15:34:05 -07:00
Tianon Gravi
6b340e391c Fix a bashism and some minor bugs in nuke-graph-directory.sh
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-12-12 11:51:12 -07:00
Tianon Gravi
047ce47d92 Add contrib/nuke-graph-directory.sh script to clean out old /var/lib/docker directories much more easily
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-05 12:36:39 -06:00