« Remplacement d'un disque système ZFS sous Proxmox » : différence entre les versions

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
 
(5 versions intermédiaires par le même utilisateur non affichées)
Ligne 11 : Ligne 11 :
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sgdisk /dev/sdb -R /dev/sda
sgdisk /dev/sdb -R /dev/sda
</syntaxhighlight>''# sgdisk -G <new device>''<blockquote>sgdisk -G /dev/sda</blockquote>
</syntaxhighlight>


* Identification du disque :
   ls /dev/disk/by-id


''# sgdisk -G <new device>''<syntaxhighlight lang="bash">
sgdisk -G /dev/sda
</syntaxhighlight>
* Identification du disque
<syntaxhighlight lang="bash">
ls /dev/disk/by-id
</syntaxhighlight>
* Remplacement de l'ancien disque dans le pool ZFS
* Remplacement de l'ancien disque dans le pool ZFS


''# zpool replace -f <pool> <old zfs partition> <new zfs partition>''<blockquote>zpool replace -f rpool "oldpartition" /dev/sda3</blockquote>ou<blockquote>zpool replace -f rpool "oldpartition" /dev/disk/by-id/"ID du Disque" </blockquote>
''# zpool replace -f <pool> <old zfs partition> <new zfs partition>''<syntaxhighlight lang="bash">
 
zpool replace -f rpool "oldpartition" /dev/sda3
</syntaxhighlight>ou<syntaxhighlight lang="bash">
zpool replace -f rpool "oldpartition" /dev/disk/by-id/"ID du Disque"
</syntaxhighlight>
* Etat du pool ZFS
* Etat du pool ZFS
<syntaxhighlight lang="bash">
zpool status
</syntaxhighlight>
* Vérification des partitions sur le nouveau disque
<syntaxhighlight lang="bash">
fdisk /dev/sda >> p
</syntaxhighlight>


<blockquote>zpool status</blockquote>


* Vérification des partitions sur le nouveau disque
* Création de la zone d'amorce sur le nouveau disque


<blockquote>fdisk /dev/sda >> p</blockquote>
''# proxmox-boot-tool format <new disk's ESP>''<syntaxhighlight lang="bash">
proxmox-boot-tool format /dev/sda2
</syntaxhighlight>ou <syntaxhighlight lang="bash">
proxmox-boot-tool format /dev/disk/by-id/"ID du Disque"
</syntaxhighlight>


* Création de la zone d'amorce sur le nouveau disque
''# proxmox-boot-tool init <new disk's ESP>''<syntaxhighlight lang="bash">
proxmox-boot-tool init /dev/sda2
</syntaxhighlight>ou <syntaxhighlight lang="bash">
proxmox-boot-tool init /dev/disk/by-id/"ID du Disque"
</syntaxhighlight>
[[Catégorie:Proxmox]]
[[Catégorie:ZFS]]
[[Catégorie:Linux]]


''# proxmox-boot-tool format <new disk's ESP>''<blockquote>proxmox-boot-tool format /dev/sda2</blockquote>ou <blockquote>proxmox-boot-tool format /dev/disk/by-id/"ID du Disque" </blockquote>


‎<html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
‎</html>


''# proxmox-boot-tool init <new disk's ESP>''<blockquote>proxmox-boot-tool init /dev/sda2</blockquote>ou <blockquote>proxmox-boot-tool init /dev/disk/by-id/"ID du Disque"</blockquote>
<html>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
</html>

Dernière version du 17 février 2025 à 14:38

Exemple : le disque /dev/sda est HS

  • Etat du pool ZFS
zpool status
  • Préparation des partitions ZFS sur le nouveau disque

# sgdisk <healthy bootable device> -R <new device>

sgdisk /dev/sdb -R /dev/sda


# sgdisk -G <new device>

sgdisk -G /dev/sda
  • Identification du disque
ls /dev/disk/by-id
  • Remplacement de l'ancien disque dans le pool ZFS

# zpool replace -f <pool> <old zfs partition> <new zfs partition>

zpool replace -f rpool "oldpartition" /dev/sda3

ou

zpool replace -f rpool "oldpartition" /dev/disk/by-id/"ID du Disque"
  • Etat du pool ZFS
zpool status
  • Vérification des partitions sur le nouveau disque
fdisk /dev/sda >> p


  • Création de la zone d'amorce sur le nouveau disque

# proxmox-boot-tool format <new disk's ESP>

proxmox-boot-tool format /dev/sda2

ou

proxmox-boot-tool format /dev/disk/by-id/"ID du Disque"

# proxmox-boot-tool init <new disk's ESP>

proxmox-boot-tool init /dev/sda2

ou

proxmox-boot-tool init /dev/disk/by-id/"ID du Disque"


compteur web gratuit sans pub