1. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
files, volumes
networking
security
software, patching, tracing, logging
Bibliographie
Le système Red Hat
Nicolas Ledez
06/02/2007
Nicolas Ledez Red Hat
3. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
files, volumes
networking
security
software, patching, tracing, logging
Bibliographie
Généralitées
Version de Red Hat :
Enterprise Linux ES
Basic Edition
Standard Edition
Enterprise Linux AS
Standard Edition
Premium Edition
Fedora
Nicolas Ledez Red Hat
4. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
Information hardware
files, volumes
Gestion des modules
networking
security
software, patching, tracing, logging
Bibliographie
Information hardware
dmesg
lspci
lshw *
Nicolas Ledez Red Hat
5. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
Information hardware
files, volumes
Gestion des modules
networking
security
software, patching, tracing, logging
Bibliographie
Gestion des modules
lsmod
modprobe
modprobe -r
insmod
Nicolas Ledez Red Hat
6. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
Les differents disques
files, volumes
Gestion des partitions
networking
security
software, patching, tracing, logging
Bibliographie
Les differents disques
IDE (PATA) :
/dev/hd[a-z]
SCSI et SATA :
/dev/sd[a-z]
Nicolas Ledez Red Hat
7. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap
Les differents disques
files, volumes
Gestion des partitions
networking
security
software, patching, tracing, logging
Bibliographie
Gestion des partitions
Afficher les partitions
fdisk -l /dev/sda
Modifier les partitions
parted
fdisk
sfdisk
cfdisk *
Nicolas Ledez Red Hat
8. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap Le noyau
files, volumes Les "Run level"
networking Swap
security
software, patching, tracing, logging
Bibliographie
Le noyau
Present dans /boot
Modules nécessaire au boot dans initrd
Chargé par Lilo ou Grub
Nicolas Ledez Red Hat
9. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap Le noyau
files, volumes Les "Run level"
networking Swap
security
software, patching, tracing, logging
Bibliographie
Les "Run level"
Les principaux :
0 : halt
1 : single-user
3 : default
6 : reboot
Runlevel courant :
runlevel
Nicolas Ledez Red Hat
10. Généralitées
hardware, firmware, devices
disks
kernel, boot, swap Le noyau
files, volumes Les "Run level"
networking Swap
security
software, patching, tracing, logging
Bibliographie
Swap
Informations sur le swap :
swapon -s
cat /proc/meminfo
cat /proc/swaps
free
Nicolas Ledez Red Hat
11. Généralitées
hardware, firmware, devices
Généralitées
disks
Schéma LVM
kernel, boot, swap
PV et VG
files, volumes
LV
networking
Creation d’un volume
security
Extention d’un volume
software, patching, tracing, logging
Bibliographie
Généralitées
Système de fichier :
Ext2/Ext3
ReiserFS, XFS, JFS ; Ext4, ZFS ?
Gestion des volumes :
LVM 1 & 2
Nicolas Ledez Red Hat
15. Généralitées
hardware, firmware, devices
Généralitées
disks
Schéma LVM
kernel, boot, swap
PV et VG
files, volumes
LV
networking
Creation d’un volume
security
Extention d’un volume
software, patching, tracing, logging
Bibliographie
PV et VG
Physical Volume
[root@wh-addmaster ]# pvscan
PV /dev/sda2 VG rootvg lvm2 [33.66 GB / 19.50 GB free]
Total : 1 [33.66 GB] / in use : 1 [33.66 GB] / in no VG : 0 [0 ]
Volume Group
[root@wh-addmaster ]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "rootvg" using metadata type lvm2
Nicolas Ledez Red Hat
16. Généralitées
hardware, firmware, devices
Généralitées
disks
Schéma LVM
kernel, boot, swap
PV et VG
files, volumes
LV
networking
Creation d’un volume
security
Extention d’un volume
software, patching, tracing, logging
Bibliographie
LV
Logical Volume
[root@wh-addmaster ]# lvscan
ACTIVE ’/dev/rootvg/lv_root’ [1.97 GB] inherit
ACTIVE ’/dev/rootvg/lv_tmp’ [1.00 GB] inherit
ACTIVE ’/dev/rootvg/lv_usr’ [2.94 GB] inherit
ACTIVE ’/dev/rootvg/lv_var’ [2.00 GB] inherit
ACTIVE ’/dev/rootvg/lv_swap’ [1.97 GB] inherit
Nicolas Ledez Red Hat
17. Généralitées
hardware, firmware, devices
Généralitées
disks
Schéma LVM
kernel, boot, swap
PV et VG
files, volumes
LV
networking
Creation d’un volume
security
Extention d’un volume
software, patching, tracing, logging
Bibliographie
Creation d’un volume
lvcreate -L 2G –name lv_toto rootvg
mkfs.ext3 /dev/rootvg/lv_toto
mount /dev/rootvg/lv_toto /toto
Nicolas Ledez Red Hat
18. Généralitées
hardware, firmware, devices
Généralitées
disks
Schéma LVM
kernel, boot, swap
PV et VG
files, volumes
LV
networking
Creation d’un volume
security
Extention d’un volume
software, patching, tracing, logging
Bibliographie
Extention d’un volume
umount /toto
lvextend -L +2G /dev/rootvg/lv_toto
ou
lvextend -L 4G /dev/rootvg/lv_toto
e2fsck -f /dev/rootvg/lv_toto
resize2fs /dev/rootvg/lv_toto
Nicolas Ledez Red Hat