Skip to content

Commit 59f9096

Browse files
committed
(TODO: validate) docs: updates
1 parent 9f276dc commit 59f9096

3 files changed

Lines changed: 113 additions & 3 deletions

File tree

docs/install/linux-docker.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Start Varasto
2828
--privileged \
2929
--device /dev/fuse \
3030
-p 443:443 \
31+
--stop-timeout 30s \
3132
fn61/varasto
3233
```
3334

@@ -43,6 +44,7 @@ Start Varasto
4344
varasto:
4445
image: fn61/varasto
4546
restart: always # restart on crashes
47+
stop_grace_period: 30s # graceful stop needs to stop ongoing file transfers etc.
4648
cap_add:
4749
- SYS_ADMIN # for FUSE support. these are not required if you have "privileged: true"
4850
- MKNOD # (but are IF you remove privileged because you don't need SMART support)
@@ -59,7 +61,7 @@ Start Varasto
5961
source: /mnt/varasto
6062
target: /mnt/varasto
6163
bind:
62-
propagation: shared # For sub-mounts (FUSE) to be visible to the host
64+
propagation: shared # For mount updates, sub-mounts (FUSE) to be visible to the host
6365
- type: bind
6466
source: /dev # SMART support requires access to raw disks
6567
target: /dev

docs/install/update/index.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,15 @@ This one depends on how you installed Varasto:
7878
docker pull fn61/varasto
7979
```
8080

81-
Now start the new version of Varasto using the same command as in the
82-
[original installation instructions](../linux-docker.md).
81+
82+
Start Varasto:
83+
84+
```console
85+
docker-compose up -d
86+
```
87+
88+
((Now start the new version of Varasto using the same command as in the
89+
[original installation instructions](../linux-docker.md).))
8390

8491
=== "Manual installation"
8592
Updating means replacing the `sto` binary with newer versions.

docs/storage/local-fs/index.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,107 @@ Now we are ready to mount that directory as volume in Varasto! From Varasto choo
5757
That's it! Now that the volume is mounted, Varasto can write files there.
5858

5959

60+
Adding new disk to Varasto
61+
--------------------------
62+
63+
These instructions are for Linux. You can do the same on easily Windows, but you'll have to improvise.
64+
65+
NOTE: Many of the commands might need `$ sudo` prefix.
66+
67+
68+
### Partition your drive
69+
70+
If your drive isn't already partitioned (or you want to inspect the partition table):
71+
72+
```bash
73+
$ fdisk /dev/sdn
74+
```
75+
76+
(FIXME: you probably need to use gdisk, since fdisk by default tried to give me partition with 2 TB size for a 16+ TB disk:
77+
https://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html )
78+
79+
While you could in theory use the full block device without partitioning if all you need
80+
is a single partition, it might be a good idea to partition anyway to have less exotic setup.
81+
Recovery situations are always easier the more standard your setup is.
82+
83+
84+
### Format the partition for ext4
85+
86+
```bash
87+
$ mkfs.ext4 -L wernstrom -m 1 /dev/sdn1
88+
```
89+
90+
The `-m` sets [reserved blocks](https://wiki.archlinux.org/index.php/Ext4#Reserved_blocks)
91+
to `1 %` instead of the default (5 %). The default would leave quite a lot of space
92+
unusable for larger drives.
93+
94+
TODO: openable why-section
95+
96+
Reserved blocks mechanism doesn't benefit Varasto-managed partitions because
97+
the mechanism is designed for quite different use case.
98+
99+
100+
### Make a mount point for the drive
101+
102+
Linux needs an empty directory as a placeholder for a mount point.
103+
104+
```bash
105+
$ mkdir /mnt/varasto/wernstrom
106+
```
107+
108+
109+
### Add volume to fstab for automatic mounting on reboots
110+
111+
```bash
112+
$ vim /etc/fstab
113+
```
114+
115+
Let's assume you already have a volume named `amy`. You're now adding `wernstrom`. The
116+
lines now look like this:
117+
118+
```
119+
LABEL=amy /mnt/varasto/amy ext4 defaults,nofail,noatime 0 1
120+
LABEL=wernstrom /mnt/varasto/wernstrom ext4 defaults,nofail,noatime 0 1
121+
```
122+
123+
### Mount the new partition
124+
125+
Currently, your block device partition is not mounted:
126+
127+
```bash
128+
$ lsblk
129+
sdn 8:208 0 10,9T 0 disk
130+
└─sdn1 8:209 0 10,9T 0 part
131+
```
132+
133+
You can either restart your system to see that the auto-mounting (`/etc/fstab`) works, or
134+
you can trigger a command to mount all the `fstab-mentioned` partitions now:
135+
136+
137+
```bash
138+
$ mount --all
139+
$ lsblk
140+
sdn 8:208 0 10,9T 0 disk
141+
└─sdn1 8:209 0 10,9T 0 part /mnt/varasto/wernstrom
142+
```
143+
144+
Decide quota for Varasto
145+
------------------------
146+
147+
Varasto allows you to manage quota for each volume. Find out how much space your partition has:
148+
149+
```bash
150+
$ df --block-size=1 /mnt/varasto/wernstrom
151+
Filesystem 1B-blocks Used Available Use% Mounted on
152+
/dev/sdn1 11904442871808 128673338328 11775769533480 1% /mnt/varasto/wernstrom
153+
```
154+
155+
The output is in bytes. In Varasto you enter quota in MiB.
156+
157+
My volume after formatting has 10.71... TiB free, so I will round that down a bit and use
158+
11010048 MiB (10.5 TiB = 11010048 / 1024 / 1024) as my quota. I can increase the quota later.
159+
160+
60161
Do I need a dedicated partition for Varasto volume?
61162
---------------------------------------------------
62163

0 commit comments

Comments
 (0)