Compare commits

..

1 Commits

Author SHA1 Message Date
Kroese
c3e3b98211
Update reset.sh 2025-03-15 15:20:45 +01:00
4 changed files with 21 additions and 36 deletions

View File

@ -74,9 +74,7 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
- Start the container and connect to [port 5000](http://localhost:5000) using your web browser.
- Wait until DSM finishes its installation
- Choose an username and password, and you will be taken to the desktop.
- Wait until DSM is ready, choose an username and password, and you will be taken to the desktop.
Enjoy your brand new NAS, and don't forget to star this repo!
@ -105,7 +103,7 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
### How do I create a growable disk?
By default, the entire capacity of the disk will be reserved in advance.
By default, the entire capacity of the disk is reserved in advance.
To create a growable disk that only allocates space that is actually used, add the following environment variable:
@ -129,21 +127,20 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
### How do I pass-through a disk?
It is possible to pass-through a disk device directly, which can be useful when your host is a virtual machine, as it removes an extra layer and allows for easier management. For use with physical disks this method provides little advantage and is not recommended.
You can add the virtual device to your compose file like this:
It is possible to pass-through a disk device directly, by adding it to your compose file in this way:
```yaml
devices:
- /dev/disk/by-uuid/12345-12345-12345-12345-12345:/disk2
```
The device needs to be totally empty (without any partition table) otherwise DSM does not always format it into a volume.
Make sure to bind the disk via its UUID (obtainable via `lsblk -o name,uuid`) instead of its name (`/dev/sdc`), to prevent ever binding the wrong disk when the drive letters happen to change.
> [!IMPORTANT]
> The device needs to be totally empty (without any partition table) otherwise DSM does not always format it into a volume.
> [!CAUTION]
> Do NOT use this feature with the goal of sharing files from the host, they might all get lost without warning when DSM creates the volume.
> Do NOT use this feature with the goal of sharing files from the host, they will all be lost without warning when DSM creates the volume.
### How do I change the amount of CPU or RAM?
@ -259,7 +256,7 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
With this method, it is even possible to switch back and forth between versions while keeping your file data intact.
If you don't have internet access, it's also possible to skip the download by setting `URL` to:
If you don't have internet access, it's also possible to skip the download by setting URL to:
```yaml
environment:

View File

@ -141,12 +141,10 @@ createDisk() {
else
# Create an empty file
if ! fallocate -l "$DATA_SIZE" "$DISK_FILE" &>/dev/null; then
if ! fallocate -l -x "$DATA_SIZE" "$DISK_FILE"; then
if ! truncate -s "$DATA_SIZE" "$DISK_FILE"; then
rm -f "$DISK_FILE"
error "$FAIL" && exit 77
fi
if ! fallocate -l "$DATA_SIZE" "$DISK_FILE"; then
if ! truncate -s "$DATA_SIZE" "$DISK_FILE"; then
rm -f "$DISK_FILE"
error "$FAIL" && exit 77
fi
fi
@ -221,11 +219,9 @@ resizeDisk() {
else
# Resize file by allocating more space
if ! fallocate -l "$DATA_SIZE" "$DISK_FILE" &>/dev/null; then
if ! fallocate -l -x "$DATA_SIZE" "$DISK_FILE"; then
if ! truncate -s "$DATA_SIZE" "$DISK_FILE"; then
error "$FAIL" && exit 75
fi
if ! fallocate -l "$DATA_SIZE" "$DISK_FILE"; then
if ! truncate -s "$DATA_SIZE" "$DISK_FILE"; then
error "$FAIL" && exit 75
fi
fi
@ -300,10 +296,8 @@ convertDisk() {
if [[ "$ALLOCATE" != [Nn]* ]]; then
# Work around qemu-img bug
CUR_SIZE=$(stat -c%s "$TMP_FILE")
if ! fallocate -l "$CUR_SIZE" "$TMP_FILE" &>/dev/null; then
if ! fallocate -l -x "$CUR_SIZE" "$TMP_FILE"; then
if ! fallocate -l "$CUR_SIZE" "$TMP_FILE"; then
error "Failed to allocate $CUR_SIZE bytes for $DISK_DESC image $TMP_FILE"
fi
fi
fi
fi

View File

@ -328,12 +328,10 @@ if [[ "${FS,,}" == "btrfs" ]]; then
fi
fi
if ! fallocate -l "$SYSTEM_SIZE" "$SYSTEM" &>/dev/null; then
if ! fallocate -l -x "$SYSTEM_SIZE" "$SYSTEM"; then
if ! truncate -s "$SYSTEM_SIZE" "$SYSTEM"; then
rm -f "$SYSTEM"
error "Could not allocate file $SYSTEM for the system disk." && exit 98
fi
if ! fallocate -l "$SYSTEM_SIZE" "$SYSTEM"; then
if ! truncate -s "$SYSTEM_SIZE" "$SYSTEM"; then
rm -f "$SYSTEM"
error "Could not allocate file $SYSTEM for the system disk." && exit 98
fi
fi

View File

@ -68,10 +68,6 @@ CPU="${CPU// 8 Core/}"
CPU="${CPU// 16 Core/}"
CPU="${CPU// 32 Core/}"
CPU="${CPU// 64 Core/}"
CPU="${CPU//12th Gen /}"
CPU="${CPU//13th Gen /}"
CPU="${CPU//14th Gen /}"
CPU="${CPU//15th Gen /}"
CPU="${CPU// Processor/}"
CPU="${CPU// Quad core/}"
CPU="${CPU// Core TM/ Core}"