Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notes about using Filesystem on block devices #130

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/operations.md
Expand Up @@ -154,6 +154,38 @@ Link it into discovery directory:
$ sudo ln -s /dev/disk/by-id/lvm-pv-uuid-yyTnct-TpUS-U93g-JoFs-6seh-Yy29-Dn6Irf /mnt/disks
```

### Link devices into directory to be discovered as Filesystem PVs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the TOC above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattymo you can generate it with markdown-toc, e.g. markdown-toc --no-firsth1 docs/operations.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reminding me to do this.


Similar to the above instruction for
[block PVs](#link-devices-into-directory-to-be-discovered-as-block-pvs), if you
want to expose block devices directly without preformatting them, you can link
them into the discovery directory.

For safety, you must use the unique path of device.

Find unique path of device:

```
$ ls -l /dev/disk/by-id/
lrwxrwxrwx 1 root root 9 Apr 18 14:26 lvm-pv-uuid-kdWgMJ-OOfq-ox5N-ie4E-NU2h-8zPJ-edX1Og -> ../../sde
lrwxrwxrwx 1 root root 9 Apr 18 14:26 lvm-pv-uuid-VqD1G2-upe2-Xnek-PdXD-mkOT-LhSv-rUV2is -> ../../sdc
lrwxrwxrwx 1 root root 9 Apr 18 14:26 lvm-pv-uuid-yyTnct-TpUS-U93g-JoFs-6seh-Yy29-Dn6Irf -> ../../sdb
```

For example, if you want to use `/dev/sdb`, you must link
`/dev/disk/by-id/lvm-pv-uuid-yyTnct-TpUS-U93g-JoFs-6seh-Yy29-Dn6Irf` not
`/dev/sdb`.

Link it into discovery directory:

```
$ sudo ln -s /dev/disk/by-id/lvm-pv-uuid-yyTnct-TpUS-U93g-JoFs-6seh-Yy29-Dn6Irf /mnt/disks
```

Additional notes: Your storage class must have VolumeMode set to "Filesystem"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PVC is the one that specifies volumeMode. Can you also add clarify here which provisioner configmap parameters need to be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be set in the provisioner, the storageclass, and in the pvc for it to work. Otherwise, it appears as a block PV

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no volumeMode field in the StorageClass object. Can you clarify in the doc here exactly which K8s objects and provisioner configmap values need to be set?

and fsType set (for example "ext4"). If fsType is unset, it will use Block
mode.

### Separate disk into multiple partitions

You can use [parted](https://www.gnu.org/s/parted/manual/parted.html) or other
Expand Down