Skip to content

Commit dbbe895

Browse files
committed
update QUICKSTART.md
Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
1 parent cf0c3e9 commit dbbe895

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

docs/QUICKSTART.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,23 @@ The config file is `/etc/overlaybd-snapshotter/config.json`. Please create the f
5757

5858
```json
5959
{
60-
"root": "/var/lib/overlaybd/",
61-
"address": "/run/overlaybd-snapshotter/overlaybd.sock"
60+
"root": "/var/lib/containerd/io.containerd.snapshotter.v1.overlaybd",
61+
"address": "/run/overlaybd-snapshotter/overlaybd.sock",
62+
"verbose": "info",
63+
"mode": "overlayfs",
64+
"logReportCaller": false,
65+
"autoRemoveDev": false
6266
}
6367
```
64-
`root` is the root directory to store snapshots, `address` is the socket address used to connect withcontainerd.
68+
| Field | Description |
69+
| ----- | ----------- |
70+
| `root` | the root directory to store snapshots |
71+
| `address` | the socket address used to connect withcontainerd. |
72+
| `verbose` | log level, `info` or `debug` |
73+
| `mode` | rootfs mode about wether to use native writable layer. See [Native Support for Writable](docs/WRITABLE.md) for detail. |
74+
| `logReportCaller` | enable/disable the calling method |
75+
| `autoRemoveDev` | enable/disable auto clean-up overlaybd device after container removed |
76+
6577

6678
#### Start service
6779

pkg/snapshot/overlay.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ func (o *snapshotter) Prepare(ctx context.Context, key, parent string, opts ...s
570570
// View returns a readonly view on parent snapshotter.
571571
func (o *snapshotter) View(ctx context.Context, key, parent string, opts ...snapshots.Opt) (_ []mount.Mount, retErr error) {
572572
log.G(ctx).Debugf("View (key: %s, parent: %s)", key, parent)
573-
573+
defer log.G(ctx).Debugf("return View (key: %s, parent: %s)", key, parent)
574574
return o.createMountPoint(ctx, snapshots.KindView, key, parent, opts...)
575575
}
576576

@@ -966,6 +966,9 @@ func (o *snapshotter) normalOverlayMount(s storage.Snapshot) []mount.Mount {
966966
fmt.Sprintf("workdir=%s", o.workPath(s.ID)),
967967
fmt.Sprintf("upperdir=%s", o.upperPath(s.ID)),
968968
)
969+
// if o.metacopyOption != "" {
970+
// options = append(options, o.metacopyOption)
971+
// }
969972
} else if len(s.ParentIDs) == 1 {
970973
return []mount.Mount{
971974
{

pkg/snapshot/storage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ func (o *snapshotter) constructOverlayBDSpec(ctx context.Context, key string, wr
551551
Data: o.overlaybdWritableDataPath(id),
552552
}
553553
}
554+
configBuffer, _ := json.MarshalIndent(configJSON, "", " ")
555+
log.G(ctx).Infoln(string(configBuffer))
554556
return o.atomicWriteOverlaybdTargetConfig(id, &configJSON)
555557
}
556558

script/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"root": "/var/lib/containerd/io.containerd.snapshotter.v1.overlaybd",
3-
"address": "/run/overlaybd-snapshotter/overlaybd.sock"
3+
"address": "/run/overlaybd-snapshotter/overlaybd.sock",
4+
"verbose": "info",
5+
"mode": "overlayfs",
6+
"logReportCaller": false,
7+
"autoRemoveDev": false
48
}

0 commit comments

Comments
 (0)