Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
articles:linux_mount [2024/07/25 16:33] – [Tableau] frater | articles:linux_mount [2024/10/01 20:20] (Version actuelle) – [Mount windows Network Share] frater | ||
---|---|---|---|
Ligne 39: | Ligne 39: | ||
root@hades-vm: | root@hades-vm: | ||
root@hades-vm: | root@hades-vm: | ||
+ | </ | ||
+ | |||
+ | ===== Monter une image disque qcow2 (qemu) ===== | ||
+ | |||
+ | Comme le format '' | ||
+ | |||
+ | <WRAP center round info > | ||
+ | On Linux, network block device ('' | ||
+ | </ | ||
+ | |||
+ | nous allons donc monter notre image qcow2, sur un device nbd; mais avant il convient de paramétrer un peu le device que nous allons utiliser; notamment en augmentant le nombre de partitions par device à 8 (qui est par défaut à 0); par défaut nbd créé 16 device, ce qui est beaucoup; nous allons nous limiter à 2 devices. | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | root@pve02: | ||
+ | root@pve02: | ||
+ | brw-rw---- 1 root disk 43, 0 Jul 31 23:19 /dev/nbd0 | ||
+ | brw-rw---- 1 root disk 43, 32 Jul 31 23:19 /dev/nbd1 | ||
+ | </ | ||
+ | |||
+ | Une fois nos devices créer, on peut y connecter notre image '' | ||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | </ | ||
+ | pour vérifier que la connection est effective, on va lister les partitions: | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | Disk /dev/nbd0: 64 GiB, 68719476736 bytes, 134217728 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disklabel type: gpt | ||
+ | Disk identifier: 036E89F2-400F-4BB8-B1D5-58FF2850708F | ||
+ | |||
+ | Device | ||
+ | / | ||
+ | / | ||
+ | /dev/nbd0p3 1126912 | ||
+ | /dev/nbd0p4 1159168 134215679 133056512 63.4G Microsoft basic data | ||
+ | /dev/nbd0p5 1126400 | ||
+ | |||
+ | Partition table entries are not in disk order. | ||
+ | </ | ||
+ | |||
+ | Si fdisk affiche des partitions, comme pour un disque, c'est gagné; il suffit de //monter// la/les partitions voulues via la commande '' | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | </ | ||
+ | |||
+ | on peut ensuite gérer les fichiers/ | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | total 9.3G | ||
+ | dr-x------ 1 root root 4.0K Jul 28 18:11 . | ||
+ | drwxr-xr-x 4 root root 4.0K Jul 31 21:51 .. | ||
+ | dr-x------ 1 root root 0 Jun 17 2022 ' | ||
+ | -r-------- 1 root root 381K Feb 2 2018 bootmgr | ||
+ | -r-------- 1 root root 1 Jul 16 2016 BOOTNXT | ||
+ | dr-x------ 1 root root 0 Jun 17 2022 ' | ||
+ | -r-------- 1 root root 8.0G Jul 28 17:30 hiberfil.sys | ||
+ | dr-x------ 1 root root 0 Jul 3 2022 inetpub | ||
+ | -r-------- 1 root root 1.3G Jul 28 17:30 pagefile.sys | ||
+ | dr-x------ 1 root root 0 Jun 18 2022 PerfLogs | ||
+ | dr-x------ 1 root root 4.0K Jul 25 23:23 ProgramData | ||
+ | dr-x------ 1 root root 8.0K Jul 25 23:23 ' | ||
+ | dr-x------ 1 root root 4.0K Jul 26 15:06 ' | ||
+ | dr-x------ 1 root root 4.0K Jul 3 2022 Python26 | ||
+ | dr-x------ 1 root root 0 Jun 17 2022 Recovery | ||
+ | dr-x------ 1 root root 4.0K Aug 21 2022 ' | ||
+ | dr-x------ 1 root root 4.0K Jul 3 2022 Users | ||
+ | dr-x------ 1 root root 24K May 20 2023 Windows | ||
+ | </ | ||
+ | |||
+ | Pour libérer l' | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
+ | root@pve02: | ||
+ | /dev/nbd0 disconnected | ||
+ | </ | ||
+ | |||
+ | si vous n'avez pas d' | ||
+ | |||
+ | <cli bash> | ||
+ | root@pve02: | ||
</ | </ | ||
Ligne 189: | Ligne 277: | ||
il faut ensuite ajouter cette ligne à la fin du fichier: | il faut ensuite ajouter cette ligne à la fin du fichier: | ||
< | < | ||
- | [SERVER.DOMAIN.LOCAL]/ | + | //[SERVER.DOMAIN.LOCAL]/ |
</ | </ | ||