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
elearning:workbooks:lpic:21:450:l104 [2022/10/07 09:55] adminelearning:workbooks:lpic:21:450:l104 [2022/11/01 07:26] (Version actuelle) admin
Ligne 5: Ligne 5:
 Updated : ~~LASTMOD~~ Updated : ~~LASTMOD~~
  
-======Topic 4: Filesystem and Devices======+======Topic 203: Filesystem and Devices======
  
-FIXME: Add smartd\\ +  * **Topic 203: Filesystem and Devices**
-FIXME: Add autofs\\ +
- +
-=====Contenu du Module===== +
- +
-  * **LCF401 - Système de Fichiers** +
-    Contenu du Module+
     * LAB #1 - Linux File Hierarchy System     * LAB #1 - Linux File Hierarchy System
       * 1.1 - Types de Fichiers       * 1.1 - Types de Fichiers
Ligne 22: Ligne 16:
     * Périphériques de stockage     * Périphériques de stockage
     * Partitions     * Partitions
-    * Partitionnement +    * LAB #2 - Partitionnement de votre Disque avec fdisk
-      * LAB #2 - Partitionnement de votre Disque avec fdisk +
-      * LAB #3 - Modifier les Drapeaux des Partitions avec fdisk+
     * Systèmes de Fichiers Journalisés     * Systèmes de Fichiers Journalisés
       * Présentation       * Présentation
       * Ext3       * Ext3
         * Gestion d'Ext3         * Gestion d'Ext3
-        * LAB #- Convertir un Système de Fichiers Ext3 en Ext2 +        * LAB #- Convertir un Système de Fichiers Ext3 en Ext2 
-        * LAB #- Convertir un Système de Fichiers Ext2 en Ext3 +        * LAB #- Convertir un Système de Fichiers Ext2 en Ext3 
-        * LAB #- Placer le Journal sur un autre Partition +        * LAB #- Placer le Journal sur un autre Partition 
-        * LAB #- Modifier la Fréquence de Vérification du Système de Fichiers Ext3+        * LAB #- Modifier la Fréquence de Vérification du Système de Fichiers Ext3
       * Ext4       * Ext4
-        * LAB #- Créer un Système de Fichiers Ext4 +        * LAB #- Créer un Système de Fichiers Ext4 
-        * LAB #- Ajouter une Étiquette au Système de Fichiers Ext4 +        * LAB #- Ajouter une Étiquette au Système de Fichiers Ext4 
-        * LAB #10 - Convertir un Système de Fichiers Ext3 en Ext4+        * LAB #- Convertir un Système de Fichiers Ext3 en Ext4
       * XFS       * XFS
-        * LAB #11 - Créer un Système de Fichiers XFS +        * LAB #10 - Créer un Système de Fichiers XFS 
-        * LAB #12 - Ajouter une Étiquette au Système de Fichiers XFS +        * LAB #11 - Ajouter une Étiquette au Système de Fichiers XFS 
-      * Autres Systèmes de Fichiers +      * ReiserFS 
-        * ReiserFS +        * LAB #12 - Créer un Système de Fichiers ReiserFS 
-        * JFS +        * LAB #13 - Ajouter une Étiquette au Système de Fichiers ReiserFS 
-        * Btrfs+      * JFS 
 +        * LAB #14 - Créer un Système de Fichiers JFS 
 +        * LAB #15 - Ajouter une Étiquette au Système de Fichiers JFS 
 +      * Btrfs 
 +        * LAB #16 - Créer un Système de Fichiers Btrfs 
 +        * LAB #17 - Convertir un Système de Fichiers Ext4 en Brtfs 
 +        * LAB #18 - Créer un Snapshot 
 +        * LAB #19 - Ajouter une Étiquette au Système de Fichiers Btrfs
       * Comparaison des Commandes par Système de Fichiers       * Comparaison des Commandes par Système de Fichiers
-    * LAB #13 - Créer un Système de Fichiers ISO +    * Systèmes de Fichiers Chiffrés 
-      * La Commande mkisofs+      * LAB #20 - Créer un Système de Fichiers Chiffré avec encryptfs 
 +      * LAB #21 - Créer un Système de Fichiers Chiffré avec LUKS 
 +    * Le Swap 
 +      * Taille du swap 
 +      * Partitions de swap 
 +      * La Commande swapon 
 +      * La Commande swapoff 
 +      * LAB #22 - Créer un Fichier de Swap 
 +    * LAB #23 - Commandes Diverses 
 +      * La Commande sync 
 +      * La Commande fstrim 
 +      * La Daemon smartd
  
 =====LAB #1 - Linux File Hierarchy System===== =====LAB #1 - Linux File Hierarchy System=====
Ligne 53: Ligne 63:
  
 <code> <code>
-[trainee@centos8 ~]$ cd / +trainee@debian11:~$ cd / 
-[trainee@centos8 /]$ ls -l +trainee@debian11:/$ ls -l 
-total 18 +total 60 
-lrwxrwxrwx  1 root root    May 10  2019 bin -> usr/bin +lrwxrwxrwx   1 root root     Apr 25 06:26 bin -> usr/bin 
-dr-xr-xr-x  root root 1024 May  8 08:14 boot +drwxr-xr-x   root root  4096 Apr 25 06:54 boot 
-drwxr-xr-x 19 root root 3020 Sep  6 07:59 dev +drwxr-xr-x  17 root root  3240 May 10 14:37 dev 
-drwxr-xr-x.  91 root root 8192 Sep  6 07:59 etc +drwxr-xr-x 112 root root  4096 May 10 14:37 etc 
-drwxr-xr-x  3 root root   21 May  07:42 home +drwxr-xr-x   3 root root  4096 Apr 25 07:01 home 
-lrwxrwxrwx.   1 root root    7 May 10  2019 lib -> usr/lib +lrwxrwxrwx   1 root root    31 Apr 25 06:31 initrd.img -> boot/initrd.img-5.10.0-13-amd64 
-lrwxrwxrwx  1 root root    May 10  2019 lib64 -> usr/lib64 +lrwxrwxrwx   1 root root    31 Apr 25 06:31 initrd.img.old -> boot/initrd.img-5.10.0-13-amd64 
-drwxr-xr-x  root root    6 May 10  2019 media +lrwxrwxrwx   1 root root     7 Apr 25 06:26 lib -> usr/lib 
-drwxr-xr-x  2 root root    6 May 10  2019 mnt +lrwxrwxrwx   1 root root     Apr 25 06:26 lib32 -> usr/lib32 
-drwxr-xr-x  2 root root    6 May 10  2019 opt +lrwxrwxrwx   1 root root     9 Apr 25 06:26 lib64 -> usr/lib64 
-dr-xr-xr-x. 126 root root    Sep  6 07:59 proc +lrwxrwxrwx   1 root root    10 Apr 25 06:26 libx32 -> usr/libx32 
-dr-xr-x---  root root  135 Sep  1 11:10 root +drwx------   2 root root 16384 Apr 25 06:26 lost+found 
-drwxr-xr-x 29 root root  860 Sep  6 08:00 run +drwxr-xr-x   root root  4096 Apr 25 06:26 media 
-lrwxrwxrwx  1 root root    May 10  2019 sbin -> usr/sbin +drwxr-xr-x   2 root root  4096 Apr 25 06:27 mnt 
-drwxr-xr-x  2 root root    6 May 10  2019 srv +drwxr-xr-x   2 root root  4096 Apr 25 06:27 opt 
-dr-xr-xr-x 13 root root    Sep  6 07:59 sys +dr-xr-xr-x 166 root root     May 10 14:37 proc 
-drwxrwxrwt.   root root  172 Sep  6 08:00 tmp +drwx------   root root  4096 Apr 25 07:05 root 
-drwxr-xr-x 12 root root  144 May  8 07:38 usr +drwxr-xr-x  24 root root   660 May 10 14:37 run 
-drwxr-xr-x 21 root root 4096 May  8 08:13 var+lrwxrwxrwx   1 root root     Apr 25 06:26 sbin -> usr/sbin 
 +drwxr-xr-x   2 root root  4096 Apr 25 06:27 srv 
 +dr-xr-xr-x  13 root root     May 10 14:37 sys 
 +drwxrwxrwt  10 root root  4096 May 10 14:37 tmp 
 +drwxr-xr-x  14 root root  4096 Apr 25 06:27 usr 
 +drwxr-xr-x  11 root root  4096 Apr 25 06:27 var 
 +lrwxrwxrwx   1 root root    28 Apr 25 06:31 vmlinuz -> boot/vmlinuz-5.10.0-13-amd64 
 +lrwxrwxrwx   1 root root    28 Apr 25 06:31 vmlinuz.old -> boot/vmlinuz-5.10.0-13-amd64
 </code> </code>
  
-  * **/bin** : est une abréviation de //**bin**ary// ou binaires. Il contient des programmes tels ls. Sous CentOS 8 il s'agit d'un lien symbolique qui pointe vers /usr/bin. +  * **/bin** : est une abréviation de //**bin**ary// ou binaires. Il contient des programmes tels ls. Sous Debian 11 il s'agit d'un lien symbolique qui pointe vers /usr/bin. 
   * **/boot** : contient les fichiers nécessaires au démarrage du système.    * **/boot** : contient les fichiers nécessaires au démarrage du système. 
   * **/dev** : contient les nœuds utilisés pour accéder à tout type de matériel tel /dev/fd0 pour le lecteur de disquette. C'est le binaire //udev// qui se charge de créer et supprimer d'une manière dynamique les nœuds.   * **/dev** : contient les nœuds utilisés pour accéder à tout type de matériel tel /dev/fd0 pour le lecteur de disquette. C'est le binaire //udev// qui se charge de créer et supprimer d'une manière dynamique les nœuds.
   * **/etc** : contient des fichiers de configuration tels passwd pour les mots de passe et fstab qui est la liste des systèmes de fichiers à monter lors du démarrage du système.    * **/etc** : contient des fichiers de configuration tels passwd pour les mots de passe et fstab qui est la liste des systèmes de fichiers à monter lors du démarrage du système. 
   * **/home** : contient les répertoires de chaque utilisateur sauf l’utilisateur root.    * **/home** : contient les répertoires de chaque utilisateur sauf l’utilisateur root. 
-  * **/lib** : contient les bibliothèques 32 bits communes utilisées par les programmes ainsi que les modules. Sous CentOS 8 il s'agit d'un lien symbolique qui pointe vers /usr/lib.   +  * **/lib** : contient les bibliothèques 32 bits communes utilisées par les programmes ainsi que les modules. Sous Debian 11 il s'agit d'un lien symbolique qui pointe vers /usr/lib.   
-  * **/lib64** : contient les bibliothèques 64 bits communes utilisées par les programmes ainsi que les modules. Sous CentOS 8 il s'agit d'un lien symbolique qui pointe vers /usr/lib64. +  * **/lib64** : contient les bibliothèques 64 bits communes utilisées par les programmes ainsi que les modules. Sous Debian 11 il s'agit d'un lien symbolique qui pointe vers /usr/lib64. 
   * **/media** : contient des répertoires pour chaque système de fichiers monté ( accessible au système linux ) tels floppy, cdrom etc.    * **/media** : contient des répertoires pour chaque système de fichiers monté ( accessible au système linux ) tels floppy, cdrom etc. 
   * **/mnt** : contient des répertoires pour chaque système de fichiers monté temporairement par root.   * **/mnt** : contient des répertoires pour chaque système de fichiers monté temporairement par root.
Ligne 90: Ligne 107:
   * **/root** : le home de root, l’administrateur système.   * **/root** : le home de root, l’administrateur système.
   * **/run** : remplace le répertoire /var/run.   * **/run** : remplace le répertoire /var/run.
-  * **/sbin** : contient des binaires, donc programmes, pour l’administration du système local.  Sous CentOS 8 il s'agit d'un lien symbolique qui pointe vers /usr/sbin.+  * **/sbin** : contient des binaires, donc programmes, pour l’administration du système local.  Sous Debian 11 il s'agit d'un lien symbolique qui pointe vers /usr/sbin.
   * **/srv** : contient des données pour les **s**e**r****v**ices hébergés par le système tels ftp, bases de données, web etc.   * **/srv** : contient des données pour les **s**e**r****v**ices hébergés par le système tels ftp, bases de données, web etc.
   * **/sys** : contient un système de fichiers virtuel dont le rôle est de décrire le matériel pour udev.   * **/sys** : contient un système de fichiers virtuel dont le rôle est de décrire le matériel pour udev.
Ligne 122: Ligne 139:
  
 ou **/dev/<fichier_spécial>** est le périphérique à monter et **/mnt/<répertoire_cible>** est le répertoire qui servira comme «fenêtre» pour visionner le contenu du système de fichiers. Ce répertoire doit impérativement exister avant d’essayer de monter le système de fichiers. ou **/dev/<fichier_spécial>** est le périphérique à monter et **/mnt/<répertoire_cible>** est le répertoire qui servira comme «fenêtre» pour visionner le contenu du système de fichiers. Ce répertoire doit impérativement exister avant d’essayer de monter le système de fichiers.
 +
 +<WRAP center round todo>
 +**A faire** : Connectez-vous à votre machine virtuelle en tant que **trainee** avec le mot de passe **trainee**. Ouvrez un terminal via les menus **Applications > Favorites > Terminal**. Tapez la commande **su -** et appuyez sur la touche <key>Entrée</key>. Indiquez le mot de passe **fenestros**. Vous êtes maintenant connecté en tant que l'administrateur **root** et vous pouvez reproduire les exemples qui suivent.
 +</WRAP>
  
 Dans le cas où la commande **mount** est utilisée sans options, le système retourne une liste de tous les systèmes de fichiers actuellement montés : Dans le cas où la commande **mount** est utilisée sans options, le système retourne une liste de tous les systèmes de fichiers actuellement montés :
  
 <code> <code>
-[trainee@centos8 /]$ su -+trainee@debian11:/$ su -
 Password: fenestros Password: fenestros
-[root@centos8 ~]# mount +root@debian11:~# mount 
-sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)+sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
 proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
-devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1881944k,nr_inodes=470486,mode=755)+udev on /dev type devtmpfs (rw,nosuid,relatime,size=1989872k,nr_inodes=497468,mode=755
 +devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) 
 +tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=402560k,mode=755) 
 +/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro)
 securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
-tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) +tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) 
-devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000+tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k
-tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755) +cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
-tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755+pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd+none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) 
-pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel+systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10999
-bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) +tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,devices) +mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,net_cls,net_prio) +debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,memory+hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M
-cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuset+configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,pids+fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) 
-cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpu,cpuacct+tmpfs on /run/user/113 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=113,gid=121
-cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,perf_event) +tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=1000,gid=1000)
-cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,blkio) +
-cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,hugetlb) +
-cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,freezer) +
-cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,rdma) +
-none on /sys/kernel/tracing type tracefs (rw,relatime,seclabel+
-configfs on /sys/kernel/config type configfs (rw,relatime) +
-/dev/mapper/cl_centos8-root on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota) +
-selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime+
-systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=3826) +
-mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel) +
-debugfs on /sys/kernel/debug type debugfs (rw,relatime,seclabel) +
-hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M+
-fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) +
-/dev/sda1 on /boot type ext4 (rw,relatime,seclabel) +
-sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) +
-tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=382500k,mode=700,uid=1000,gid=1000+
-tmpfs on /run/user/42 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=382500k,mode=700,uid=42,gid=42) +
-gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)+
 </code> </code>
  
Ligne 170: Ligne 176:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/mtab +root@debian11:~# cat /etc/mtab 
-sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0+sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
-devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=1881944k,nr_inodes=470486,mode=755 0 0+udev /dev devtmpfs rw,nosuid,relatime,size=1989872k,nr_inodes=497468,mode=755 0 0 
 +devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 
 +tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=402560k,mode=755 0 0 
 +/dev/sda1 / ext4 rw,relatime,errors=remount-ro 0 0
 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
-tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0 +tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 
-devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 +tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 
-tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0 +cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 
-tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0 +pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/systemd cgroup rw,seclabel,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 +none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 
-pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0 +systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10999 0 0 
-bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 +tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/devices cgroup rw,seclabel,nosuid,nodev,noexec,relatime,devices 0 0 +mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 +debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/memory cgroup rw,seclabel,nosuid,nodev,noexec,relatime,memory +hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0 
-cgroup /sys/fs/cgroup/cpuset cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpuset 0 0 +configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/pids cgroup rw,seclabel,nosuid,nodev,noexec,relatime,pids 0 0 +fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 +tmpfs /run/user/113 tmpfs rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=113,gid=121 0 0 
-cgroup /sys/fs/cgroup/perf_event cgroup rw,seclabel,nosuid,nodev,noexec,relatime,perf_event 0 0 +tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=1000,gid=1000 0 0
-cgroup /sys/fs/cgroup/blkio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,blkio 0 0 +
-cgroup /sys/fs/cgroup/hugetlb cgroup rw,seclabel,nosuid,nodev,noexec,relatime,hugetlb 0 0 +
-cgroup /sys/fs/cgroup/freezer cgroup rw,seclabel,nosuid,nodev,noexec,relatime,freezer 0 0 +
-cgroup /sys/fs/cgroup/rdma cgroup rw,seclabel,nosuid,nodev,noexec,relatime,rdma 0 0 +
-none /sys/kernel/tracing tracefs rw,seclabel,relatime 0 0 +
-configfs /sys/kernel/config configfs rw,relatime 0 0 +
-/dev/mapper/cl_centos8-root / xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 +
-selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 +
-systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=3826 0 0 +
-mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 +
-debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0 +
-hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime,pagesize=2M 0 0 +
-fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0 +
-/dev/sda1 /boot ext4 rw,seclabel,relatime 0 0 +
-sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 +
-tmpfs /run/user/1000 tmpfs rw,seclabel,nosuid,nodev,relatime,size=382500k,mode=700,uid=1000,gid=1000 0 0 +
-tmpfs /run/user/42 tmpfs rw,seclabel,nosuid,nodev,relatime,size=382500k,mode=700,uid=42,gid=42 0 0 +
-gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0+
 </code> </code>
  
-ainsi que dans le fichier **/proc/mounts** :+et aussi dans le fichier **/proc/mounts** :
  
 <code> <code>
-[root@centos8 ~]# cat /proc/mounts  +root@debian11:~# cat /proc/mounts  
-sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0+sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
-devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=1882840k,nr_inodes=470710,mode=755 0 0+udev /dev devtmpfs rw,nosuid,relatime,size=8173092k,nr_inodes=2043273,mode=755 0 0 
 +devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 
 +tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,size=1639204k,mode=755 0 0 
 +/dev/sda1 / ext4 rw,relatime,errors=remount-ro 0 0
 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0 securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
-tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0 +tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0 
-devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0 +tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0 
-tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0 +cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0 
-tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0 +pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/systemd cgroup rw,seclabel,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0 +none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 
-pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0 +systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15277 0 0 
-bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0 +debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0 +fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/rdma cgroup rw,seclabel,nosuid,nodev,noexec,relatime,rdma 0 0 +mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/memory cgroup rw,seclabel,nosuid,nodev,noexec,relatime,memory +tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/hugetlb cgroup rw,seclabel,nosuid,nodev,noexec,relatime,hugetlb 0 0 +hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0 
-cgroup /sys/fs/cgroup/freezer cgroup rw,seclabel,nosuid,nodev,noexec,relatime,freezer 0 0 +configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0 +tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=1639200k,nr_inodes=409800,mode=700,uid=1000,gid=1000 0 0 
-cgroup /sys/fs/cgroup/pids cgroup rw,seclabel,nosuid,nodev,noexec,relatime,pids 0 0 +binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0 
-cgroup /sys/fs/cgroup/blkio cgroup rw,seclabel,nosuid,nodev,noexec,relatime,blkio 0 0 +tmpfs /run/user/113 tmpfs rw,nosuid,nodev,relatime,size=1639200k,nr_inodes=409800,mode=700,uid=113,gid=121 0 0
-cgroup /sys/fs/cgroup/cpuset cgroup rw,seclabel,nosuid,nodev,noexec,relatime,cpuset 0 0 +
-cgroup /sys/fs/cgroup/perf_event cgroup rw,seclabel,nosuid,nodev,noexec,relatime,perf_event 0 0 +
-cgroup /sys/fs/cgroup/devices cgroup rw,seclabel,nosuid,nodev,noexec,relatime,devices 0 0 +
-none /sys/kernel/tracing tracefs rw,seclabel,relatime 0 0 +
-configfs /sys/kernel/config configfs rw,relatime 0 0 +
-/dev/mapper/cl_centos8-root / xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0 +
-selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 +
-systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=39,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=23841 0 0 +
-hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime,pagesize=2M 0 0 +
-debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0 +
-mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0 +
-fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0 +
-/dev/sda1 /boot ext4 rw,seclabel,relatime 0 0 +
-sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0 +
-tmpfs /run/user/1000 tmpfs rw,seclabel,nosuid,nodev,relatime,size=382484k,mode=700,uid=1000,gid=1000 0 0 +
-tmpfs /run/user/42 tmpfs rw,seclabel,nosuid,nodev,relatime,size=382484k,mode=700,uid=42,gid=42 0 0 +
-gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0+
 </code> </code>
  
-<WRAP center round important 60%> +Les options de la commande **mount** sont :
-**Important** : Notez que le système de fichiers de /dev/sda1 est **ext4** tandis que que le système de fichiers de /dev/mapper/cl_centos8-root est **xfs**. La comparaison des systèmes de fichiers Linux est abordée dans le module **LCF504 - Gestion des Disques, des Systèmes de Fichiers et du Swap**. +
-</WRAP>+
  
-====1.3 - La Commande umount=====+<code> 
 +root@debian11:~# mount --help 
 + 
 +Usage: 
 + mount [-lhV] 
 + mount -a [options] 
 + mount [options] [--source] <source> | [--target] <directory> 
 + mount [options] <source> <directory> 
 + mount <operation> <mountpoint> [<target>
 + 
 +Mount a filesystem. 
 + 
 +Options: 
 + -a, --all               mount all filesystems mentioned in fstab 
 + -c, --no-canonicalize   don't canonicalize paths 
 + -f, --fake              dry run; skip the mount(2) syscall 
 + -F, --fork              fork off for each device (use with -a) 
 + -T, --fstab <path>      alternative file to /etc/fstab 
 + -i, --internal-only     don't call the mount.<type> helpers 
 + -l, --show-labels       show also filesystem labels 
 + -n, --no-mtab           don't write to /etc/mtab 
 +     --options-mode <mode> 
 +                         what to do with options loaded from fstab 
 +     --options-source <source> 
 +                         mount options source 
 +     --options-source-force 
 +                         force use of options from fstab/mtab 
 + -o, --options <list>    comma-separated list of mount options 
 + -O, --test-opts <list>  limit the set of filesystems (use with -a) 
 + -r, --read-only         mount the filesystem read-only (same as -o ro) 
 + -t, --types <list>      limit the set of filesystem types 
 +     --source <src>      explicitly specifies source (path, label, uuid) 
 +     --target <target>   explicitly specifies mountpoint 
 +     --target-prefix <path> 
 +                         specifies path use for all mountpoints 
 + -v, --verbose           say what is being done 
 + -w, --rw, --read-write  mount the filesystem read-write (default) 
 + -N, --namespace <ns>    perform mount in another namespace 
 + 
 + -h, --help              display this help 
 + -V, --version           display version 
 + 
 +Source: 
 + -L, --label <label>     synonym for LABEL=<label> 
 + -U, --uuid <uuid>       synonym for UUID=<uuid> 
 + LABEL=<label>           specifies device by filesystem label 
 + UUID=<uuid>             specifies device by filesystem UUID 
 + PARTLABEL=<label>       specifies device by partition label 
 + PARTUUID=<uuid>         specifies device by partition UUID 
 + ID=<id>                 specifies device by udev hardware ID 
 + <device>                specifies device by path 
 + <directory>             mountpoint for bind mounts (see --bind/rbind) 
 + <file>                  regular file for loopdev setup 
 + 
 +Operations: 
 + -B, --bind              mount a subtree somewhere else (same as -o bind) 
 + -M, --move              move a subtree to some other place 
 + -R, --rbind             mount a subtree and all submounts somewhere else 
 + --make-shared           mark a subtree as shared 
 + --make-slave            mark a subtree as slave 
 + --make-private          mark a subtree as private 
 + --make-unbindable       mark a subtree as unbindable 
 + --make-rshared          recursively mark a whole subtree as shared 
 + --make-rslave           recursively mark a whole subtree as slave 
 + --make-rprivate         recursively mark a whole subtree as private 
 + --make-runbindable      recursively mark a whole subtree as unbindable 
 + 
 +For more details see mount(8). 
 +</code> 
 + 
 +====1.3 - La Commande umount====
  
 Pour démonter un système de fichiers, on utilise la commande umount : Pour démonter un système de fichiers, on utilise la commande umount :
  
-  # umount /mnt/<répertoire_cible>+<code> 
 +# umount /mnt/<répertoire_cible
 +</code>
  
-ou+ou 
  
-  # umount /dev/cdrom+<code> 
 +# umount /dev/cdrom 
 +</code>
  
-====1.4 - Le Fichier /etc/fstab==== 
  
-Dans le cas où la commande **mount** est utilisée avec l’option **–a**, tous les systèmes de fichiers mentionnés dans un fichier spécial dénommé **/etc/fstab** seront montés en même temps :+Les options de la commande **umount** sont :
  
 <code> <code>
-[root@centos8 ~]cat /etc/fstab+root@debian11:~# umount --help
  
 +Usage:
 + umount [-hV]
 + umount -a [options]
 + umount [options] <source> | <directory>
 +
 +Unmount filesystems.
 +
 +Options:
 + -a, --all               unmount all filesystems
 + -A, --all-targets       unmount all mountpoints for the given device in the
 +                           current namespace
 + -c, --no-canonicalize   don't canonicalize paths
 + -d, --detach-loop       if mounted loop device, also free this loop device
 +     --fake              dry run; skip the umount(2) syscall
 + -f, --force             force unmount (in case of an unreachable NFS system)
 + -i, --internal-only     don't call the umount.<type> helpers
 + -n, --no-mtab           don't write to /etc/mtab
 + -l, --lazy              detach the filesystem now, clean up things later
 + -O, --test-opts <list>  limit the set of filesystems (use with -a)
 + -R, --recursive         recursively unmount a target with all its children
 + -r, --read-only         in case unmounting fails, try to remount read-only
 + -t, --types <list>      limit the set of filesystem types
 + -v, --verbose           say what is being done
 + -q, --quiet             suppress 'not mounted' error messages
 + -N, --namespace <ns>    perform umount in another namespace
 +
 + -h, --help              display this help
 + -V, --version           display version
 +
 +For more details see umount(8).
 +</code>
 +
 +====1.4 - Le Fichier /etc/fstab====
 +
 +Dans le cas où la commande **mount** est utilisée avec l’option **–a**, tous les systèmes de fichiers mentionnés dans un fichier spécial dénommé **/etc/fstab** seront montés en même temps.
 +
 +<code>
 +root@debian11:~# cat /etc/fstab
 +# /etc/fstab: static file system information.
 # #
-/etc/fstab +Use 'blkid' to print the universally unique identifier for a 
-Created by anaconda on Wed Jun 16 06:21:32 2021 +device; this may be used with UUID= as a more robust way to name devices 
-# +that works even if disks are added and removed. See fstab(5).
-# Accessible filesystems, by reference, are maintained under '/dev/disk/'. +
-See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.+
 # #
-After editing this file, run 'systemctl daemon-reload' to update systemd +systemd generates mount units based on this file, see systemd.mount(5). 
-# units generated from this file.+# Please run 'systemctl daemon-reload' after making changes here.
 # #
-/dev/mapper/cl_centos8-root /                       xfs     defaults        0 0 +# <file system> <mount point>   <type>  <options>       <dump>  <pass> 
-UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot                   ext4    defaults        2 +# / was on /dev/sda1 during installation 
-/dev/mapper/cl_centos8-swap swap                    swap    defaults        0 0+UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e               ext4    errors=remount-ro 0       
 +# swap was on /dev/sda5 during installation 
 +UUID=1f9439f5-4b19-49b1-b292-60c2c674cee9 none            swap    sw              0       0 
 +/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto           0
 </code> </code>
  
Ligne 412: Ligne 500:
 =====Partitionnement===== =====Partitionnement=====
  
-====LAB #- Partitionnement de votre Disque avec fdisk====+====LAB #- Partitionnement de votre Disque avec fdisk====
  
-Pour procéder au partitionnement de votre disque ou de vos disques, RHEL/CentOS 8 possède l'outil dénommé **fdisk**.+Pour procéder au partitionnement de votre disque ou de vos disques, Debian 11 possède l'outil dénommé **fdisk**.
  
 Lancez fdisk en fournissant en argument le fichier de référence de votre premier disque dur, par exemple : Lancez fdisk en fournissant en argument le fichier de référence de votre premier disque dur, par exemple :
  
 <code> <code>
-[root@centos8 ~]# fdisk /dev/sdb+root@debian11:~# fdisk /dev/sdc
  
-Welcome to fdisk (util-linux 2.32.1).+Welcome to fdisk (util-linux 2.36.1).
 Changes will remain in memory only, until you decide to write them. Changes will remain in memory only, until you decide to write them.
 Be careful before using the write command. Be careful before using the write command.
  
 Device does not contain a recognized partition table. Device does not contain a recognized partition table.
-Created a new DOS disklabel with disk identifier 0xb0dacb39.+Created a new DOS disklabel with disk identifier 0x304308a3.
  
 Command (m for help):  Command (m for help): 
Ligne 473: Ligne 561:
  
  
-Command (m for help):+Command (m for help): 
 </code> </code>
  
Ligne 481: Ligne 569:
  
 ^ Partition ^ Type ^ Taille de la Partition ^ ^ Partition ^ Type ^ Taille de la Partition ^
-| /dev/sdb1 | Primaire |  100 Mo  | +| /dev/sdc1 | Primaire |  100 Mo  | 
-| /dev/sdb2 | Primaire |  100 Mo  | +| /dev/sdc2 | Primaire |  100 Mo  | 
-| /dev/sdb3 | Primaire |  100 Mo  | +| /dev/sdc3 | Primaire |  100 Mo  | 
-| /dev/sdb4 | Extended | Du premier secteur disponible au dernier secteur du disque | +| /dev/sdc4 | Extended | Du premier secteur disponible au dernier secteur du disque | 
-| /dev/sdb5 | Logique |  500 Mo  | +| /dev/sdc5 | Logique |  500 Mo  | 
-| /dev/sdb6 | Logique |  200 Mo  | +| /dev/sdc6 | Logique |  200 Mo  | 
-| /dev/sdb7 | Logique |  300 Mo  | +| /dev/sdc7 | Logique |  300 Mo  | 
-| /dev/sda8 | Logique |  500 Mo  | +| /dev/sdc8 | Logique |  500 Mo  | 
-| /dev/sdb9 | Logique |  400 Mo  | +| /dev/sdc9 | Logique |  400 Mo  | 
-| /dev/sdb10 | Logique |  500 Mo  | +| /dev/sdc10 | Logique |  500 Mo  | 
-| /dev/sdb11 | Logique |  500 Mo  | +| /dev/sdc11 | Logique |  500 Mo  | 
-| /dev/sdb12 | Logique |  200 Mo  |+| /dev/sdc12 | Logique |  200 Mo  |
  
 Créez d'abord les partitions primaires : Créez d'abord les partitions primaires :
Ligne 506: Ligne 594:
 Partition number (1-4, default 1):  Partition number (1-4, default 1): 
 First sector (2048-8388607, default 2048):  First sector (2048-8388607, default 2048): 
-Last sector, +sectors or +size{K,M,G,T,P} (2048-8388607, default 8388607): +100M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-8388607, default 8388607): +100M
  
 Created a new partition 1 of type 'Linux' and of size 100 MiB. Created a new partition 1 of type 'Linux' and of size 100 MiB.
Ligne 519: Ligne 607:
 Partition number (2-4, default 2):  Partition number (2-4, default 2): 
 First sector (206848-8388607, default 206848):  First sector (206848-8388607, default 206848): 
-Last sector, +sectors or +size{K,M,G,T,P} (206848-8388607, default 8388607): +100M            +Last sector, +/-sectors or +/-size{K,M,G,T,P} (206848-8388607, default 8388607): +100M
  
 Created a new partition 2 of type 'Linux' and of size 100 MiB. Created a new partition 2 of type 'Linux' and of size 100 MiB.
Ligne 532: Ligne 620:
 Partition number (3,4, default 3):  Partition number (3,4, default 3): 
 First sector (411648-8388607, default 411648):  First sector (411648-8388607, default 411648): 
-Last sector, +sectors or +size{K,M,G,T,P} (411648-8388607, default 8388607): +100M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (411648-8388607, default 8388607): +100M
  
 Created a new partition 3 of type 'Linux' and of size 100 MiB. Created a new partition 3 of type 'Linux' and of size 100 MiB.
  
-Command (m for help): +Command (m for help):
 </code> </code>
  
Ligne 546: Ligne 634:
      primary (3 primary, 0 extended, 1 free)      primary (3 primary, 0 extended, 1 free)
      extended (container for logical partitions)      extended (container for logical partitions)
-Select (default e): e+Select (default e): 
  
 +Using default response e.
 Selected partition 4 Selected partition 4
 First sector (616448-8388607, default 616448):  First sector (616448-8388607, default 616448): 
-Last sector, +sectors or +size{K,M,G,T,P} (616448-8388607, default 8388607): +Last sector, +/-sectors or +/-size{K,M,G,T,P} (616448-8388607, default 8388607): 
  
 Created a new partition 4 of type 'Extended' and of size 3.7 GiB. Created a new partition 4 of type 'Extended' and of size 3.7 GiB.
  
-Command (m for help):  +Command (m for help):
 </code> </code>
  
Ligne 564: Ligne 653:
 Adding logical partition 5 Adding logical partition 5
 First sector (618496-8388607, default 618496):  First sector (618496-8388607, default 618496): 
-Last sector, +sectors or +size{K,M,G,T,P} (618496-8388607, default 8388607): +500M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (618496-8388607, default 8388607): +500M
  
 Created a new partition 5 of type 'Linux' and of size 500 MiB. Created a new partition 5 of type 'Linux' and of size 500 MiB.
Ligne 572: Ligne 661:
 Adding logical partition 6 Adding logical partition 6
 First sector (1644544-8388607, default 1644544):  First sector (1644544-8388607, default 1644544): 
-Last sector, +sectors or +size{K,M,G,T,P} (1644544-8388607, default 8388607): +200M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (1644544-8388607, default 8388607): +200M
  
 Created a new partition 6 of type 'Linux' and of size 200 MiB. Created a new partition 6 of type 'Linux' and of size 200 MiB.
  
 Command (m for help): n Command (m for help): n
 +
 All primary partitions are in use. All primary partitions are in use.
 Adding logical partition 7 Adding logical partition 7
 First sector (2056192-8388607, default 2056192):  First sector (2056192-8388607, default 2056192): 
-Last sector, +sectors or +size{K,M,G,T,P} (2056192-8388607, default 8388607): +300M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (2056192-8388607, default 8388607): +300M
  
 Created a new partition 7 of type 'Linux' and of size 300 MiB. Created a new partition 7 of type 'Linux' and of size 300 MiB.
Ligne 588: Ligne 678:
 Adding logical partition 8 Adding logical partition 8
 First sector (2672640-8388607, default 2672640):  First sector (2672640-8388607, default 2672640): 
-Last sector, +sectors or +size{K,M,G,T,P} (2672640-8388607, default 8388607): +500M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (2672640-8388607, default 8388607): +500M
  
 Created a new partition 8 of type 'Linux' and of size 500 MiB. Created a new partition 8 of type 'Linux' and of size 500 MiB.
Ligne 596: Ligne 686:
 Adding logical partition 9 Adding logical partition 9
 First sector (3698688-8388607, default 3698688):  First sector (3698688-8388607, default 3698688): 
-Last sector, +sectors or +size{K,M,G,T,P} (3698688-8388607, default 8388607): +400M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (3698688-8388607, default 8388607): +400M
  
 Created a new partition 9 of type 'Linux' and of size 400 MiB. Created a new partition 9 of type 'Linux' and of size 400 MiB.
  
- Command (m for help): n+Command (m for help): n
 All primary partitions are in use. All primary partitions are in use.
 Adding logical partition 10 Adding logical partition 10
 First sector (4519936-8388607, default 4519936):  First sector (4519936-8388607, default 4519936): 
-Last sector, +sectors or +size{K,M,G,T,P} (4519936-8388607, default 8388607): +500M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (4519936-8388607, default 8388607): +500M
  
 Created a new partition 10 of type 'Linux' and of size 500 MiB. Created a new partition 10 of type 'Linux' and of size 500 MiB.
Ligne 612: Ligne 702:
 Adding logical partition 11 Adding logical partition 11
 First sector (5545984-8388607, default 5545984):  First sector (5545984-8388607, default 5545984): 
-Last sector, +sectors or +size{K,M,G,T,P} (5545984-8388607, default 8388607): +500M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (5545984-8388607, default 8388607): +500M
  
 Created a new partition 11 of type 'Linux' and of size 500 MiB. Created a new partition 11 of type 'Linux' and of size 500 MiB.
Ligne 620: Ligne 710:
 Adding logical partition 12 Adding logical partition 12
 First sector (6572032-8388607, default 6572032):  First sector (6572032-8388607, default 6572032): 
-Last sector, +sectors or +size{K,M,G,T,P} (6572032-8388607, default 8388607): +200M+Last sector, +/-sectors or +/-size{K,M,G,T,P} (6572032-8388607, default 8388607): +200M
  
 Created a new partition 12 of type 'Linux' and of size 200 MiB. Created a new partition 12 of type 'Linux' and of size 200 MiB.
  
-Command (m for help): +Command (m for help):
 </code> </code>
  
Ligne 631: Ligne 721:
 <code> <code>
 Command (m for help): p Command (m for help): p
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M 83 Linux +/dev/sdc5        618496 1642495 1024000  500M 83 Linux 
-/dev/sdb6       1644544 2054143  409600  200M 83 Linux +/dev/sdc6       1644544 2054143  409600  200M 83 Linux 
-/dev/sdb7       2056192 2670591  614400  300M 83 Linux +/dev/sdc7       2056192 2670591  614400  300M 83 Linux 
-/dev/sdb8       2672640 3696639 1024000  500M 83 Linux +/dev/sdc8       2672640 3696639 1024000  500M 83 Linux 
-/dev/sdb9       3698688 4517887  819200  400M 83 Linux +/dev/sdc9       3698688 4517887  819200  400M 83 Linux 
-/dev/sdb10      4519936 5543935 1024000  500M 83 Linux +/dev/sdc10      4519936 5543935 1024000  500M 83 Linux 
-/dev/sdb11      5545984 6569983 1024000  500M 83 Linux +/dev/sdc11      5545984 6569983 1024000  500M 83 Linux 
-/dev/sdb12      6572032 6981631  409600  200M 83 Linux+/dev/sdc12      6572032 6981631  409600  200M 83 Linux
  
 Command (m for help):  Command (m for help): 
Ligne 663: Ligne 754:
 Syncing disks. Syncing disks.
  
-[root@centos8 ~]# partprobe +root@debian11:~# partprobe 
-[root@centos8 ~]# +Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
 </code> </code>
  
Ligne 670: Ligne 761:
  
 <code> <code>
-[root@centos8 ~]# fdisk /dev/sdb+root@debian11:~# fdisk /dev/sdc
  
-Welcome to fdisk (util-linux 2.32.1).+Welcome to fdisk (util-linux 2.36.1).
 Changes will remain in memory only, until you decide to write them. Changes will remain in memory only, until you decide to write them.
 Be careful before using the write command. Be careful before using the write command.
Ligne 678: Ligne 769:
  
 Command (m for help): p Command (m for help): p
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M 83 Linux +/dev/sdc5        618496 1642495 1024000  500M 83 Linux 
-/dev/sdb6       1644544 2054143  409600  200M 83 Linux +/dev/sdc6       1644544 2054143  409600  200M 83 Linux 
-/dev/sdb7       2056192 2670591  614400  300M 83 Linux +/dev/sdc7       2056192 2670591  614400  300M 83 Linux 
-/dev/sdb8       2672640 3696639 1024000  500M 83 Linux +/dev/sdc8       2672640 3696639 1024000  500M 83 Linux 
-/dev/sdb9       3698688 4517887  819200  400M 83 Linux +/dev/sdc9       3698688 4517887  819200  400M 83 Linux 
-/dev/sdb10      4519936 5543935 1024000  500M 83 Linux +/dev/sdc10      4519936 5543935 1024000  500M 83 Linux 
-/dev/sdb11      5545984 6569983 1024000  500M 83 Linux +/dev/sdc11      5545984 6569983 1024000  500M 83 Linux 
-/dev/sdb12      6572032 6981631  409600  200M 83 Linux+/dev/sdc12      6572032 6981631  409600  200M 83 Linux
  
 Command (m for help):  Command (m for help): 
Ligne 706: Ligne 798:
 <code> <code>
 Command (m for help): d Command (m for help): d
-Partition number (1-12, default 12): 12+Partition number (1-12, default 12): 
  
 Partition 12 has been deleted. Partition 12 has been deleted.
  
 Command (m for help): p Command (m for help): p
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M 83 Linux +/dev/sdc5        618496 1642495 1024000  500M 83 Linux 
-/dev/sdb6       1644544 2054143  409600  200M 83 Linux +/dev/sdc6       1644544 2054143  409600  200M 83 Linux 
-/dev/sdb7       2056192 2670591  614400  300M 83 Linux +/dev/sdc7       2056192 2670591  614400  300M 83 Linux 
-/dev/sdb8       2672640 3696639 1024000  500M 83 Linux +/dev/sdc8       2672640 3696639 1024000  500M 83 Linux 
-/dev/sdb9       3698688 4517887  819200  400M 83 Linux +/dev/sdc9       3698688 4517887  819200  400M 83 Linux 
-/dev/sdb10      4519936 5543935 1024000  500M 83 Linux +/dev/sdc10      4519936 5543935 1024000  500M 83 Linux 
-/dev/sdb11      5545984 6569983 1024000  500M 83 Linux+/dev/sdc11      5545984 6569983 1024000  500M 83 Linux
  
 Command (m for help):  Command (m for help): 
Ligne 741: Ligne 834:
 Command (m for help): q Command (m for help): q
  
-[root@centos8 ~]# fdisk /dev/sdb+root@debian11:~# fdisk /dev/sdc
  
-Welcome to fdisk (util-linux 2.32.1).+Welcome to fdisk (util-linux 2.36.1).
 Changes will remain in memory only, until you decide to write them. Changes will remain in memory only, until you decide to write them.
 Be careful before using the write command. Be careful before using the write command.
Ligne 749: Ligne 842:
  
 Command (m for help): p Command (m for help): p
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M 83 Linux +/dev/sdc5        618496 1642495 1024000  500M 83 Linux 
-/dev/sdb6       1644544 2054143  409600  200M 83 Linux +/dev/sdc6       1644544 2054143  409600  200M 83 Linux 
-/dev/sdb7       2056192 2670591  614400  300M 83 Linux +/dev/sdc7       2056192 2670591  614400  300M 83 Linux 
-/dev/sdb8       2672640 3696639 1024000  500M 83 Linux +/dev/sdc8       2672640 3696639 1024000  500M 83 Linux 
-/dev/sdb9       3698688 4517887  819200  400M 83 Linux +/dev/sdc9       3698688 4517887  819200  400M 83 Linux 
-/dev/sdb10      4519936 5543935 1024000  500M 83 Linux +/dev/sdc10      4519936 5543935 1024000  500M 83 Linux 
-/dev/sdb11      5545984 6569983 1024000  500M 83 Linux +/dev/sdc11      5545984 6569983 1024000  500M 83 Linux 
-/dev/sdb12      6572032 6981631  409600  200M 83 Linux+/dev/sdc12      6572032 6981631  409600  200M 83 Linux
  
-Command (m for help):  +Command (m for help): 
 </code> </code>
  
-====LAB #- Modifier les Drapeaux des Partitions avec fdisk====+====LAB #- Modifier les Drapeaux des Partitions avec fdisk====
  
 Afin de mettre en place un RAID logiciel ou un volume logique, il est nécessaire de modifier les types de systèmes de fichiers sur les partitions créées. Afin de mettre en place un RAID logiciel ou un volume logique, il est nécessaire de modifier les types de systèmes de fichiers sur les partitions créées.
Ligne 794: Ligne 888:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 5 Partition number (1-12, default 12): 5
-Hex code (type L to list all codes): fd+Hex code or alias (type L to list all): fd
  
 Changed type of partition 'Linux' to 'Linux raid autodetect'. Changed type of partition 'Linux' to 'Linux raid autodetect'.
Ligne 800: Ligne 894:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 6 Partition number (1-12, default 12): 6
-Hex code (type L to list all codes): 8e+Hex code or alias (type L to list all): 8e
  
 Changed type of partition 'Linux' to 'Linux LVM'. Changed type of partition 'Linux' to 'Linux LVM'.
Ligne 806: Ligne 900:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 7 Partition number (1-12, default 12): 7
-Hex code (type L to list all codes): 8e+Hex code or alias (type L to list all): 8e
  
 Changed type of partition 'Linux' to 'Linux LVM'. Changed type of partition 'Linux' to 'Linux LVM'.
Ligne 812: Ligne 906:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 8 Partition number (1-12, default 12): 8
-Hex code (type L to list all codes): fd+Hex code or alias (type L to list all): fd
  
 Changed type of partition 'Linux' to 'Linux raid autodetect'. Changed type of partition 'Linux' to 'Linux raid autodetect'.
Ligne 818: Ligne 912:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 9 Partition number (1-12, default 12): 9
-Hex code (type L to list all codes): 8e+Hex code or alias (type L to list all): 8e
  
 Changed type of partition 'Linux' to 'Linux LVM'. Changed type of partition 'Linux' to 'Linux LVM'.
Ligne 824: Ligne 918:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 10 Partition number (1-12, default 12): 10
-Hex code (type L to list all codes): fd+Hex code or alias (type L to list all): fd
  
 Changed type of partition 'Linux' to 'Linux raid autodetect'. Changed type of partition 'Linux' to 'Linux raid autodetect'.
Ligne 830: Ligne 924:
 Command (m for help): t Command (m for help): t
 Partition number (1-12, default 12): 11 Partition number (1-12, default 12): 11
-Hex code (type L to list all codes): fd+Hex code or alias (type L to list all): fd
  
 Changed type of partition 'Linux' to 'Linux raid autodetect'. Changed type of partition 'Linux' to 'Linux raid autodetect'.
 +
 +Command (m for help): 
 </code> </code>
  
Ligne 839: Ligne 935:
 <code> <code>
 Command (m for help): p Command (m for help): p
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M fd Linux raid autodetect +/dev/sdc5        618496 1642495 1024000  500M fd Linux raid autodetect 
-/dev/sdb6       1644544 2054143  409600  200M 8e Linux LVM +/dev/sdc6       1644544 2054143  409600  200M 8e Linux LVM 
-/dev/sdb7       2056192 2670591  614400  300M 8e Linux LVM +/dev/sdc7       2056192 2670591  614400  300M 8e Linux LVM 
-/dev/sdb8       2672640 3696639 1024000  500M fd Linux raid autodetect +/dev/sdc8       2672640 3696639 1024000  500M fd Linux raid autodetect 
-/dev/sdb9       3698688 4517887  819200  400M 8e Linux LVM +/dev/sdc9       3698688 4517887  819200  400M 8e Linux LVM 
-/dev/sdb10      4519936 5543935 1024000  500M fd Linux raid autodetect +/dev/sdc10      4519936 5543935 1024000  500M fd Linux raid autodetect 
-/dev/sdb11      5545984 6569983 1024000  500M fd Linux raid autodetect +/dev/sdc11      5545984 6569983 1024000  500M fd Linux raid autodetect 
-/dev/sdb12      6572032 6981631  409600  200M 83 Linux+/dev/sdc12      6572032 6981631  409600  200M 83 Linux
  
 Command (m for help):  Command (m for help): 
Ligne 867: Ligne 964:
 <code> <code>
 Command (m for help): w Command (m for help): w
-The partition table has been altered+The partition table has been altered.
 Calling ioctl() to re-read partition table. Calling ioctl() to re-read partition table.
- 
-WARNING: Re-reading the partition table failed with error 16: Device or resource busy. 
-The kernel still uses the old table. The new table will be used at 
-the next reboot or after you run partprobe(8) or kpartx(8) 
 Syncing disks. Syncing disks.
-[root@centos8 ~]# partprobe+ 
 +root@debian11:~# partprobe 
 +Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
 </code> </code>
  
Ligne 883: Ligne 977:
  
 <code> <code>
-[root@centos8 ~]# fdisk --help+root@debian11:~# fdisk --help
  
 Usage: Usage:
- fdisk [options] <disk>      change partition table + fdisk [options] <disk>         change partition table 
- fdisk [options] -l [<disk>] list partition table(s)+ fdisk [options] -l [<disk>...] list partition table(s)
  
 Display or manipulate a disk partition table. Display or manipulate a disk partition table.
Ligne 898: Ligne 992:
                                  colors are enabled by default                                  colors are enabled by default
  -l, --list                    display partitions and exit  -l, --list                    display partitions and exit
 + -x, --list-details            like --list but with more details
 + -n, --noauto-pt               don't create default partition table on empty devices
  -o, --output <list>           output columns  -o, --output <list>           output columns
  -t, --type <type>             recognize specified partition table type only  -t, --type <type>             recognize specified partition table type only
Ligne 903: Ligne 999:
  -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]  -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]
      --bytes                   print SIZE in bytes rather than in human readable format      --bytes                   print SIZE in bytes rather than in human readable format
 +     --lock[=<mode>          use exclusive device lock (yes, no or nonblock)
  -w, --wipe <mode>             wipe signatures (auto, always or never)  -w, --wipe <mode>             wipe signatures (auto, always or never)
  -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)  -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)
Ligne 957: Ligne 1054:
 Pour plus d'information concernant Ext3, consultez **[[http://en.wikipedia.org/wiki/Ext3|cette page]]** Pour plus d'information concernant Ext3, consultez **[[http://en.wikipedia.org/wiki/Ext3|cette page]]**
  
-===Gestion d'Ext3===+===LAB# 3 - Gestion d'Ext3===
  
 Notez maintenant le numéro de la dernière partition que vous avez précédemment créée : Notez maintenant le numéro de la dernière partition que vous avez précédemment créée :
  
 <code> <code>
-[root@centos8 ~]# fdisk -l +root@debian11:~# fdisk -l 
-Disk /dev/sdb: 4 GiB, 4294967296 bytes, 8388608 sectors+Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors 
 +Disk model: QEMU HARDDISK    
 +Units: sectors of 1 * 512 = 512 bytes 
 +Sector size (logical/physical): 512 bytes / 512 bytes 
 +I/O size (minimum/optimal): 512 bytes / 512 bytes 
 + 
 + 
 +Disk /dev/sdc: 4 GiB, 4294967296 bytes, 8388608 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0xb0dacb39+Disk identifier: 0x304308a3
  
 Device     Boot   Start     End Sectors  Size Id Type Device     Boot   Start     End Sectors  Size Id Type
-/dev/sdb1          2048  206847  204800  100M 83 Linux +/dev/sdc1          2048  206847  204800  100M 83 Linux 
-/dev/sdb2        206848  411647  204800  100M 83 Linux +/dev/sdc2        206848  411647  204800  100M 83 Linux 
-/dev/sdb3        411648  616447  204800  100M 83 Linux +/dev/sdc3        411648  616447  204800  100M 83 Linux 
-/dev/sdb4        616448 8388607 7772160  3.7G  5 Extended +/dev/sdc4        616448 8388607 7772160  3.7G  5 Extended 
-/dev/sdb5        618496 1642495 1024000  500M fd Linux raid autodetect +/dev/sdc5        618496 1642495 1024000  500M fd Linux raid autodetect 
-/dev/sdb6       1644544 2054143  409600  200M 8e Linux LVM +/dev/sdc6       1644544 2054143  409600  200M 8e Linux LVM 
-/dev/sdb7       2056192 2670591  614400  300M 8e Linux LVM +/dev/sdc7       2056192 2670591  614400  300M 8e Linux LVM 
-/dev/sdb8       2672640 3696639 1024000  500M fd Linux raid autodetect +/dev/sdc8       2672640 3696639 1024000  500M fd Linux raid autodetect 
-/dev/sdb9       3698688 4517887  819200  400M 8e Linux LVM +/dev/sdc9       3698688 4517887  819200  400M 8e Linux LVM 
-/dev/sdb10      4519936 5543935 1024000  500M fd Linux raid autodetect +/dev/sdc10      4519936 5543935 1024000  500M fd Linux raid autodetect 
-/dev/sdb11      5545984 6569983 1024000  500M fd Linux raid autodetect +/dev/sdc11      5545984 6569983 1024000  500M fd Linux raid autodetect 
-/dev/sdb12      6572032 6981631  409600  200M 83 Linux+/dev/sdc12      6572032 6981631  409600  200M 83 Linux
  
  
-Disk /dev/sda20 GiB, 21474836480 bytes, 41943040 sectors+Disk /dev/sdb32 GiB, 34359738368 bytes, 67108864 sectors 
 +Disk model: QEMU HARDDISK   
 Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos Disklabel type: dos
-Disk identifier: 0x70b17285 +Disk identifier: 0xf2e3a71a
- +
-Device     Boot   Start      End  Sectors  Size Id Type +
-/dev/sda1  *       2048   616447   614400  300M 83 Linux +
-/dev/sda2        616448  4712447  4096000    2G 82 Linux swap / Solaris +
-/dev/sda3       4712448 35432447 30720000 14.7G 83 Linux +
  
 +Device     Boot    Start      End  Sectors  Size Id Type
 +/dev/sdb1  *        2048 65107967 65105920   31G 83 Linux
 +/dev/sdb2       65110014 67106815  1996802  975M  5 Extended
 +/dev/sdb5       65110016 67106815  1996800  975M 82 Linux swap / Solaris
  
  
Ligne 1012: Ligne 1116:
 </code> </code>
  
-Créez un filesystem Ext3 sur /dev/sdb12 en utilisant la commande **mke2fs -j** :+Dans ce cas, il s'agit de **/dev/sdc12**. 
 + 
 +Créez un filesystem Ext3 sur /dev/sdc12 en utilisant la commande **mke2fs -j** :
  
 <code> <code>
-[root@centos8 ~]# mke2fs -j /dev/sdb12 +root@debian11:~# mke2fs -j /dev/sdc12 
-mke2fs 1.45.(20-Mar-2020)+mke2fs 1.46.(28-Feb-2021) 
 +Discarding device blocks: done                            
 Creating filesystem with 204800 1k blocks and 51200 inodes Creating filesystem with 204800 1k blocks and 51200 inodes
-Filesystem UUID: a2515f45-a32a-4e87-b7e6-170448f3f803+Filesystem UUID: bdea8b16-8d0b-480c-ab37-68d7d2bdb0b8
 Superblock backups stored on blocks:  Superblock backups stored on blocks: 
- 8193, 24577, 40961, 57345, 73729+        8193, 24577, 40961, 57345, 73729
  
 Allocating group tables: done                             Allocating group tables: done                            
Ligne 1031: Ligne 1138:
  
 <code> <code>
-[root@centos8 ~]# mke2fs --help+root@debian11:~# mke2fs --help
 mke2fs: invalid option -- '-' mke2fs: invalid option -- '-'
 Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size] Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
- [-i bytes-per-inode] [-I inode-size] [-J journal-options] +        [-i bytes-per-inode] [-I inode-size] [-J journal-options] 
- [-G flex-group-size] [-N number-of-inodes] [-d root-directory] +        [-G flex-group-size] [-N number-of-inodes] [-d root-directory] 
- [-m reserved-blocks-percentage] [-o creator-os] +        [-m reserved-blocks-percentage] [-o creator-os] 
- [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] +        [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] 
- [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] +        [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] 
- [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file] +        [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file] 
- [-jnqvDFSV] device [blocks-count]+        [-jnqvDFSV] device [blocks-count]
 </code> </code>
  
-<WRAP center round important 60%+<WRAP center round important> 
-**Important** : Lors de la mise en place d'un filesystem ext2/ext3/ext4, le système réserve 5% de l'espace disque pour root. Sur des disques de grande taille il est parfois préférable de récupérer une partie de cet espace en utilisant la commande **tune2fs -m n /dev/sdXY** ou **n** est le nouveau pourcentage à réserver.+**Important** : Lors de la mise en place d'un filesystem ext2/ext3/ext4, le système réserve 5% de l'espace disque pour root. Sur des disques de grande taille il est parfois préférable de récupérer une partie de cet espace en utilisant la commande **tune2fs -m n /dev/sdXY** ou n est le nouveau pourcentage à réserver.
 </WRAP> </WRAP>
  
Ligne 1052: Ligne 1159:
  
 <code> <code>
-[root@centos8 ~]# dumpe2fs -h /dev/sdb12 +root@debian11:~# dumpe2fs -h /dev/sdc12 
-dumpe2fs 1.45.(20-Mar-2020)+dumpe2fs 1.46.(28-Feb-2021)
 Filesystem volume name:   <none> Filesystem volume name:   <none>
 Last mounted on:          <not available> Last mounted on:          <not available>
-Filesystem UUID:          a2515f45-a32a-4e87-b7e6-170448f3f803+Filesystem UUID:          bdea8b16-8d0b-480c-ab37-68d7d2bdb0b8
 Filesystem magic number:  0xEF53 Filesystem magic number:  0xEF53
 Filesystem revision #:    1 (dynamic) Filesystem revision #:    1 (dynamic)
Ligne 1068: Ligne 1175:
 Block count:              204800 Block count:              204800
 Reserved block count:     10240 Reserved block count:     10240
 +Overhead clusters:        12095
 Free blocks:              192674 Free blocks:              192674
 Free inodes:              51189 Free inodes:              51189
Ligne 1078: Ligne 1186:
 Inodes per group:         2048 Inodes per group:         2048
 Inode blocks per group:   256 Inode blocks per group:   256
-Filesystem created:       Wed Jun  2 07:55:24 2021+Filesystem created:       Tue Apr 26 16:41:16 2022
 Last mount time:          n/a Last mount time:          n/a
-Last write time:          Wed Jun  2 07:55:24 2021+Last write time:          Tue Apr 26 16:41:17 2022
 Mount count:              0 Mount count:              0
 Maximum mount count:      -1 Maximum mount count:      -1
-Last checked:             Wed Jun  2 07:55:24 2021+Last checked:             Tue Apr 26 16:41:16 2022
 Check interval:           0 (<none>) Check interval:           0 (<none>)
 Reserved blocks uid:      0 (user root) Reserved blocks uid:      0 (user root)
 Reserved blocks gid:      0 (group root) Reserved blocks gid:      0 (group root)
 First inode:              11 First inode:              11
-Inode size:           128+Inode size:               128
 Journal inode:            8 Journal inode:            8
 Default directory hash:   half_md4 Default directory hash:   half_md4
-Directory Hash Seed:      faee0b81-0538-4c06-8d86-468bc0c760ac+Directory Hash Seed:      705a3710-674b-4734-bf64-35a6ca7aabc5
 Journal backup:           inode blocks Journal backup:           inode blocks
 Journal features:         (none) Journal features:         (none)
-Journal size:             4096k +Total journal size:       4096k 
-Journal length:           4096+Total journal blocks:     4096 
 +Max transaction length:   4096 
 +Fast commit length:       0
 Journal sequence:         0x00000001 Journal sequence:         0x00000001
 Journal start:            0 Journal start:            0
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** : Le drapeau **Filesystem features:      has_journal ...** démontre que Ext3 est utilisé sur cette partition. **Important** : Le drapeau **Filesystem features:      has_journal ...** démontre que Ext3 est utilisé sur cette partition.
 </WRAP> </WRAP>
  
-Les options de cette commande sont : +Pour supprimer Ext3 sur cette partition, il convient d'utiliser la commande **tune2fs**
- +
-<code> +
-[root@centos8 ~]# dumpe2fs --help +
-dumpe2fs 1.45.6 (20-Mar-2020) +
-dumpe2fs: invalid option -- '-' +
-Usage: dumpe2fs [-bfghimxV] [-o superblock=<num>] [-o blocksize=<num>] device +
-</code> +
- +
-Pour supprimer le journal du système de fichier Ext3 sur cette partition, il convient d'utiliser la commande **tune2fs** +
- +
-<code> +
-[root@centos8 ~]# tune2fs -O ^has_journal /dev/sdb12 +
-tune2fs 1.45.6 (20-Mar-2020) +
-</code> +
- +
-Les options de cette commande sont :+
  
 <code> <code>
-[root@centos8 ~]# tune2fs --help +root@debian11:~# tune2fs -O ^has_journal /dev/sdc12 
-tune2fs 1.45.(20-Mar-2020) +tune2fs 1.46.(28-Feb-2021)
-tune2fs: invalid option -- '-' +
-Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-f] [-g group] +
- [-i interval[d|m|w]] [-j] [-J journal_options] [-l] +
- [-m reserved_blocks_percent] [-o [^]mount_options[,...]] +
- [-r reserved_blocks_count] [-u user] [-C mount_count] +
- [-L volume_label] [-M last_mounted_dir] +
- [-O [^]feature[,...]] [-Q quota_options] +
- [-E extended-option[,...]] [-T last_check_time] [-U UUID] +
- [-I new_inode_size] [-z undo_file] device+
 </code> </code>
  
Ligne 1139: Ligne 1224:
  
 <code> <code>
-[root@centos8 ~]# dumpe2fs -h /dev/sdb12 +root@debian11:~# dumpe2fs -h /dev/sdc12 
-dumpe2fs 1.45.(20-Mar-2020)+dumpe2fs 1.46.(28-Feb-2021)
 Filesystem volume name:   <none> Filesystem volume name:   <none>
 Last mounted on:          <not available> Last mounted on:          <not available>
-Filesystem UUID:          a2515f45-a32a-4e87-b7e6-170448f3f803+Filesystem UUID:          bdea8b16-8d0b-480c-ab37-68d7d2bdb0b8
 Filesystem magic number:  0xEF53 Filesystem magic number:  0xEF53
 Filesystem revision #:    1 (dynamic) Filesystem revision #:    1 (dynamic)
Ligne 1155: Ligne 1240:
 Block count:              204800 Block count:              204800
 Reserved block count:     10240 Reserved block count:     10240
 +Overhead clusters:        12095
 Free blocks:              196787 Free blocks:              196787
 Free inodes:              51189 Free inodes:              51189
Ligne 1165: Ligne 1251:
 Inodes per group:         2048 Inodes per group:         2048
 Inode blocks per group:   256 Inode blocks per group:   256
-Filesystem created:       Wed Jun  2 07:55:24 2021+Filesystem created:       Tue Apr 26 16:41:16 2022
 Last mount time:          n/a Last mount time:          n/a
-Last write time:          Wed Jun  2 07:59:01 2021+Last write time:          Tue Apr 26 16:44:45 2022
 Mount count:              0 Mount count:              0
 Maximum mount count:      -1 Maximum mount count:      -1
-Last checked:             Wed Jun  2 07:55:24 2021+Last checked:             Tue Apr 26 16:41:16 2022
 Check interval:           0 (<none>) Check interval:           0 (<none>)
 Reserved blocks uid:      0 (user root) Reserved blocks uid:      0 (user root)
 Reserved blocks gid:      0 (group root) Reserved blocks gid:      0 (group root)
 First inode:              11 First inode:              11
-Inode size:           128+Inode size:               128
 Default directory hash:   half_md4 Default directory hash:   half_md4
-Directory Hash Seed:      faee0b81-0538-4c06-8d86-468bc0c760ac+Directory Hash Seed:      705a3710-674b-4734-bf64-35a6ca7aabc5
 Journal backup:           inode blocks Journal backup:           inode blocks
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** : Notez que le drapeau **Filesystem features:      has_journal ...** a été supprimé. **Important** : Notez que le drapeau **Filesystem features:      has_journal ...** a été supprimé.
 </WRAP> </WRAP>
Ligne 1188: Ligne 1274:
  
 <code> <code>
-[root@centos8 ~]# fsck /dev/sdb12 +root@debian11:~# fsck /dev/sdc12 
-fsck from util-linux 2.32.1 +fsck from util-linux 2.36.1 
-e2fsck 1.45.(20-Mar-2020+e2fsck 1.46.(28-Feb-2021
-/dev/sdb12: clean, 11/51200 files, 8013/204800 blocks+/dev/sdc12: clean, 11/51200 files, 8013/204800 blocks
 </code> </code>
  
-Créez maintenant un point de montage pour /dev/sdb12 :+Créez un point de montage pour /dev/sdc12 :
  
 <code> <code>
-[root@centos8 ~]# mkdir /mnt/sdb12+root@debian11:~# mkdir /mnt/sdc12
 </code> </code>
  
-Essayez de monter /dev/sdb12 en tant que système de fichiers Ext3. Vous obtiendrez un résultat similaire à celui-ci :+Essayez de monter /dev/sdc12 en tant que système de fichiers Ext3. Vous obtiendrez un résultat similaire à celui-ci :
  
 <code> <code>
-[root@centos8 ~]# mount -t ext3 /dev/sdb12 /mnt/sdb12 +root@debian11:~# mount -t ext3 /dev/sdc12 /mnt/sdc12 
-mount: /mnt/sdb12: wrong fs type, bad option, bad superblock on /dev/sdb12, missing codepage or helper program, or other error.+mount: /mnt/sdc12: wrong fs type, bad option, bad superblock on /dev/sdc12, missing codepage or helper program, or other error.
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** : Notez l'erreur due au mauvais système de fichiers qui suit l'option **-t**. **Important** : Notez l'erreur due au mauvais système de fichiers qui suit l'option **-t**.
 </WRAP> </WRAP>
Ligne 1214: Ligne 1300:
  
 <code> <code>
-[root@centos8 ~]# mount -t ext2 /dev/sdb12 /mnt/sdb12+root@debian11:~# mkdir /mnt/sdc12 
 +root@debian11:~# mount -t ext3 /dev/sdc12 /mnt/sdc12 
 +mount: /mnt/sdc12: wrong fs type, bad option, bad superblock on /dev/sdc12, missing codepage or helper program, or other error. 
 +root@debian11:~# mount -t ext2 /dev/sdc12 /mnt/sdc12 
 + 
 +root@debian11:~# cat /etc/mtab | grep sdc12 
 +/dev/sdc12 /mnt/sdc12 ext2 rw,relatime 0 0
 </code> </code>
  
 ===LAB #5 - Convertir un Système de Fichiers Ext2 en Ext3=== ===LAB #5 - Convertir un Système de Fichiers Ext2 en Ext3===
  
-Pour replacer le journal sur /dev/sdb12, il convient d'utiliser la commande **tune2fs** :+Pour replacer le journal sur /dev/sdc12, il convient d'utiliser la commande **tune2fs** :
  
 <code> <code>
-[root@centos8 ~]# umount /mnt/sdb12+root@debian11:~# umount /mnt/sdc12
  
-[root@centos8 ~]# tune2fs -j /dev/sdb12 +root@debian11:~# tune2fs -j /dev/sdc12 
-tune2fs 1.45.(20-Mar-2020)+tune2fs 1.46.(28-Feb-2021)
 Creating journal inode: done Creating journal inode: done
 +
 +root@debian11:~# dumpe2fs -h /dev/sdc12 | head
 +dumpe2fs 1.46.2 (28-Feb-2021)
 +Filesystem volume name:   <none>
 +Last mounted on:          <not available>
 +Filesystem UUID:          bdea8b16-8d0b-480c-ab37-68d7d2bdb0b8
 +Filesystem magic number:  0xEF53
 +Filesystem revision #:    1 (dynamic)
 +Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
 +Filesystem flags:         signed_directory_hash 
 +Default mount options:    user_xattr acl
 +Filesystem state:         clean
 +Errors behavior:          Continue
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** : Notez que vous avez du démonter la partition avant d'exécuter la commande **tune2fs**. **Important** : Notez que vous avez du démonter la partition avant d'exécuter la commande **tune2fs**.
 </WRAP> </WRAP>
Ligne 1237: Ligne 1342:
 Le journal d'un système de fichiers peut être placé sur un autre périphérique bloc. Le journal d'un système de fichiers peut être placé sur un autre périphérique bloc.
  
-Créez un système de fichiers sur /dev/sdb11 :+Créez un système de fichiers sur /dev/sdc11 :
  
 <code> <code>
-[root@centos8 ~]# mke2fs -O journal_dev /dev/sdb11 +root@debian11:~# mke2fs -O journal_dev /dev/sdc11
-mke2fs 1.45.6 (20-Mar-2020) +
-Creating filesystem with 512000 1k blocks and 0 inodes +
-Filesystem UUID: 23327281-e88a-4da0-bafa-50ee10c52937 +
-Superblock backups stored on blocks:  +
- +
-Zeroing journal device:   +
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** : Notez l'utilisation de l'option **-O**. **Important** : Notez l'utilisation de l'option **-O**.
 </WRAP> </WRAP>
  
-Créez maintenant un système de fichiers Ext3 sur /dev/sdb12 en plaçant le journal sur /dev/sdb11 :+Créez maintenant un système de fichiers Ext3 sur /dev/sdc12 en plaçant le journal sur /dev/sdc11 :
  
-<code> +<code>                      
-[root@centos8 ~]# mke2fs -j -J device=/dev/sdb11 /dev/sdb12 +root@debian11:~# mke2fs -j -J device=/dev/sdc11 /dev/sdc12 
-mke2fs 1.45.(20-Mar-2020)+mke2fs 1.46.(28-Feb-2021)
 Using journal device's blocksize: 1024 Using journal device's blocksize: 1024
-/dev/sdb12 contains a ext3 file system +/dev/sdc12 contains a ext3 file system 
- last mounted on Wed Jun  2 08:03:11 2021+        last mounted on Tue Apr 26 16:47:45 2022
 Proceed anyway? (y,N) y Proceed anyway? (y,N) y
 +Discarding device blocks: done                            
 Creating filesystem with 204800 1k blocks and 51200 inodes Creating filesystem with 204800 1k blocks and 51200 inodes
-Filesystem UUID: 0e783411-6407-4cba-8db5-0e2729000c9e+Filesystem UUID: 84363ced-42b4-49b1-8627-49c39bd71ac3
 Superblock backups stored on blocks:  Superblock backups stored on blocks: 
- 8193, 24577, 40961, 57345, 73729+        8193, 24577, 40961, 57345, 73729
  
 Allocating group tables: done                             Allocating group tables: done                            
 Writing inode tables: done                             Writing inode tables: done                            
-Adding journal to device /dev/sdb11: done+Adding journal to device /dev/sdc11: done
 Writing superblocks and filesystem accounting information: done  Writing superblocks and filesystem accounting information: done 
 </code> </code>
  
-<WRAP center round important 60%+<WRAP center round important> 
-**Important** : Notez que le journal a été placé sur /dev/sdb11 graĉe à l'utilisation de l'option **-J**.+**Important** : Notez que le journal a été placé sur /dev/sdc11 graĉe à l'utilisation de l'option **-J**.
 </WRAP> </WRAP>
  
 ===LAB #7 - Modifier la Fréquence de Vérification du Système de Fichiers Ext3=== ===LAB #7 - Modifier la Fréquence de Vérification du Système de Fichiers Ext3===
  
-Pour modifier la fréquence de vérification du système de fichiers sur /dev/sdb12, il convient d'utiliser soit l'option **-c**, soit l'option **-i** :+Pour modifiez la fréquence de vérification du système de fichiers sur /dev/sdc12, il convient d'utiliser soit l'option **-c**, soit l'option **-i** :
  
 <code> <code>
-[root@centos8 ~]# tune2fs -i 100d /dev/sdb12 +root@debian11:~# tune2fs -i 100d /dev/sdc12 
-tune2fs 1.45.(20-Mar-2020)+tune2fs 1.46.(28-Feb-2021)
 Setting interval between checks to 8640000 seconds Setting interval between checks to 8640000 seconds
 </code> </code>
Ligne 1290: Ligne 1390:
  
 <code> <code>
-[root@centos8 ~]# dumpe2fs /dev/sdb12 | grep UUID +root@debian11:~# dumpe2fs /dev/sdc12| grep UUID 
-dumpe2fs 1.45.(20-Mar-2020+dumpe2fs 1.46.(28-Feb-2021
-Filesystem UUID:          0e783411-6407-4cba-8db5-0e2729000c9e +Filesystem UUID:          84363ced-42b4-49b1-8627-49c39bd71ac3 
-Journal UUID:             23327281-e88a-4da0-bafa-50ee10c52937+Journal UUID:             a9765f56-d8d4-499b-8fc4-db1d665cdfca
 </code> </code>
  
 ====Ext4==== ====Ext4====
  
-Le système de fichiers **Ext4** a été introduit dans le noyau **2.6.19** en mode expérimental et est devenu stable dans le noyau **2.6.28**.+Le système de fichiers **Ext4** fut introduit dans le noyau **2.6.19** en mode expérimental et est devenu stable dans le noyau **2.6.28**.
  
 Ext4 n'est pas une évolution de Ext3. Cependant il a une compatibilité ascendante avec Ext3. Ext4 n'est pas une évolution de Ext3. Cependant il a une compatibilité ascendante avec Ext3.
Ligne 1318: Ligne 1418:
 ===LAB #8 - Créer un Système de Fichiers Ext4=== ===LAB #8 - Créer un Système de Fichiers Ext4===
  
-Créez un système de fichiers Ext4 sur **/dev/sdb11** :+Créez un système de fichiers Ext4 sur **/dev/sdc11** :
  
 <code> <code>
-[root@centos8 ~]# mkfs.ext4 /dev/sdb11 +root@debian11:~# mkfs.ext4 /dev/sdc11 
-mke2fs 1.45.(20-Mar-2020+mke2fs 1.46.(28-Feb-2021
-/dev/sdb11 contains a jbd file system+/dev/sdc11 contains a jbd file system
 Proceed anyway? (y,N) y Proceed anyway? (y,N) y
 +Discarding device blocks: done                            
 Creating filesystem with 512000 1k blocks and 128016 inodes Creating filesystem with 512000 1k blocks and 128016 inodes
-Filesystem UUID: 72a6ad08-7023-4561-adcb-d434e00afed1+Filesystem UUID: a590c318-d9ad-4883-abce-4e154c80e521
 Superblock backups stored on blocks:  Superblock backups stored on blocks: 
- 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409+        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
  
 Allocating group tables: done                             Allocating group tables: done                            
Ligne 1339: Ligne 1440:
  
 <code> <code>
-[root@centos8 ~]# mkfs.ext4 --help+root@debian11:~# mkfs.ext4 --help
 mkfs.ext4: invalid option -- '-' mkfs.ext4: invalid option -- '-'
 Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size] Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]
- [-i bytes-per-inode] [-I inode-size] [-J journal-options] +        [-i bytes-per-inode] [-I inode-size] [-J journal-options] 
- [-G flex-group-size] [-N number-of-inodes] [-d root-directory] +        [-G flex-group-size] [-N number-of-inodes] [-d root-directory] 
- [-m reserved-blocks-percentage] [-o creator-os] +        [-m reserved-blocks-percentage] [-o creator-os] 
- [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] +        [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] 
- [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] +        [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] 
- [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file] +        [-t fs-type] [-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file] 
- [-jnqvDFSV] device [blocks-count]+        [-jnqvDFSV] device [blocks-count]
 </code> </code>
  
Ligne 1354: Ligne 1455:
  
 <code> <code>
-[root@centos8 ~]# dumpe2fs /dev/sdb11 | more +root@debian11:~# dumpe2fs /dev/sdc11 | more 
-dumpe2fs 1.45.(20-Mar-2020)+dumpe2fs 1.46.(28-Feb-2021)
 Filesystem volume name:   <none> Filesystem volume name:   <none>
 Last mounted on:          <not available> Last mounted on:          <not available>
-Filesystem UUID:          72a6ad08-7023-4561-adcb-d434e00afed1+Filesystem UUID:          a590c318-d9ad-4883-abce-4e154c80e521
 Filesystem magic number:  0xEF53 Filesystem magic number:  0xEF53
 Filesystem revision #:    1 (dynamic) Filesystem revision #:    1 (dynamic)
-Filesystem features:      has_journal ext_attr resize_inode dir_index filetype e +Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent  
-xtent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize meta +64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
-data_csum+
 Filesystem flags:         signed_directory_hash  Filesystem flags:         signed_directory_hash 
 Default mount options:    user_xattr acl Default mount options:    user_xattr acl
Ligne 1372: Ligne 1472:
 Block count:              512000 Block count:              512000
 Reserved block count:     25600 Reserved block count:     25600
 +Overhead clusters:        26670
 Free blocks:              485316 Free blocks:              485316
 Free inodes:              128005 Free inodes:              128005
Ligne 1380: Ligne 1481:
 Reserved GDT blocks:      256 Reserved GDT blocks:      256
 --More-- --More--
 +[q]
 </code> </code>
  
Ligne 1387: Ligne 1489:
  
 <code> <code>
-[root@centos8 ~]# e2label /dev/sdb11 my_ext4 +root@debian11:~# e2label /dev/sdc11 my_ext4 
-[root@centos8 ~]# dumpe2fs /dev/sdb11 | more +root@debian11:~# dumpe2fs /dev/sdc11 | more 
-dumpe2fs 1.45.(20-Mar-2020)+dumpe2fs 1.46.(28-Feb-2021)
 Filesystem volume name:   my_ext4 Filesystem volume name:   my_ext4
 Last mounted on:          <not available> Last mounted on:          <not available>
-Filesystem UUID:          72a6ad08-7023-4561-adcb-d434e00afed1+Filesystem UUID:          a590c318-d9ad-4883-abce-4e154c80e521
 Filesystem magic number:  0xEF53 Filesystem magic number:  0xEF53
 Filesystem revision #:    1 (dynamic) Filesystem revision #:    1 (dynamic)
-Filesystem features:      has_journal ext_attr resize_inode dir_index filetype e +Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent  
-xtent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize meta +64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
-data_csum+
 Filesystem flags:         signed_directory_hash  Filesystem flags:         signed_directory_hash 
 Default mount options:    user_xattr acl Default mount options:    user_xattr acl
Ligne 1406: Ligne 1507:
 Block count:              512000 Block count:              512000
 Reserved block count:     25600 Reserved block count:     25600
 +Overhead clusters:        26670
 Free blocks:              485316 Free blocks:              485316
 Free inodes:              128005 Free inodes:              128005
Ligne 1414: Ligne 1516:
 Reserved GDT blocks:      256 Reserved GDT blocks:      256
 --More-- --More--
 +[q]
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** - Notez que l'étiquette doit être de 16 caractères maximum. **Important** - Notez que l'étiquette doit être de 16 caractères maximum.
 </WRAP> </WRAP>
  
-Créez un point de montage dans **/mnt** et essayez de monter **/dev/sdb11** en tant qu'Ext3 :+Créez un point de montage dans **/mnt** et essayez de monter **/dev/sdc11** en tant qu'Ext3 :
  
 <code> <code>
-[root@centos8 ~]# mkdir /mnt/sdb11+root@debian11:~# mkdir /mnt/sdc11
  
-[root@centos8 ~]# mount -t ext3 /dev/sdb11 /mnt/sdb11 +root@debian11:~# mount -t ext3 /dev/sdc11 /mnt/sdc11 
-mount: /mnt/sdb11: wrong fs type, bad option, bad superblock on /dev/sdb11, missing codepage or helper program, or other error..+mount: /mnt/sdc11: wrong fs type, bad option, bad superblock on /dev/sdc11, missing codepage or helper program, or other error.
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** - Notez l'erreur qui est signalée. **Important** - Notez l'erreur qui est signalée.
 </WRAP> </WRAP>
Ligne 1436: Ligne 1539:
  
 <code> <code>
-[root@centos8 ~]# mount /dev/sdb11 /mnt/sdb11+root@debian11:~# mount /dev/sdc11 /mnt/sdc11
  
-[root@centos8 ~]# mount | grep sdb11 +root@debian11:~# mount | grep sdc11 
-/dev/sdb11 on /mnt/sdb11 type ext4 (rw,relatime,seclabel)+/dev/sdc11 on /mnt/sdc11 type ext4 (rw,relatime)
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** - Constatez que la partition a été monté en tant qu'Ext4. **Important** - Constatez que la partition a été monté en tant qu'Ext4.
 </WRAP> </WRAP>
Ligne 1448: Ligne 1551:
 ===LAB #10 - Convertir un Système de Fichiers Ext3 en Ext4=== ===LAB #10 - Convertir un Système de Fichiers Ext3 en Ext4===
  
-Créez un système de fichiers ext3 sur /dev/sdb12 :+Créez un système de fichiers ext3 sur /dev/sdc12 :
  
 <code> <code>
-[root@centos8 ~]# mkfs.ext3 /dev/sdb12 +root@debian11:~# mkfs.ext3 /dev/sdc12 
-mke2fs 1.45.(20-Mar-2020+mke2fs 1.46.(28-Feb-2021
-/dev/sdb12 contains a ext3 file system +/dev/sdc12 contains a ext3 file system 
- created on Wed Jun  2 08:10:40 2021+        created on Wed Apr 27 11:57:30 2022
 Proceed anyway? (y,N) y Proceed anyway? (y,N) y
 +Discarding device blocks: done                            
 Creating filesystem with 204800 1k blocks and 51200 inodes Creating filesystem with 204800 1k blocks and 51200 inodes
-Filesystem UUID: b73322d4-f2e4-43bc-96ae-422d4584f3de+Filesystem UUID: 62cb630b-25d5-4ca0-bbab-e855fba96a80
 Superblock backups stored on blocks:  Superblock backups stored on blocks: 
- 8193, 24577, 40961, 57345, 73729+        8193, 24577, 40961, 57345, 73729
  
 Allocating group tables: done                             Allocating group tables: done                            
 Writing inode tables: done                             Writing inode tables: done                            
 Creating journal (4096 blocks): done Creating journal (4096 blocks): done
-Writing superblocks and filesystem accounting information: done +Writing superblocks and filesystem accounting information: done
 </code> </code>
  
-Montez maintenant **/dev/sdb12** sur /mnt/sdb12 :+Montez maintenant **/dev/sdc12** sur /mnt/sdc12 :
  
 <code> <code>
-[root@centos8 ~]# mount /dev/sdb12 /mnt/sdb12+root@debian11:~# mount /dev/sdc12 /mnt/sdc12
  
-[root@centos8 ~]# ls -l /mnt/sdb12+root@debian11:~# ls -l /mnt/sdc12
 total 12 total 12
-drwx------2 root root 12288 Jun  2 08:42 lost+found+drwx------ 2 root root 12288 Apr 27 12:11 lost+found
 </code> </code>
  
-Créez le fichier **/mnt/sdb12/check_file** :+Créez le fichier **/mnt/sdc12/check_file** :
  
 <code> <code>
-[root@centos8 ~]# touch /mnt/sdb12/check_file+root@debian11:~# touch /mnt/sdc12/check_file
 </code> </code>
  
-Injectez la chaine **check file** dans le fichier /mnt/sdb12/check_file puis démontez /dev/sdb12 :+Injectez la chaine **check file** dans le fichier /mnt/sdc12/check_file puis démontez /dev/sdc12 :
  
 <code> <code>
-[root@centos8 ~]# echo "check file" > /mnt/sdb12/check_file+root@debian11:~# echo "check file" > /mnt/sdc12/check_file
  
-[root@centos8 ~]# umount /dev/sdb12+root@debian11:~# umount /mnt/sdc12
 </code> </code>
  
-Exécutez e2fsck sur /dev/sda12 :+Exécutez e2fsck sur /dev/sdc12 :
  
 <code> <code>
-[root@centos8 ~]# e2fsck /dev/sdb12 +root@debian11:~# e2fsck /dev/sdc12 
-e2fsck 1.45.(20-Mar-2020+e2fsck 1.46.(28-Feb-2021
-/dev/sdb12: clean, 12/51200 files, 12128/204800 blocks+/dev/sdc12: clean, 12/51200 files, 12127/204800 blocks
 </code> </code>
  
-Convertissez /dev/sdb12 en Ext4 :+Convertissez /dev/sdc12 en Ext4 :
  
 <code> <code>
-[root@centos8 ~]# tune2fs -O extents,uninit_bg,dir_index /dev/sdb12 +root@debian11:~# tune2fs -O extents,uninit_bg,dir_index /dev/sdc12 
-tune2fs 1.45.(20-Mar-2020)+tune2fs 1.46.(28-Feb-2021)
 </code> </code>
  
Ligne 1509: Ligne 1613:
  
 <code> <code>
-[root@centos8 ~]# e2fsck -fDC0 /dev/sdb12 +root@debian11:~# e2fsck -fDC0 /dev/sdc12 
-e2fsck 1.45.(20-Mar-2020)+e2fsck 1.46.(28-Feb-2021)
 Pass 1: Checking inodes, blocks, and sizes Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure                                            Pass 2: Checking directory structure                                           
Ligne 1518: Ligne 1622:
 Pass 5: Checking group summary information Pass 5: Checking group summary information
                                                                                                                                                                  
-/dev/sdb12: ***** FILE SYSTEM WAS MODIFIED ***** +/dev/sdc12: ***** FILE SYSTEM WAS MODIFIED ***** 
-/dev/sdb12: 12/51200 files (0.0% non-contiguous), 12128/204800 blocks+/dev/sdc12: 12/51200 files (0.0% non-contiguous), 12127/204800 blocks
 </code> </code>
  
-Essayez de monter **/dev/sdb12** en tant qu'Ext3 :+Essayez de monter **/dev/sdc12** en tant qu'Ext3 :
  
 <code> <code>
-[root@centos8 ~]# mount -t ext3 /dev/sdb12 /mnt/sdb12 +root@debian11:~# mount -t ext3 /dev/sdc12 /mnt/sdc12 
-mount: /mnt/sdb12: wrong fs type, bad option, bad superblock on /dev/sdb12, missing codepage or helper program, or other error.+mount: /mnt/sdc12: wrong fs type, bad option, bad superblock on /dev/sdc12, missing codepage or helper program, or other error.
 </code> </code>
  
-Montez /dev/sdb12 sans spécifier le type de fichiers Ext3 et vérifiez le contenu du fichier **check_file** :+Montez /dev/sdc12 sans spécifier le type de fichiers Ext3 et vérifiez le contenu du fichier **check_file** :
  
 <code> <code>
-[root@centos8 ~]# mount /dev/sdb12 /mnt/sdb12+root@debian11:~# mount /dev/sdc12 /mnt/sdc12
  
-[root@centos8 ~]# ls -l /mnt/sdb12 +root@debian11:~# ls -l /mnt/sdc12 
-total 14 +total 13 
--rw-r--r--1 root root    11 Jun  2 08:45 check_file +-rw-r--r-- 1 root root    11 Apr 27 12:15 check_file 
-drwx------2 root root 12288 Jun  2 08:42 lost+found+drwx------ 2 root root 12288 Apr 27 12:11 lost+found
  
-[root@centos8 ~]# cat /mnt/sdb12/check_file+root@debian11:~# cat /mnt/sdc12/check_file
 check file check file
 </code> </code>
Ligne 1546: Ligne 1650:
  
 <code> <code>
-[root@centos8 ~]# dumpe2fs /dev/sdb11 | grep UUID +root@debian11:~# dumpe2fs /dev/sdc11 | grep UUID 
-dumpe2fs 1.45.(20-Mar-2020+dumpe2fs 1.46.(28-Feb-2021
-Filesystem UUID:          72a6ad08-7023-4561-adcb-d434e00afed1+Filesystem UUID:          a590c318-d9ad-4883-abce-4e154c80e521
  
-[root@centos8 ~]# dumpe2fs /dev/sdb12 | grep UUID +root@debian11:~# dumpe2fs /dev/sdc12 | grep UUID 
-dumpe2fs 1.45.(20-Mar-2020+dumpe2fs 1.46.(28-Feb-2021
-Filesystem UUID:          b73322d4-f2e4-43bc-96ae-422d4584f3de+Filesystem UUID:          62cb630b-25d5-4ca0-bbab-e855fba96a80
 </code> </code>
  
 ====XFS==== ====XFS====
  
-XFS est un système de fichiers 64-bit journalisé de haute performance crée par SGI pour son système d'exploitation IRIX. XFS est inclus par défaut avec les versions du noyau Linux 2.5.xx et 2.6.xx. XFS est le système de fichiers par défaut de RHEL/CentOS 8. +XFS est un système de fichiers 64-bit journalisé de haute performance crée par SGI pour son système d'exploitation IRIX. XFS est inclus par défaut avec les versions du noyau Linux 2.5.xx et 2.6.xx.
- +
-<WRAP center round important 60%> +
-**Important** : Le système de fichiers XFS permet l'augmentation de sa taille à chaud. Par contre, la taille d'un système de fichiers XFS ne peut pas être réduite. +
-</WRAP>+
  
 Pour plus d'informations concernant XFS, consultez **[[http://en.wikipedia.org/wiki/XFS|cette page]]**. Pour plus d'informations concernant XFS, consultez **[[http://en.wikipedia.org/wiki/XFS|cette page]]**.
Ligne 1567: Ligne 1667:
 ===LAB #11 - Créer un Système de Fichiers XFS=== ===LAB #11 - Créer un Système de Fichiers XFS===
  
-Démontez **/dev/sdb12** :+Installez le paquet **xfsprogs** :
  
 <code> <code>
-[root@centos8 ~]umount /dev/sdb12+root@debian11:~# apt-get -y install xfsprogs
 </code> </code>
  
-Créez un système de fichiers XFS sur la partition **/dev/sdb12** :+Créez un système de fichiers XFS sur la partition **/dev/sdc10** :
  
 <code> <code>
-[root@centos8 ~]# mkfs.xfs -f /dev/sdb12 +root@debian11:~# mkfs.xfs /dev/sdc10 
-meta-data=/dev/sdb12             isize=512    agcount=4, agsize=12800 blks+meta-data=/dev/sdc10             isize=512    agcount=4, agsize=32000 blks
                                sectsz=512   attr=2, projid32bit=1                                sectsz=512   attr=2, projid32bit=1
                                crc=1        finobt=1, sparse=1, rmapbt=0                                crc=1        finobt=1, sparse=1, rmapbt=0
-                               reflink=1 +                               reflink=1    bigtime=0 
-data                           bsize=4096   blocks=51200, imaxpct=25+data                           bsize=4096   blocks=128000, imaxpct=25
                                sunit=0      swidth=0 blks                                sunit=0      swidth=0 blks
 naming   =version 2              bsize=4096   ascii-ci=0, ftype=1 naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
Ligne 1587: Ligne 1687:
                                sectsz=512   sunit=0 blks, lazy-count=1                                sectsz=512   sunit=0 blks, lazy-count=1
 realtime =none                   extsz=4096   blocks=0, rtextents=0 realtime =none                   extsz=4096   blocks=0, rtextents=0
-</code> +Discarding blocks...Done.
- +
-<WRAP center round important 60%> +
-**Important** - Notez l'utilisation de l'option **-f** afin d'écraser le système de fichiers Ext4 existant. +
-</WRAP> +
- +
-Les options de cette commande sont : +
- +
-<code> +
-[root@centos8 ~]# mkfs.xfs --help +
-mkfs.xfs: invalid option -- '-' +
-unknown option --  +
-Usage: mkfs.xfs +
-/* blocksize */ [-b size=num] +
-/* metadata */ [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1] +
-/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num, +
-     (sunit=value,swidth=value|su=num,sw=num|noalign), +
-     sectsize=num +
-/* force overwrite */ [-f] +
-/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, +
-     projid32bit=0|1,sparse=0|1] +
-/* no discard */ [-K] +
-/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n +
-     sunit=value|su=num,sectsize=num,lazy-count=0|1] +
-/* label */ [-L label (maximum 12 characters)] +
-/* naming */ [-n size=num,version=2|ci,ftype=0|1] +
-/* no-op info only */ [-N] +
-/* prototype file */ [-p fname] +
-/* quiet */ [-q] +
-/* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx] +
-/* sectorsize */ [-s size=num] +
-/* version */ [-V] +
- devicename +
-<devicename> is required unless -d name=xxx is given. +
-<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), +
-      xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). +
-<value> is xxx (512 byte blocks).+
 </code> </code>
  
Ligne 1629: Ligne 1693:
  
 <code> <code>
-[root@centos8 ~]# xfs_info /dev/sdb12 +root@debian11:~# xfs_info /dev/sdc10 
-meta-data=/dev/sdb12             isize=512    agcount=4, agsize=12800 blks+meta-data=/dev/sdc10             isize=512    agcount=4, agsize=32000 blks
                                sectsz=512   attr=2, projid32bit=1                                sectsz=512   attr=2, projid32bit=1
                                crc=1        finobt=1, sparse=1, rmapbt=0                                crc=1        finobt=1, sparse=1, rmapbt=0
-                               reflink=1 +                               reflink=1    bigtime=0 
-data                           bsize=4096   blocks=51200, imaxpct=25+data                           bsize=4096   blocks=128000, imaxpct=25
                                sunit=0      swidth=0 blks                                sunit=0      swidth=0 blks
 naming   =version 2              bsize=4096   ascii-ci=0, ftype=1 naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
Ligne 1640: Ligne 1704:
                                sectsz=512   sunit=0 blks, lazy-count=1                                sectsz=512   sunit=0 blks, lazy-count=1
 realtime =none                   extsz=4096   blocks=0, rtextents=0 realtime =none                   extsz=4096   blocks=0, rtextents=0
-</code> 
- 
-Les options de cette commande sont : 
- 
-<code> 
-[root@centos8 ~]# xfs_info --help 
-/usr/sbin/xfs_info: illegal option -- - 
-Usage: xfs_info [-V] [-t mtab] [mountpoint|device|file] 
 </code> </code>
  
Ligne 1655: Ligne 1711:
  
 <code> <code>
-[root@centos8 ~]# xfs_admin -L my_xfs /dev/sdb12 +root@debian11:~# xfs_admin -L my_xfs /dev/sdc10
-xfs_admin/dev/sdb12 contains a mounted filesystem +
- +
-fatal error -- couldn't initialize XFS library +
- +
-[root@centos8 ~]# umount /dev/sdb12 +
- +
-[root@centos8 ~]# xfs_admin -L my_xfs /dev/sdb12+
 writing all SBs writing all SBs
 new label = "my_xfs" new label = "my_xfs"
 </code> </code>
- 
-<WRAP center round important 60%> 
-**Important** - Notez que la partition XFS doit être démonté pour pouvoir utiliser la commande **xfs_admin**. 
-</WRAP> 
  
 Pour voir l'étiquette, utilisez la commande suivante : Pour voir l'étiquette, utilisez la commande suivante :
  
 <code> <code>
-[root@centos8 ~]# xfs_admin -l /dev/sdb12+root@debian11:~# xfs_admin -l /dev/sdc10
 label = "my_xfs" label = "my_xfs"
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** - Notez que l'étiquette doit être de 12 caractères maximum. **Important** - Notez que l'étiquette doit être de 12 caractères maximum.
 </WRAP> </WRAP>
- 
-Les options de cette commande sont : 
- 
-<code> 
-[root@centos8 ~]# xfs_admin --help 
-/usr/sbin/xfs_admin: illegal option -- - 
-Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-U uuid] device 
-</code> 
  
 Dernièrement, pour obtenir seul l'UUID du système de fichiers, utilisez la commande **xfs-admin** et l'option **-u** : Dernièrement, pour obtenir seul l'UUID du système de fichiers, utilisez la commande **xfs-admin** et l'option **-u** :
  
 <code> <code>
-[root@centos8 ~]# xfs_admin -u /dev/sdb12 +root@debian11:~# xfs_admin -u /dev/sdc10 
-UUID = 15db1b62-0866-4aa4-9ac1-3ac325a4e20f+UUID = b4d2c2c3-94bc-4408-8284-5b09ab60204e
 </code> </code>
  
-<WRAP center round important 60%>+<WRAP center round important>
 **Important** - La commande **xfs_metadump** est utilisée pour sauvegarder les méta-données du système de fichiers, tandis que la commande **xfs_mdrestore** est utilisée pour restaurer les les méta-données du système de fichiers. **Important** - La commande **xfs_metadump** est utilisée pour sauvegarder les méta-données du système de fichiers, tandis que la commande **xfs_mdrestore** est utilisée pour restaurer les les méta-données du système de fichiers.
-</WRAP> 
- 
-=====Autres Systèmes de Fichiers===== 
- 
-<WRAP center round important 60%> 
-**Important** - Veuillez noter que le support des systèmes de fichiers **ReiserFS**, **JFS** et **Btrfs** est **absent** du noyau des distributions de Red Hat. 
 </WRAP> </WRAP>
  
Ligne 1715: Ligne 1746:
  
 Pour plus d'informations concernant %%ReiserFS%%, consultez **[[http://en.wikipedia.org/wiki/ReiserFS|cette page]]**. Pour plus d'informations concernant %%ReiserFS%%, consultez **[[http://en.wikipedia.org/wiki/ReiserFS|cette page]]**.
 +
 +Avant de continuer, installer le paquet **reiserfsprogs** :
 +
 +<code>
 +root@debian11:~# apt-get -y install reiserfsprogs
 +</code>
 +
 +===LAB #13 - Créer un Système de Fichiers ReiserFS===
 +
 +Créez un système de fichiers ReiserFS sur la partition **/dev/sdc8** :
 +
 +<code>
 +root@debian11:~# mkfs.reiserfs /dev/sdc8
 +mkfs.reiserfs 3.6.27
 +
 +Guessing about desired format.. Kernel 5.10.0-13-amd64 is running.
 +Format 3.6 with standard journal
 +Count of blocks on the device: 128000
 +Number of blocks consumed by mkreiserfs formatting process: 8215
 +Blocksize: 4096
 +Hash function used to sort names: "r5"
 +Journal Size 8193 blocks (first block 18)
 +Journal Max transaction length 1024
 +inode generation number: 0
 +UUID: 95c81e34-2215-4b96-be47-e5368444f19a
 +ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
 +        ALL DATA WILL BE LOST ON '/dev/sdc8'!
 +Continue (y/n):y
 +Initializing journal - 0%....20%....40%....60%....80%....100%
 +Syncing..ok
 +ReiserFS is successfully created on /dev/sdc8.
 +</code>
 +
 +Consultez maintenant les caractéristiques du système de fichier :
 +
 +<code>
 +root@debian11:~# debugreiserfs /dev/sdc8
 +debugreiserfs 3.6.27
 +
 +
 +Filesystem state: consistent
 +
 +Reiserfs super block in block 16 on 0x828 of format 3.6 with standard journal
 +Count of blocks on the device: 128000
 +Number of bitmaps: 4
 +Blocksize: 4096
 +Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 119785
 +Root block: 8211
 +Filesystem is clean
 +Tree height: 2
 +Hash function used to sort names: "r5"
 +Objectid map size 2, max 972
 +Journal parameters:
 +        Device [0x0]
 +        Magic [0x345d673e]
 +        Size 8193 blocks (including 1 for journal header) (first block 18)
 +        Max transaction length 1024 blocks
 +        Max batch size 900 blocks
 +        Max commit age 30
 +Blocks reserved by journal: 0
 +Fs state field: 0x0:
 +sb_version: 2
 +inode generation number: 0
 +UUID: 95c81e34-2215-4b96-be47-e5368444f19a
 +LABEL: 
 +Set flags in SB:
 +        ATTRIBUTES CLEAN
 +Mount count: 1
 +Maximum mount count: 30
 +Last fsck run: Wed Apr 27 13:37:02 2022
 +Check interval in days: 180
 +</code>
 +
 +===LAB #14 - Ajouter une Etiquette au Système de Fichiers ReiserFS===
 +
 +Utilisez la commande **reiserfstune** pour associer une étiquette au système de fichiers :
 +
 +<code>
 +root@debian11:~# reiserfstune -l my_reiserfs /dev/sdc8
 +reiserfstune: Journal device has not been specified. Assuming journal is on the main device (/dev/sdc8).
 +
 +Current parameters:
 +
 +Filesystem state: consistent
 +
 +Reiserfs super block in block 16 on 0x828 of format 3.6 with standard journal
 +Count of blocks on the device: 128000
 +Number of bitmaps: 4
 +Blocksize: 4096
 +Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 119785
 +Root block: 8211
 +Filesystem is clean
 +Tree height: 2
 +Hash function used to sort names: "r5"
 +Objectid map size 2, max 972
 +Journal parameters:
 +        Device [0x0]
 +        Magic [0x345d673e]
 +        Size 8193 blocks (including 1 for journal header) (first block 18)
 +        Max transaction length 1024 blocks
 +        Max batch size 900 blocks
 +        Max commit age 30
 +Blocks reserved by journal: 0
 +Fs state field: 0x0:
 +sb_version: 2
 +inode generation number: 0
 +UUID: 95c81e34-2215-4b96-be47-e5368444f19a
 +LABEL: my_reiserfs
 +Set flags in SB:
 +        ATTRIBUTES CLEAN
 +Mount count: 1
 +Maximum mount count: 30
 +Last fsck run: Wed Apr 27 13:37:02 2022
 +Check interval in days: 180
 +</code>
 +
 +<WRAP center round important>
 +**Important** - Notez que l'étiquette doit être de 16 caractères maximum.
 +</WRAP>
 +
 +Dernièrement, pour obtenir l'UUID du système de fichiers, utilisez les commandes **debugreiserfs** et **grep** :
 +
 +<code>
 +root@debian11:~# debugreiserfs /dev/sdc8 | grep UUID
 +debugreiserfs 3.6.27
 +
 +UUID: 95c81e34-2215-4b96-be47-e5368444f19a
 +</code>
  
 ====JFS==== ====JFS====
Ligne 1721: Ligne 1880:
  
 Pour plus d'informations concernant JFS, consultez **[[http://en.wikipedia.org/wiki/JFS_(file_system)|cette page]]**. Pour plus d'informations concernant JFS, consultez **[[http://en.wikipedia.org/wiki/JFS_(file_system)|cette page]]**.
 +
 +Avant de continuer, installer le paquet **jfsutils** :
 +
 +<code>
 +root@debian11:~# apt-get -y install jfsutils
 +</code>
 +
 +===LAB #21 - Créer un Système de Fichiers JFS===
 +
 +Créez un système de fichiers JFS sur **/dev/sdc5** :
 +
 +<code>
 +root@debian11:~# mkfs.jfs /dev/sdc5
 +mkfs.jfs version 1.1.15, 04-Mar-2011
 +Warning!  All data on device /dev/sdc5 will be lost!
 +
 +Continue? (Y/N) y
 +   |
 +
 +Format completed successfully.
 +
 +512000 kilobytes total disk space.
 +</code>
 +
 +Consultez maintenant les caractéristiques du système de fichier :
 +
 +<code>
 +root@debian11:~# jfs_tune -l /dev/sdc5
 +jfs_tune version 1.1.15, 04-Mar-2011
 +
 +JFS filesystem superblock:
 +
 +JFS magic number:       'JFS1'
 +JFS version:            1
 +JFS state:              clean
 +JFS flags:              JFS_LINUX  JFS_COMMIT  JFS_GROUPCOMMIT  JFS_INLINELOG  
 +Aggregate block size:   4096 bytes
 +Aggregate size:         1019464 blocks
 +Physical block size:    512 bytes
 +Allocation group size:  8192 aggregate blocks
 +Log device number:      0x0
 +Filesystem creation:    Wed Apr 27 13:48:33 2022
 +Volume label:           ''   
 +</code>
 +
 +===LAB #15 - Ajouter une Etiquette au Système de Fichiers JFS===
 +
 +Utilisez la commande **jfs_tune** pour associer une étiquette au système de fichiers :
 +
 +<code>
 +root@debian11:~# jfs_tune -L my_jfs /dev/sdc5
 +jfs_tune version 1.1.15, 04-Mar-2011
 +Volume label updated successfully.
 +
 +root@debian11:~# jfs_tune -l /dev/sdc5
 +jfs_tune version 1.1.15, 04-Mar-2011
 +
 +JFS filesystem superblock:
 +
 +JFS magic number:       'JFS1'
 +JFS version:            1
 +JFS state:              clean
 +JFS flags:              JFS_LINUX  JFS_COMMIT  JFS_GROUPCOMMIT  JFS_INLINELOG  
 +Aggregate block size:   4096 bytes
 +Aggregate size:         1019464 blocks
 +Physical block size:    512 bytes
 +Allocation group size:  8192 aggregate blocks
 +Log device number:      0x0
 +Filesystem creation:    Wed Apr 27 13:48:33 2022
 +Volume label:           'my_jfs'
 +</code>
 +
 +<WRAP center round important>
 +**Important** - Notez que l'étiquette doit être de 16 caractères maximum.
 +</WRAP>
 +
 +Créez maintenant un UUID pour le système de fichiers :
 +
 +<code>
 +root@debian11:~# jfs_tune -U random /dev/sdc5
 +jfs_tune version 1.1.15, 04-Mar-2011
 +UUID updated successfully.
 +</code>
 +
 +Dernièrement, pour visualiser l'UUID du système de fichiers, utilisez les commandes **jfs_tune** et **grep** :
 +
 +<code>
 +root@debian11:~# jfs_tune -l /dev/sdc5 | grep UUID
 +File system UUID:       9fc2208f-9b6f-400a-8b0f-4b584f3edaaa
 +External log UUID:      00000000-0000-0000-d01e-21e2fe7f0000
 +</code>
  
 ====Btrfs==== ====Btrfs====
Ligne 1735: Ligne 1985:
   * Btrfs gère le RAID 0 ainsi que le RAID 1 logiciel,   * Btrfs gère le RAID 0 ainsi que le RAID 1 logiciel,
   * Btrfs gère la comprssion du système de fichiers.   * Btrfs gère la comprssion du système de fichiers.
 +
 +Avant de continuer, installer le paquet **btrfs-progs** :
 +
 +<code>
 +root@debian11:~# apt-get -y install btrfs-progs
 +</code>
 +
 +===LAB #16 - Créer un Système de Fichiers Btrfs===
 +
 +Créez un système de fichiers Btrfs sur **/dev/sdc5** :
 +
 +<code>
 +root@debian11:~# mkfs.btrfs /dev/sdc5
 +btrfs-progs v5.10.1 
 +See http://btrfs.wiki.kernel.org for more information.
 +
 +/dev/sdc5 appears to contain an existing filesystem (jfs).
 +ERROR: use the -f option to force overwrite of /dev/sdc5
 +
 +root@debian11:~# mkfs.btrfs -f /dev/sdc5
 +btrfs-progs v5.10.1 
 +See http://btrfs.wiki.kernel.org for more information.
 +
 +Label:              (null)
 +UUID:               6030b3a7-a3f0-4af8-b00e-988e43c91784
 +Node size:          16384
 +Sector size:        4096
 +Filesystem size:    500.00MiB
 +Block group profiles:
 +  Data:             single            8.00MiB
 +  Metadata:         DUP              32.00MiB
 +  System:           DUP               8.00MiB
 +SSD detected:       no
 +Incompat features:  extref, skinny-metadata
 +Runtime features:   
 +Checksum:           crc32c
 +Number of devices:  1
 +Devices:
 +   ID        SIZE  PATH
 +    1   500.00MiB  /dev/sdc5
 +</code>
 +
 +Montez la partition btrfs sur /mnt :
 +
 +<code>
 +root@debian11:~# mount -t btrfs /dev/sdc5 /mnt/
 +root@debian11:~# mount | grep btrfs
 +/dev/sdc5 on /mnt type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
 +</code>
 +
 +Sous Btrfs, il est possible de créer des sous volumes. Pour comprendre, comparez notre partition Btrfs à un VG et des sous volumes comme des LV :
 +
 +<code>
 +root@debian11:~# btrfs subvolume create /mnt/volume1
 +Create subvolume '/mnt/volume1'
 +
 +root@debian11:~# btrfs subvolume list /mnt/
 +ID 256 gen 7 top level 5 path volume1
 +</code>
 +
 +<WRAP center round important>
 +**Important** - L'ID identifie le volume d'une manière unique.
 +</WRAP>
 +
 +===LAB #17 - Convertir un Système de Fichiers Ext4 en Brtfs===
 +
 +Créez un système de fichiers Ext4 sur **/dev/sdc10** :
 +
 +<code>
 +root@debian11:~# mkfs.ext4 -b 4096 /dev/sdc10
 +mke2fs 1.46.2 (28-Feb-2021)
 +/dev/sdc10 contains a ext4 file system
 +        created on Thu Apr 28 05:36:22 2022
 +Proceed anyway? (y,N) y
 +Discarding device blocks: done                            
 +Creating filesystem with 128000 4k blocks and 128000 inodes
 +Filesystem UUID: 592f92f2-9d1b-40bf-89b3-24b35b59621b
 +Superblock backups stored on blocks: 
 +        32768, 98304
 +
 +Allocating group tables: done                            
 +Writing inode tables: done                            
 +Creating journal (4096 blocks): done
 +Writing superblocks and filesystem accounting information: done
 +</code>
 +
 +Convertissez maintenant le systèm de fichiers Ext4 en Btrfs :
 +
 +<code>
 +root@debian11:~# btrfs-convert /dev/sdc10
 +create btrfs filesystem:
 +        blocksize: 4096
 +        nodesize:  16384
 +        features:  extref, skinny-metadata (default)
 +        checksum:  crc32c
 +free space report:
 +        total:     524288000
 +        free:      390004736 (74.39%)
 +creating ext2 image file
 +creating btrfs metadata
 +copy inodes [o] [         0/        11]
 +conversion complete 
 +</code>
 +
 +Visualisez les systèmes de fichiers Btrfs :
 +
 +<code>
 +root@debian11:~# btrfs filesystem show
 +Label: none  uuid: 6030b3a7-a3f0-4af8-b00e-988e43c91784
 +        Total devices 1 FS bytes used 144.00KiB
 +        devid    1 size 500.00MiB used 88.00MiB path /dev/sdc5
 +
 +Label: none  uuid: ebdf4e62-3dc5-4bd3-8dc2-988ad5e680e8
 +        Total devices 1 FS bytes used 32.62MiB
 +        devid    1 size 500.00MiB used 163.00MiB path /dev/sdc10
 +</code>
 +
 +Ajouter la partition /dev/sdc10 à /mnt :
 +
 +<code>
 +root@debian11:~# btrfs device add /dev/sdc10 /mnt/
 +/dev/sdc10 appears to contain an existing filesystem (btrfs).
 +
 +ERROR: use the -f option to force overwrite of /dev/sdc10
 +
 +root@debian11:~# btrfs device add -f /dev/sdc10 /mnt/
 +
 +root@debian11:~# df -h
 +Filesystem      Size  Used Avail Use% Mounted on
 +udev            1.9G      1.9G   0% /dev
 +tmpfs           394M  904K  393M   1% /run
 +/dev/sdb1        31G  3.5G   26G  13% /
 +tmpfs           2.0G      2.0G   0% /dev/shm
 +tmpfs           5.0M      5.0M   0% /run/lock
 +tmpfs           394M   44K  394M   1% /run/user/113
 +tmpfs           394M   40K  394M   1% /run/user/1000
 +/dev/sdc5      1000M  3.6M  918M   1% /mnt
 +
 +root@debian11:~# btrfs filesystem show
 +Label: none  uuid: 6030b3a7-a3f0-4af8-b00e-988e43c91784
 +        Total devices 2 FS bytes used 144.00KiB
 +        devid    1 size 500.00MiB used 88.00MiB path /dev/sdc5
 +        devid    2 size 500.00MiB used 0.00B path /dev/sdc10
 +
 +root@debian11:~# btrfs filesystem df /mnt/
 +Data, single: total=8.00MiB, used=0.00B
 +System, DUP: total=8.00MiB, used=16.00KiB
 +Metadata, DUP: total=32.00MiB, used=144.00KiB
 +GlobalReserve, single: total=3.25MiB, used=0.00B
 +</code>
 +
 +===LAB #18 - Créer un Snapshot===
 +
 +Creéz un snapshot du volume /mnt :
 +
 +<code>
 +root@debian11:~# btrfs subvolume snapshot /mnt /mnt/snapshot
 +Create a snapshot of '/mnt' in '/mnt/snapshot'
 +
 +root@debian11:~# ls -l /mnt
 +total 16
 +drwxr-xr-x 1 root root 14 Apr 28 05:31 snapshot
 +drwxr-xr-x 1 root root  0 Apr 28 05:33 volume1
 +</code>
 +
 +Démontez le système de fichiers btrfs :
 +
 +<code>
 +root@debian11:~# umount /mnt
 +</code>
 +
 +Montez ensuite le snapshot :
 +
 +<code>
 +root@debian11:~# mount -o subvol=snapshot /dev/sdc5 /mnt/
 +
 +root@debian11:~# ls -l /mnt
 +total 0
 +drwxr-xr-x 1 root root 0 Apr 28 05:46 volume1
 +
 +root@debian11:~# btrfs filesystem df /mnt/
 +Data, single: total=8.00MiB, used=0.00B
 +System, DUP: total=8.00MiB, used=16.00KiB
 +Metadata, DUP: total=32.00MiB, used=144.00KiB
 +GlobalReserve, single: total=3.25MiB, used=0.00B
 +</code>
 +
 +===LAB #19 - Ajouter une Etiquette au Système de Fichiers Btrfs===
 +
 +Pour voir les caractéristques du système de fichiers Btrfs, utilisez la commande suivante :
 +
 +<code>
 +root@debian11:~# btrfs inspect-internal dump-super /dev/sdc5
 +superblock: bytenr=65536, device=/dev/sdc5
 +---------------------------------------------------------
 +csum_type               0 (crc32c)
 +csum_size               4
 +csum                    0xc63d381f [match]
 +bytenr                  65536
 +flags                   0x1
 +                        ( WRITTEN )
 +magic                   _BHRfS_M [match]
 +fsid                    6030b3a7-a3f0-4af8-b00e-988e43c91784
 +metadata_uuid           6030b3a7-a3f0-4af8-b00e-988e43c91784
 +label
 +generation              12
 +root                    30441472
 +sys_array_size          129
 +chunk_root_generation   8
 +root_level              0
 +chunk_root              22020096
 +chunk_root_level        0
 +log_root                0
 +log_root_transid        0
 +log_root_level          0
 +total_bytes             1048576000
 +bytes_used              163840
 +sectorsize              4096
 +nodesize                16384
 +leafsize (deprecated)   16384
 +stripesize              4096
 +root_dir                6
 +num_devices             2
 +compat_flags            0x0
 +compat_ro_flags         0x0
 +incompat_flags          0x141
 +                        ( MIXED_BACKREF |
 +                          EXTENDED_IREF |
 +                          SKINNY_METADATA )
 +cache_generation        12
 +uuid_tree_generation    12
 +dev_item.uuid           ee13b782-2ecb-443a-8703-b44206bab1e3
 +dev_item.fsid           6030b3a7-a3f0-4af8-b00e-988e43c91784 [match]
 +dev_item.type           0
 +dev_item.total_bytes    524288000
 +dev_item.bytes_used     92274688
 +dev_item.io_align       4096
 +dev_item.io_width       4096
 +dev_item.sector_size    4096
 +dev_item.devid          1
 +dev_item.dev_group      0
 +dev_item.seek_speed     0
 +dev_item.bandwidth      0
 +dev_item.generation     0
 +</code>
 +
 +Créez un une etiquette avec la commande **btrfs filesystem label** :
 +
 +<code>
 +root@debian11:~# btrfs filesystem label /mnt my_btrfs
 +
 +root@debian11:~# btrfs inspect-internal dump-super /dev/sdc5
 +superblock: bytenr=65536, device=/dev/sdc5
 +---------------------------------------------------------
 +csum_type               0 (crc32c)
 +csum_size               4
 +csum                    0x981c9953 [match]
 +bytenr                  65536
 +flags                   0x1
 +                        ( WRITTEN )
 +magic                   _BHRfS_M [match]
 +fsid                    6030b3a7-a3f0-4af8-b00e-988e43c91784
 +metadata_uuid           6030b3a7-a3f0-4af8-b00e-988e43c91784
 +label                   my_btrfs
 +generation              13
 +root                    30523392
 +sys_array_size          129
 +chunk_root_generation   8
 +root_level              0
 +chunk_root              22020096
 +chunk_root_level        0
 +log_root                0
 +log_root_transid        0
 +log_root_level          0
 +total_bytes             1048576000
 +bytes_used              163840
 +sectorsize              4096
 +nodesize                16384
 +leafsize (deprecated)   16384
 +stripesize              4096
 +root_dir                6
 +num_devices             2
 +compat_flags            0x0
 +compat_ro_flags         0x0
 +incompat_flags          0x141
 +                        ( MIXED_BACKREF |
 +                          EXTENDED_IREF |
 +                          SKINNY_METADATA )
 +cache_generation        13
 +uuid_tree_generation    13
 +dev_item.uuid           ee13b782-2ecb-443a-8703-b44206bab1e3
 +dev_item.fsid           6030b3a7-a3f0-4af8-b00e-988e43c91784 [match]
 +dev_item.type           0
 +dev_item.total_bytes    524288000
 +dev_item.bytes_used     92274688
 +dev_item.io_align       4096
 +dev_item.io_width       4096
 +dev_item.sector_size    4096
 +dev_item.devid          1
 +dev_item.dev_group      0
 +dev_item.seek_speed     0
 +dev_item.bandwidth      0
 +dev_item.generation     0
 +</code>
 +
 +Démontez le système de fichiers btrfs :
 +
 +<code>
 +root@debian11:~# umount /mnt
 +</code>
  
 =====Comparaison des Commandes par Système de Fichiers===== =====Comparaison des Commandes par Système de Fichiers=====
Ligne 1746: Ligne 2306:
 | File system debugger | debugfs | debugfs | xfs_db | debugreiserfs | jfs_debugfs | btrfs-debug-tree | | File system debugger | debugfs | debugfs | xfs_db | debugreiserfs | jfs_debugfs | btrfs-debug-tree |
 | Change the label on a filesystem | e2label | e2label | xfs_admin | reiserfstune | jfs_tune | btrfs filesystem label | | Change the label on a filesystem | e2label | e2label | xfs_admin | reiserfstune | jfs_tune | btrfs filesystem label |
 +
 +=====Systèmes de Fichiers Chiffrés=====
 +
 +====LAB #20 - Créer un Système de Fichiers Chiffré avec encryptfs=====
 +
 +Commencez par installer le paquet **ecryptfs-utils** dans la machine virtuelle Debian 11 :
 +
 +<code>
 +root@debian11:~# apt-get -y install ecryptfs-utils
 +</code>
 +
 +Remontez /mnt/sdc12 sur lui-même en spécifiant le type de fichiers en tant qu'encryptfs :
 +
 +<code>
 +root@debian11:~# mount -t ecryptfs /mnt/sdc12 /mnt/sdc12
 +Select key type to use for newly created files: 
 + 1) tspi
 + 2) passphrase
 +Selection: 2
 +Passphrase: 
 +Select cipher: 
 + 1) aes: blocksize = 16; min keysize = 16; max keysize = 32
 + 2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56
 + 3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24
 + 4) twofish: blocksize = 16; min keysize = 16; max keysize = 32
 + 5) cast6: blocksize = 16; min keysize = 16; max keysize = 32
 + 6) cast5: blocksize = 8; min keysize = 5; max keysize = 16
 +Selection [aes]: 1
 +Select key bytes: 
 + 1) 16
 + 2) 32
 + 3) 24
 +Selection [16]: 1
 +Enable plaintext passthrough (y/n) [n]: n
 +Enable filename encryption (y/n) [n]: y
 +Filename Encryption Key (FNEK) Signature [91aefde99b5a4977]: 
 +Attempting to mount with the following options:
 +  ecryptfs_unlink_sigs
 +  ecryptfs_fnek_sig=91aefde99b5a4977
 +  ecryptfs_key_bytes=16
 +  ecryptfs_cipher=aes
 +  ecryptfs_sig=91aefde99b5a4977
 +WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
 +it looks like you have never mounted with this key 
 +before. This could mean that you have typed your 
 +passphrase wrong.
 +
 +Would you like to proceed with the mount (yes/no)? : yes
 +Would you like to append sig [91aefde99b5a4977] to
 +[/root/.ecryptfs/sig-cache.txt] 
 +in order to avoid this warning in the future (yes/no)? : yes
 +Successfully appended new sig to user sig cache file
 +Mounted eCryptfs
 +</code>
 +
 +Ce montage est visible dans la sortie de la commande **df** :
 +
 +<code>
 +root@debian11:~# df -h
 +Filesystem      Size  Used Avail Use% Mounted on
 +udev            1.9G      1.9G   0% /dev
 +tmpfs           394M  904K  393M   1% /run
 +/dev/sdb1        31G  3.5G   26G  13% /
 +tmpfs           2.0G      2.0G   0% /dev/shm
 +tmpfs           5.0M      5.0M   0% /run/lock
 +tmpfs           394M   44K  394M   1% /run/user/113
 +/dev/sdc11      474M   14K  445M   1% /mnt/sdc11
 +/mnt/sdc12      189M   32K  175M   1% /mnt/sdc12
 +tmpfs           394M   40K  394M   1% /run/user/1000
 +</code>
 +
 +Plus de détails sont visibles avec la commande **mount** :
 +
 +<code>
 +root@debian11:~# mount | tail
 +mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
 +hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
 +debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
 +configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
 +fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
 +tmpfs on /run/user/113 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=113,gid=121)
 +/dev/sdc11 on /mnt/sdc11 type ext4 (rw,relatime)
 +/dev/sdc12 on /mnt/sdc12 type ext4 (rw,relatime)
 +tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=1000,gid=1000)
 +/mnt/sdc12 on /mnt/sdc12 type ecryptfs (rw,relatime,ecryptfs_fnek_sig=91aefde99b5a4977,ecryptfs_sig=91aefde99b5a4977,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)
 +</code>
 +
 +Créez maintenant le fichier **encrypt** contenant la chaîne de caractères **fenestros** dans /mnt/sdc12 :
 +
 +<code>
 +root@debian11:~# touch /mnt/sdc12/encrypt
 +
 +root@debian11:~# echo "fenestros" > /mnt/sdc12/encrypt
 +
 +root@debian11:~# cat /mnt/sdc12/encrypt
 +fenestros
 +</code>
 +
 +Démontez maintenant /mnt/sdc12 :
 +
 +<code>
 +root@debian11:~# umount /mnt/sdc12
 +
 +root@debian11:~# mount | tail
 +tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
 +mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
 +hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
 +debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
 +configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
 +fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
 +tmpfs on /run/user/113 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=113,gid=121)
 +/dev/sdc11 on /mnt/sdc11 type ext4 (rw,relatime)
 +/dev/sdc12 on /mnt/sdc12 type ext4 (rw,relatime)
 +tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=402556k,nr_inodes=100639,mode=700,uid=1000,gid=1000)
 +</code>
 +
 +<WRAP center round important>
 +**Important** : Notez que /dev/sdc12 est toujours monté sur /mnt/sdc12.
 +</WRAP>
 +
 +Constatez maintenant le contenu de /mnt/sdc12 :
 +
 +<code>
 +root@debian11:~# ls -l /mnt/sdc12
 +total 25
 +-rw-r--r-- 1 root root    11 Apr 27 12:15 check_file
 +-rw-r--r-- 1 root root 12288 Apr 28 06:12 ECRYPTFS_FNEK_ENCRYPTED.FWaFfjrdapd7RkRCT3OFIdaE.-6mxquDYm8R4p7VFuV0SGgSJauuQJ2hEE--
 +drwx------ 2 root root 12288 Apr 27 12:11 lost+found
 +</code>
 +
 +<WRAP center round important>
 +**Important** : Notez que le nom du fichier **encrypt** a été chiffré. 
 +</WRAP>
 +
 +Constatez maintenant le contenu du fichier **ECRYPTFS_FNEK_ENCRYPTED.FWaFfjrdapd7RkRCT3OFIdaE.-6mxquDYm8R4p7VFuV0SGgSJauuQJ2hEE--** :
 +
 +<code>
 +root@debian11:~# cat /mnt/sdc12/ECRYPTFS_FNEK_ENCRYPTED.FWaFfjrdapd7RkRCT3OFIdaE.-6mxquDYm8R4p7VFuV0SGgSJauuQJ2hEE-- 
 +
 +KnwM
 +"3DUfw`6.X0XgRɍ2 _CONSOLEZIw#t+X
 +                                qF3|2m&б9CHlú)Tn%A^cư[kLز
 +N۟                                                        hʿ     5uxΠRNbb&<[RnIpz,0nKjC\yɂeZ5qmE:K:<\ґҒϑUY9^E|hW!|Ѹd\R^B*/h5)Q͊8b PjQ]z[l0q bhXnM`rAgM}{xc\DçYMuȪ=3u|ivcWV3P6<#F#[<TP&ǖn;6pF-0!l}uz$zZENCriFWғLMTVj3
 +?9xdQp$X.x`?L"4;5sQf0|%V5ڽn"DЋ!*MfsPU9R'(eq^ㆶNU
 +                                                ڹe|\Z۰_NIBik1>UGD.S'}$9 hdc-`IDX}Qf0\Gv w-Cdfj{+K%m     T=pT)(  H&d`\/yb1}      FБ}ff(JϝĀ,~"-Ou֌4
 +JЮI/2\H[pi
 +)B亭v]?~p4=x\OF? *1)
 +                    v/RD+˯{GB8\IGiwݰ
 +                                    uAc~anvͺ
 +                                            2ۼ|tΑ=\{5+4_z+oF    L>Xx$*eVCb p(
 +L&a0Y'$?_P\b;d}7r(`'++bꖼ/0Kmm5-<,3[RkmWGuLOPΦUG_!34$ia* U                    %}(ԺQ2     B*ܓI$.@s?![o-}S{=,k2k]к8dhn@s%? T̄z,k]jqc
 +хِ:F;$Z0#+0Sd8f\YBc3VG̓薣IAq
 +                          >BA4XGlfF$2scB4lo#OZ+yCEZ^_
 +(@'`'i\B~[[K.ohc6Qw/                               y>8ok
 +                      L
 +M+LMw   e>發nߕ>rʏɅpB(iֈ5VY#DA͗?z)Òpr(
 +'3c}%71k !F_Ю`ĪFs!]LD
 +p/&8`{?H<UI<|1xU2f3F횯1KM伳2P)䳤;ي}U?'T9UP@wp娛lkzLǀb<1(ux
 +*a+n
 +]HDuƢ:#]`]^Bӹ3LA:euGqHϿ.g致rp凐8N!e)}Gs["aS)bX.Ny;6$᭥óymMR逓+
 +                                                             ߄pk#D>'
 +                                                                    %'A<8땬/ph`kF{-Noh+C̝+~;pqoqE]d )m)'ِt}al*Qh%sּo?%BBo4OМ7&vEBF9i*aApjm8|=QlwmWtz`#Ɣ~3(=eR3SfU @u2
 +n
 +BD^DoskY}N8S7ۉɜ^b]1W-?DqQarpv~>!hIkXά@Cow&XJ<Hḙ(uГu{c/mdˡS&.GFp7euk)OI!-(!%eL0F
 +x]Ҁ@0خ)
 +       噳60)G*
 +m^xveʧfo|ȃ'wn^^b[H᠃_Bg+&;~b     Zvn,Ÿ́4Z2<.}`-sTUn k5(1r\rvf_n{fЩ
 +                                                                $f6YWƐٛK4m0|c$!y
 +                                                                               /Yܥos3G{zƿ_+~)/z@h1!vn"h
 +                                                                                                       *l+uyBeҳ{p%|V)EauM(N mJ=%XUx-bScF&
 +                                                                                                                                         6q@dc!B˾LG)b6tT6'hD4E8-mӈ
 +                                                                                                                                                                        d(<v!RXݜӡd%~IjaՎzb)Q'8j#K9DZr+9?,H!q4
 +:UؚX*d
 +KmPem&btʫesHc^J91Fplq4CL\چF     sIwҔ@*:H& {K.rT7M9<i
 +q6fuSf93        ڋa7qP[TrR_V0, n9 i
 +                                    pe5
 +kf,`F'+}VezEuBv,_4 ~g/M90m>ꑒLٶ5,i)ؽc%ߡ~4a-*au`ӻ0_~;[9"n]ޠm#3PrY~(S3:J66fu%DA|wWFI%ܕr{EȐ(7TK
 +                                                                                            eI\1Nx^}
 +G9+|NhKp֊hƌ-dJh<                                                                                  .&Ͽaukw6!Q菦J_FIc|t.],uTlf3vc?4Zy,zBl(]^uZք5"gsBii/:aHak[$kx@6- Ps.@
 +_4QԈ$Nn:``թc#
 +              73F5
 +                  3ּl:9`Qg걣3 GwTroot@debian11:~# 
 +</code>
 +
 +<WRAP center round important>
 +**Important** : Notez que le contenu du fichier **encrypt** a été chiffré. Pour pouvoir lire le nom et le contenu de ce fichier de nouveau, il faut remonter /mnt/sdc12 en spécifiant les mêmes options ainsi que la même passphrase. Notez que si vous vous trompez au niveau de la passphrase ceci n’empêchera pas le processus de montage. Par contre vous ne pourrez ni lire le nom ni lire le contenu du fichier chiffré.
 +</WRAP>
 +
 +====LAB #28 - Créer un Système de Fichiers Chiffré avec LUKS=====
 +
 +===Présentation===
 +
 +**LUKS** ( Linux Unified Key Setup ) permet de chiffrer l'intégralité d'un disque de telle sorte que celui-ci soit utilisable sur d'autres plates-formes et distributions de Linux (voire d'autres systèmes d'exploitation). Il supporte des mots de passe multiples, afin que plusieurs utilisateurs soient en mesure de déchiffrer le même volume sans partager leur mot de passe.
 +
 +==Mise en Place==
 +
 +Commencez par installer le paquet **cryptsetup** :
 +
 +<code>
 +root@debian11:/# apt-get -y install cryptsetup
 +</code>
 +
 +Remplissez la partition /dev/sdc11 avec des données aléatoires :
 +
 +<code>
 +root@debian11:~# shred -v --iterations=1 /dev/sdc11
 +shred: /dev/sdc11: pass 1/1 (random)...
 +shred: /dev/sdc11: pass 1/1 (random)...474MiB/500MiB 94%
 +shred: /dev/sdc11: pass 1/1 (random)...500MiB/500MiB 100%
 +</code>
 +
 +<WRAP center round important>
 +**Important** : L'étape ci-dessus est très importante parce que elle permet de s'assurer qu'aucune donnée ne reste sur la partition.
 +</WRAP>
 +
 +Démontez /dev/sdc11 :
 +
 +<code>
 +root@debian11:/# umount /mnt/sdc11
 +</code>
 +
 +Initialisez la partition avec LUKS :
 +
 +<code>
 +root@debian11:~# cryptsetup --verbose --verify-passphrase luksFormat /dev/sdc11
 +
 +WARNING!
 +========
 +This will overwrite data on /dev/sdc11 irrevocably.
 +
 +Are you sure? (Type 'yes' in capital letters): YES
 +Enter passphrase for /dev/sdc11: fenestros123456789
 +Verify passphrase: fenestros123456789
 +Key slot 0 created.
 +Command successful.
 +</code>
 +
 +<WRAP center round important>
 +**Important** : La passphrase ne sera pas en claire. Elle l'est ici pour vous montrer un mot de passe acceptable pour LUKS.
 +</WRAP>
 +
 +Ouvrez la partition LUKS en lui donnant le nom **sdc11** :
 +
 +<code>
 +root@debian11:~# cryptsetup luksOpen /dev/sdc11 sdc11
 +Enter passphrase for /dev/sdc11: fenestros123456789
 +</code>
 +
 +Vérifiez que le système voit la partition :
 +
 +<code>
 +root@debian11:~# ls -l /dev/mapper | grep sdc11
 +lrwxrwxrwx 1 root root       7 Apr 28 06:26 sdc11 -> ../dm-2
 +</code>
 +
 +Créez maintenant un système de fichiers sur **/dev/mapper/sdc11** :
 +
 +<code>
 +root@debian11:~# mkfs.ext4 /dev/mapper/sdc11
 +mke2fs 1.46.2 (28-Feb-2021)
 +Creating filesystem with 495616 1k blocks and 123952 inodes
 +Filesystem UUID: cc35e698-6915-4cb3-a0ca-e76bce705be1
 +Superblock backups stored on blocks: 
 +        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
 +
 +Allocating group tables: done                            
 +Writing inode tables: done                            
 +Creating journal (8192 blocks): done
 +Writing superblocks and filesystem accounting information: done 
 +</code>
 +
 +Montez la partition LUKS :
 +
 +<code>
 +root@debian11:/# mount /dev/mapper/sdc11 /mnt/sdc11
 +</code>
 +
 +Vérifiez la présence du montage :
 +
 +<code>
 +root@debian11:~# df -h | grep sdc11
 +/dev/mapper/sdc11  459M   14K  431M   1% /mnt/sdc11
 +</code>
 +
 +Editez le fichier **/etc/crypttab/** :
 +
 +<code>
 +root@debian11:~# vi /etc/crypttab
 +
 +root@debian11:~# cat /etc/crypttab
 +# <target name> <source device>         <key file>      <options>
 +sdc11 /dev/sdc11 none
 +</code>
 +
 +Modifiez le fichier **/etc/fstab** :
 +
 +<code>
 +root@debian11:~# vi /etc/fstab
 +
 +root@debian11:~# cat /etc/fstab
 +# /etc/fstab: static file system information.
 +#
 +# Use 'blkid' to print the universally unique identifier for a
 +# device; this may be used with UUID= as a more robust way to name devices
 +# that works even if disks are added and removed. See fstab(5).
 +#
 +# systemd generates mount units based on this file, see systemd.mount(5).
 +# Please run 'systemctl daemon-reload' after making changes here.
 +#
 +# <file system> <mount point>   <type>  <options>       <dump>  <pass>
 +# / was on /dev/sda1 during installation
 +UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e /               ext4    errors=remount-ro 0       1
 +# swap was on /dev/sda5 during installation
 +UUID=1f9439f5-4b19-49b1-b292-60c2c674cee9 none            swap    sw              0       0
 +/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto           0
 +/dev/mapper/sdc11                                     /mnt/sdc11                      ext4        defaults            1 2
 +</code>
 +
 +==Ajouter une deuxième Passphrase==
 +
 +Pour ajouter une deuxième passphrase, utilisez la commande cryptsetup avec la sous-commande **luksAddKey** :
 +
 +<code>
 +root@debian11:~# cryptsetup luksAddKey /dev/sdc11
 +Enter any existing passphrase: fenestros123456789
 +Enter new passphrase for key slot: debian123456789
 +Verify passphrase: debian123456789
 +</code>
 +
 +<WRAP center round important>
 +**Important** : Les passphrases ne seront pas en claire. Elle le sont ici pour vous montrer des mots de passe acceptables pour LUKS.
 +</WRAP>
 +
 +==Supprimer une Passphrase==
 +
 +Pour supprimer une passphrase, utilisez la commande cryptsetup avec la sous-commande **luksRemoveKey** :
 +
 +<code>
 +root@debian11:~# cryptsetup luksRemoveKey /dev/sdc11
 +Enter passphrase to be deleted: debian123456789
 +</code>
 +
 +<WRAP center round important>
 +**NE PAS FAIRE** : Lors du démarrage de la machine virtuelle, le système vous demandera d'entrer la passphrase **fenestros123456789** pour permettre le montage de /dev/sdc11.
 +</WRAP>
  
 =====Le Swap===== =====Le Swap=====
Ligne 1949: Ligne 2854:
 rm: remove regular file '/swap'? y rm: remove regular file '/swap'? y
 </code> </code>
 +
 +=====Commandes Diverses=====
 +
 +====La Commande sync====
 +
 +La commande sync synchronise les données de fichier correspondantes dans la mémoire volatile et le stockage permanent. Les écritures en cache sont immédiatement écrites sur le disque.
 +
 +Les options de cette commande sont :
 +
 +<code>
 +[root@centos8 ~]# sync --help
 +Usage: sync [OPTION] [FILE]...
 +Synchronize cached writes to persistent storage
 +
 +If one or more files are specified, sync only them,
 +or their containing file systems.
 +
 +  -d, --data             sync only file data, no unneeded metadata
 +  -f, --file-system      sync the file systems that contain the files
 +      --help     display this help and exit
 +      --version  output version information and exit
 +
 +GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
 +Full documentation at: <https://www.gnu.org/software/coreutils/sync>
 +or available locally via: info '(coreutils) sync invocation'
 +</code>
 +
 +====La Commande fstrim====
 +
 +La commande **fstrim** est utilisée sur un système de fichiers monté pour abandonner (ou rogner) les blocs qui ne sont pas utilisés par le système de fichiers. C'est pratique pour les SSD et l'allocation fine et dynamique (thinly-provisioned storage).
 +
 +Les options de cette commande sont :
 +
 +<code>
 +[root@centos8 ~]# fstrim --help
 +
 +Usage:
 + fstrim [options] <mount point>
 +
 +Discard unused blocks on a mounted filesystem.
 +
 +Options:
 + -a, --all           trim all mounted filesystems that are supported
 + -o, --offset <num>  the offset in bytes to start discarding from
 + -l, --length <num>  the number of bytes to discard
 + -m, --minimum <num> the minimum extent length to discard
 + -v, --verbose       print number of discarded bytes
 +
 + -h, --help          display this help
 + -V, --version       display version
 +
 +For more details see fstrim(8).
 +</code>
 +
 +====Le Daemon smartd====
 +
 +SMART (Self-Monitoring, Analysis and Reporting Technology) est intégrée à la plupart des disques durs pour avoir des indicateurs de diagnostic. **Smartmontools** est l’outil pour exploiter la technologie SMART, notamment avec la commande smartctl et le démon smartd.
 +
 ----- -----
 Copyright © 2022 Hugh Norris. Copyright © 2022 Hugh Norris.
  
  
Menu