diff --git a/lovetrains.org b/lovetrains.org index d0b0215..b39243a 100644 --- a/lovetrains.org +++ b/lovetrains.org @@ -2,6 +2,10 @@ #+TITLE: Trains, trains, trains WIP - [[https://www.interrail.eu/en/plan-your-trip/tips-and-tricks/rail-planner-app][railplanner]], the interrail app +- prenotazioni interrail: + + sito interrail + + b-europe funziona? + + trainplanet.com * Live information on trains live info su arrivi e partenze in base alla stazione: https://www.bahn.de/hilfe/view/pk/en/ticketbuchung/ris.shtml diff --git a/secretwiki/index.html b/secretwiki/index.html index d308d7f..1dee0f5 100644 --- a/secretwiki/index.html +++ b/secretwiki/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Lezzo secret wiki @@ -17,9 +17,9 @@

Ogni pagina è disponibile anche in org-mode sostituendo .org a.html.

-
-

Pagine

-
+
+

Pagine

+

Author: bparodi

-

Created: 2023-05-30 Tue 15:35

+

Created: 2023-06-02 Fri 22:50

Validate

diff --git a/secretwiki/index.org b/secretwiki/index.org index 0f243e3..de48bcd 100644 --- a/secretwiki/index.org +++ b/secretwiki/index.org @@ -9,3 +9,4 @@ Ogni pagina è disponibile anche in org-mode sostituendo .org a.html. - [[./sonarr.html][Sonarr]] - [[./ffmpeg.html][Appunti su ffmpeg]] - [[./raspi.html][Raspberry pi model table]] +- [[./qemu-libvirt.html][QEMU e libvirt - comandi utili]] diff --git a/secretwiki/qemu-libvirt.html b/secretwiki/qemu-libvirt.html new file mode 100644 index 0000000..051a7c9 --- /dev/null +++ b/secretwiki/qemu-libvirt.html @@ -0,0 +1,128 @@ + + + + + + + +Lezzo secret wiki + + + + + +
+

[ Lezzo secret wiki ]

+
+

~ QEMU e libvirt - comandi utili

+
+
+
+

Incrementa il disco virtuale della VM

+
+

+A macchina spenta, supponendo che l'immagine si chiami "macchina.qcow2": +

+
+root@hypervisor # qemu-img resize /var/lib/libvirt/images/macchina.qcow2 +10G
+
+

+Poi bisogna usare resize2fs /dev/vda1, probabilmente rifacendo anche la +partizione tramite fdisk. Un esempio: +

+
+root@orazio ~# fdisk /dev/vda -l
+Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disklabel type: gpt
+Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
+
+Device       Start      End  Sectors  Size Type
+/dev/vda1     2048  1050623  1048576  512M BIOS boot
+/dev/vda2  1050624 50331614 49280991 23.5G Linux filesystem
+
+

+Nota come Disk /dev/vda: 60 GiB ma /dev/vda2 ... 23.5G. +

+
+root@orazio ~# fdisk /dev/vda 
+
+Welcome to fdisk (util-linux 2.38.1).
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+This disk is currently in use - repartitioning is probably a bad idea.
+It's recommended to umount all file systems, and swapoff all swap
+partitions on this disk.
+
+
+Command (m for help): d 
+Partition number (1,2, default 2): 2
+
+Partition 2 has been deleted.
+
+Command (m for help): p
+Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 512 bytes
+I/O size (minimum/optimal): 512 bytes / 512 bytes
+Disklabel type: gpt
+Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E
+
+Device     Start     End Sectors  Size Type
+/dev/vda1   2048 1050623 1048576  512M BIOS boot
+
+Command (m for help): n
+Partition number (2-128, default 2): 
+First sector (1050624-125829086, default 1050624): 
+Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-125829086, default 125827071): 
+
+Created a new partition 2 of type 'Linux filesystem' and of size 59.5 GiB.
+Partition #2 contains a ext4 signature.
+
+Do you want to remove the signature? [Y]es/[N]o: n
+
+Command (m for help): w
+
+The partition table has been altered.
+Syncing disks.
+
+root@orazio ~# resize2fs /dev/vda2
+resize2fs 1.47.0 (5-Feb-2023)
+Filesystem at /dev/vda2 is mounted on /; on-line resizing required
+old_desc_blocks = 3, new_desc_blocks = 8
+The filesystem on /dev/vda2 is now 15597056 (4k) blocks long.
+
+

+Potrebbe anche presentarsi questo errore: +

+
+root@orazio ~ # fdisk /dev/vda
+
+Welcome to fdisk (util-linux 2.38.1).
+Changes will remain in memory only, until you decide to write them.
+Be careful before using the write command.
+
+GPT PMBR size mismatch (50331647 != 125829119) will be corrected by write.
+The backup GPT table is not on the end of the device. This problem will be corrected by write.
+This disk is currently in use - repartitioning is probably a bad idea.
+It's recommended to umount all file systems, and swapoff all swap
+partitions on this disk.
+
+

+In tal caso semplicemente riscrivi la tavola premendo w e ricomincia la procedura. +

+
+
+
+
+
+

Author: bparodi

+

Created: 2023-06-02 Fri 23:16

+

Validate

+
+ + diff --git a/secretwiki/qemu-libvirt.org b/secretwiki/qemu-libvirt.org new file mode 100644 index 0000000..a7836c2 --- /dev/null +++ b/secretwiki/qemu-libvirt.org @@ -0,0 +1,87 @@ +#+INCLUDE: header.org +* *~* QEMU e libvirt - comandi utili +** Incrementa il disco virtuale della VM +A macchina spenta, supponendo che l'immagine si chiami "macchina.qcow2": +#+begin_src +root@hypervisor # qemu-img resize /var/lib/libvirt/images/macchina.qcow2 +10G +#+end_src +Poi bisogna usare ~resize2fs /dev/vda1~, probabilmente rifacendo anche la +partizione tramite fdisk. Un esempio: +#+begin_src +root@orazio ~# fdisk /dev/vda -l +Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: gpt +Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E + +Device Start End Sectors Size Type +/dev/vda1 2048 1050623 1048576 512M BIOS boot +/dev/vda2 1050624 50331614 49280991 23.5G Linux filesystem +#+end_src +Nota come ~Disk /dev/vda: 60 GiB~ ma ~/dev/vda2 ... 23.5G~. +#+begin_src +root@orazio ~# fdisk /dev/vda + +Welcome to fdisk (util-linux 2.38.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +This disk is currently in use - repartitioning is probably a bad idea. +It's recommended to umount all file systems, and swapoff all swap +partitions on this disk. + + +Command (m for help): d +Partition number (1,2, default 2): 2 + +Partition 2 has been deleted. + +Command (m for help): p +Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: gpt +Disk identifier: 8E12E056-0076-4C2C-AC88-51E48D3D105E + +Device Start End Sectors Size Type +/dev/vda1 2048 1050623 1048576 512M BIOS boot + +Command (m for help): n +Partition number (2-128, default 2): +First sector (1050624-125829086, default 1050624): +Last sector, +/-sectors or +/-size{K,M,G,T,P} (1050624-125829086, default 125827071): + +Created a new partition 2 of type 'Linux filesystem' and of size 59.5 GiB. +Partition #2 contains a ext4 signature. + +Do you want to remove the signature? [Y]es/[N]o: n + +Command (m for help): w + +The partition table has been altered. +Syncing disks. + +root@orazio ~# resize2fs /dev/vda2 +resize2fs 1.47.0 (5-Feb-2023) +Filesystem at /dev/vda2 is mounted on /; on-line resizing required +old_desc_blocks = 3, new_desc_blocks = 8 +The filesystem on /dev/vda2 is now 15597056 (4k) blocks long. +#+end_src +Potrebbe anche presentarsi questo errore: +#+begin_src +root@orazio ~ # fdisk /dev/vda + +Welcome to fdisk (util-linux 2.38.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +GPT PMBR size mismatch (50331647 != 125829119) will be corrected by write. +The backup GPT table is not on the end of the device. This problem will be corrected by write. +This disk is currently in use - repartitioning is probably a bad idea. +It's recommended to umount all file systems, and swapoff all swap +partitions on this disk. +#+end_src +In tal caso semplicemente riscrivi la tavola premendo ~w~ e ricomincia la procedura.