Outils pour utilisateurs

Outils du site


linux:installation:partitions_et_environnement

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
linux:installation:partitions_et_environnement [2022/09/03 11:46] – [Petit soucis avec les partitions /var et /home dont les disques n’étaient pas reconnus] tutospistolinux:installation:partitions_et_environnement [2022/09/03 12:30] (Version actuelle) – [Petit soucis avec les partitions /var et /home dont les disques n’étaient pas reconnus] tutospisto
Ligne 1: Ligne 1:
 +
 +
 ====== Pour les partitions ====== ====== Pour les partitions ======
 ===== DISQUE OS (80Go)  ===== ===== DISQUE OS (80Go)  =====
Ligne 21: Ligne 23:
  
 Your /var directory has filled up and you are left with with no free disk space available. This is a typical scenario which can be easily fixed by mounting your /var directory on different partition. Let’s get started by attaching new storage, partitioning and creating a desired file system. The exact steps may vary and are not part of this config article. Once ready obtain partition UUID of your new var partition eg. /dev/sdc1: Your /var directory has filled up and you are left with with no free disk space available. This is a typical scenario which can be easily fixed by mounting your /var directory on different partition. Let’s get started by attaching new storage, partitioning and creating a desired file system. The exact steps may vary and are not part of this config article. Once ready obtain partition UUID of your new var partition eg. /dev/sdc1:
-blkid | grep sdc1+<code bash>blkid | grep sdc1</code>
 <code bash> <code bash>
 /dev/sdc1: UUID="1de46881-1f49-440e-89dd-6c32592491a7" TYPE="ext4" PARTUUID="652a2fee-01"</code> /dev/sdc1: UUID="1de46881-1f49-440e-89dd-6c32592491a7" TYPE="ext4" PARTUUID="652a2fee-01"</code>
  
-mkdir /mnt/newvar +<code bash>mkdir /mnt/newvar 
-mount /dev/sdc1 /mnt/newvar+mount /dev/sdc1 /mnt/newvar</code>
  
 Confirm that it is mounted. Note, your output will be different: Confirm that it is mounted. Note, your output will be different:
-df -h /mnt/newvar+<code bash>df -h /mnt/newvar</code>
  
 Filesystem Size Used Avail Use% Mounted on /dev/sdc1 1.8T 1.6T 279G 85% /mnt/newvar Filesystem Size Used Avail Use% Mounted on /dev/sdc1 1.8T 1.6T 279G 85% /mnt/newvar
  
 Copy current /var data to the new location: Copy current /var data to the new location:
-rsync -aqxP /var/* /mnt/newvar+<code bash>rsync -aqxP /var/* /mnt/newvar</code>
  
 Unmount new partition: Unmount new partition:
-umount /mnt/newvar/  /mnt/var/+<code bash>umount /mnt/newvar/  /mnt/var/</code>
  
 Edit your /etc/fstab to include new partition and choosing a relevant file-system: Edit your /etc/fstab to include new partition and choosing a relevant file-system:
-UUID=1de46881-1f49-440e-89dd-6c32592491a7 /var        ext4    defaults        0       2+<code bash>UUID=1de46881-1f49-440e-89dd-6c32592491a7 /var        ext4    defaults        0       2</code>
  
 Reboot your system and you are done. Confirm that everything is working correctly and optionally remove old var directory by booting to some Live Linux system etc. Reboot your system and you are done. Confirm that everything is working correctly and optionally remove old var directory by booting to some Live Linux system etc.
 +
  
  
linux/installation/partitions_et_environnement.1662205579.txt.gz · Dernière modification : 2022/09/03 11:46 de tutospisto