Skip to content

Instantly share code, notes, and snippets.

View abbbi's full-sized avatar
🖐️

Michael Ablassmeier abbbi

🖐️
View GitHub Profile
package main
import (
"fmt"
"log"
"time"
bps "github.com/elbandi/go-proxmox-backup-client"
)
@abbbi
abbbi / dirtybitmap
Last active October 17, 2023 15:45
nbdcopy
diff --git a/copy/main.c b/copy/main.c
index c0c9421..5da91bd 100644
--- a/copy/main.c
+++ b/copy/main.c
@@ -46,6 +46,8 @@
bool allocated; /* --allocated flag */
unsigned connections = 4; /* --connections */
+char* context = "base:allocation"; /* -- context */
+bool use_bitmap = false;
fs.com type switches, model S5850 run regular linux.
Secret command "start shell" can be used to spawn regular shell on switch for debugging.
Password for this: !@#
Example:
$ show version
FSOS Software, S5850, Version 7.2.1
Copyright (C) 2020 by FS.COM. All rights reserved.
Mr. Mackey booting linux 2.0 in latest southpark episode,
It seems they used the output of the example kernel
messages as provided here:
https://docstore.mik.ua/orelly/linux/run/ch05_03.htm
--
Console: 16 point font, 480 scans
Console: colour VGA+ 80x30, 1 virtual console (max 63)
pcibios_init : BIOS32 Service Directory structure at 0x000fb1d0
@abbbi
abbbi / streaming_tar.py
Created November 4, 2021 11:30
streaming_tar.py
#!/usr/bin/env python3
#
# Building a tar file chunk-by-chunk.
#
# This is a quick bit of sample code for streaming data to a tar file,
# building it piece-by-piece. The tarfile is built on-the-fly and streamed
# back out. This is useful for web applications that need to dynamically
# build a tar file without swamping the server.
import os
import sys
libvirt 5:
-drive file=/vm/ata2018/dc01.raw,format=raw,if=none,id=drive-virtio-disk0,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on
-drive file=/vm/ata2018/dc01-2.raw,format=raw,if=none,id=drive-virtio-disk1,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on
libvirt 7:
libvirt 5:
-drive file=/vm/ata2018/dc01.raw,format=raw,if=none,id=drive-virtio-disk0,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on
-drive file=/vm/ata2018/dc01-2.raw,format=raw,if=none,id=drive-virtio-disk1,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on
libvirt 7:
libvirt 5:
-drive file=/vm/ata2018/dc01.raw,format=raw,if=none,id=drive-virtio-disk0,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1,write-cache=on
-drive file=/vm/ata2018/dc01-2.raw,format=raw,if=none,id=drive-virtio-disk1,cache=none
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1,write-cache=on
libvirt 7:
--- libvirt5.xml 2021-06-30 11:33:12.796353471 +0200
+++ libvirt7.xml 2021-06-30 11:33:24.072141548 +0200
@@ -1,4 +1,4 @@
-<domain type='kvm' id='3'>
+<domain type='kvm'>
<name>dc01</name>
<uuid>1718d28f-00b9-4b1c-be6f-51ed3423bb8e</uuid>
<memory unit='KiB'>6291456</memory>
@@ -53,7 +53,6 @@
<backingStore/>