Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre...

120
REGIONALES RECHENZENTRUM ERLANGEN [ RRZE ] Systemausbildung − Grundlagen und Aspekte von Betriebssystemen und System-nahen Diensten Gregor Longariva, Marcel Ritter, 17.05.2017 Storage / Filesysteme

Transcript of Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre...

Page 1: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

REGIONALES RECHENZENTRUM ERLANGEN [RRZE]

Systemausbildung − Grundlagen und Aspekte von Betriebssystemen und System-nahen DienstenGregor Longariva, Marcel Ritter, 17.05.2017

Storage / Filesysteme

Page 2: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

2

Agenda

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 3: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

FESTPLATTEN

Prinzipieller Aufbau

Page 4: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

4

Aufbau einer Festplatte

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 5: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

5

Aufbau einer Festplatte

Spur

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 6: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

6

Aufbau einer Festplatte

Spur

Sektor

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 7: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

7

Aufbau einer Festplatte

Sektor Lücke

Präambel 4096 Datenbits ECC

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 8: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

8

Aufbau einer Festplatte

Spur

Sektor

Zylinder

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 9: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

9

Aufbau einer Festplatte

Spur

Sektor

Zylinder

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 10: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

10

Aufbau einer Festplatte

Spur

Sektor

Zylinder

Cluster

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 11: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

11

Wie schnell ist eine Platte (worst case)?

Festplatte mit 15k (= 15.000 Umdrehungen / Min)

Latenz: 15.00060 sec / = 0,004 sec -> 4ms

IOPS: 0,004 sec1 Operation / = 250 Ops / sec

Bandbreite: 250 x 4096 Bytes pro Sektor =

1MByte pro Sekunde!

1.024.000 bytes / sec

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 12: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

12

Wie schnell ist eine Platte (best case)?

1.024.000 bytes / sec

also ca. 180 MByte pro Sekunde

x 6 Köpfe = 6.144.000 Bytes / sec

6.144.000 Bytes / sec 30 (Zylinder pro Cluster) =

184.320.000 Bytes / sec

(aber immer noch ohne Plattencaches)

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 13: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

13

Plattenzugriffe beschleunigen - Cache

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 14: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

FESTPLATTEN

Partitionierung

Page 15: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

15

Partitionieren

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 16: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

16

Partitionieren – warum?

Windows

Linux

FreeBSD

verschiedene Betriebssysteme

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 17: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

17

Partitionieren – warum?

Windows

Filme

Fotos

Trennung Daten und Betriebssystem

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 18: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

18

Partitionieren – warum?

verschiedene Bereiche eines OS

/home

swap

root

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 19: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

19

Partitionieren – warum?

Arbeitskopien und Backups

Windows 8

Windos 8 Devel

Backup

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 20: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

20

Partitionieren – warum?

Verkleinern der Platte

Windows 8

Win 95a

MS-DOS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 21: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

21

Partitionieren

System-ID

83 - Linux

bf - Solaris

87 - NTFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 22: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

22

Partitionen am PC

4 Primärpartitionen

oder

3 Primärpartitionenbeliebige erweiterte Partitionen

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 23: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

23

Klassischer Bootsektor MBR vs. GPT

MBR GPT

512 Bytes

EFIBIOS

Primäre Partitionstabelle

Backup Partitionstabelle

min. 16 384 Bytes

eine Partitionstabelle

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 24: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

24

Partitionen anderer Systeme (Solaris)

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 25: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

PLATTEN ZUSAMMENFASSEN

RAID -Redundant Array of Independent Disks

Page 26: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

26

Warum RAID

mehr Speicherplatz Sicherheit gegenDatenverlust*

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 27: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

27

RAID 0

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 28: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

28

RAID 1 - Mirror

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 29: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

29

RAID 3

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 30: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

30

RAID 4

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 31: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

31

RAID 5

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 32: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

32

RAID 6

Quelle: Wikimedia17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 33: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

33

▪ Verschnitt an Speicherplatz ist gleich▪ RAID5: Hotspare wird „geschont“▪ Im Fall eines Plattendefekts:▪ RAID5 keine Redundanz (entspricht langsames Raid0)▪ Nach Einspringen der HotSpare werden alle Daten von allen

verbliebenen, intakten Platte gelesen um Parity neu zu berechnen▪ Treten Lesefehler auf, ist Rebuild ohne Datenverlust unmöglich▪ Zeitfenster für Rebuild bei großen Festplatten enorm (2 TB bei 100

MB/s = 6 Stunden!)▪ Fehlerwahrscheinlichkeit durch atypisches Lesen aller Disks ebenfalls

RAID 5 + HotSpare oder RAID 6?

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 34: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

34

RAID 5 + HotSpare oder RAID 6?

Fazit:RAID 6 ist RAID 5 + HotSpare vorzuziehen

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 35: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

DATEISYSTEME

Speicherung von Daten

Page 36: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

36

Probleme beim Speichern von Daten

Dateisysteme verwenden Cluster

Dateien sind oft größer (oder kleiner) als ein Cluster

Wie kann man nun gespeicherte Daten adressieren?

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 37: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

37

Kontinuierliche Speicherung

Chunk 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

2: Datei ALänge 5

7: Datei DLänge 5

14: Datei VLänge 2

12: leer0: leer

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 38: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

38

Verkettete Speicherung

3 7 9 1 12

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 39: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

39

Indizierte Speicherung

3 7 9 1 12

3 7 9 1 12Index-Cluster

Daten-Cluster der Datei

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 40: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

40

Indizierte Speicherung, mehrstufige Indizierung

3 7 9 1 12

3 7 9 1Index-Cluster

Daten-Cluster mit einem zusätzlichen Index Cluster

12 16 2

16

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 41: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

DATEISYSTEME

Beispiele anhand gängiger Dateisysteme

Page 42: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

42

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 43: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

43

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 44: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

44

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 45: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

45

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 46: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

46

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 47: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

47

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

3 93 16 45 0-1 0 37 …

3 93 16 45

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 48: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

48

FAT

Bootsektor reserv. FAT 1 FAT 2 Stammverz. Datenbereich

Dateiname Erweit. Attrib. erstellt letzt. Zugr. letzt. Änd. Start Clust. Größe

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 49: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

49

NTFS - Next Technology File System

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 50: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

50

NTFS - Next Technology File System

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 51: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

51

NTFS - Next Technology File System

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 52: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

52

NTFS - Next Technology File System

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 53: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

53

NTFS - Next Technology File System

Master File Table (12,5%)

Datenbereich

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 54: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

54

Klassische Unix Dateisysteme

Quelle: heise.de17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 55: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

55

System V File System

Bootblock

Superblock

InodeTabelle

DatenCluster

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 56: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

56

Linux ext2 / ext3 Dateisystem

Bootblock

Superblock zweite Blockgruppeerste Blockgruppe

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 57: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

57

Linux ext2 / ext3 DateisystemBootblock

Superblock zweite Clustergruppeerste Clustergruppe

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 58: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

58

Linux ext2 / ext3 Dateisystem

Superblock

DeskriptorTabelle

BlockBitmap

InodeBitmap

Cluster mit InodeTabelle

DatenCluster

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 59: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

DATEISYSTEME

Konzepte um Datenintegrität zu garantieren

Page 60: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

60

Journaling

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 61: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

61

Metadaten - Journaling

Metadaten Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 62: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

62

Vollständiges Journaling

Metadaten Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 63: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

63

Ordered - Journaling

Metadaten Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 64: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

64

copy on write

Daten und Metadaten werden immer in freie Blöcke geschrieben:es werden keine Daten überschrieben

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 65: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

65

ZFS - Beispiel für copy on write

Uberblock

Zeiger/Metadaten

Zeiger/Metadaten

Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 66: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

66

ZFS - Beispiel für copy on write

Uberblock

Zeiger/Metadaten

Zeiger/Metadaten

Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 67: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

67

ZFS - Beispiel für copy on write

Uberblock

Zeiger/Metadaten

Zeiger/Metadaten

Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 68: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

68

ZFS - Beispiel für copy on write

Uberblock

Zeiger/Metadaten

Zeiger/Metadaten

Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 69: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

69

ZFS - Beispiel für copy on write

Uberblock

Zeiger/Metadaten

Zeiger/Metadaten

Daten

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 70: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

70

ZFS - mehr als nur ein Dateisystem

Quelle: Sun / RRZE17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 71: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

71

ZFS - Datenintegrität

Quelle: Sun / RRZE17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 72: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

72

ZFS - Datenintegrität

Quelle: Sun / RRZE17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 73: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

73

ZFS - Datenintegrität

Quelle: Sun / RRZE17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 74: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

DATEISYSTEME IM NETZ

Verteilte- und Cluster- Dateisysteme

Page 75: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

75

Verteilte Dateisysteme

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 76: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

76

Cluster- und andere Dateisysteme

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 77: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

NETWORK ATTACHED BLOCK

Blockgeräte über Storage Attached Netze verwenden

Page 78: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

78

Blockprotokolle über SAN

FCoE

Fibre Channel

iSCSI

AoE

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 79: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

NAS - PROTOKOLLE

Netzwerk-File-System-Protokolle

Page 80: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

80

2 „Klassiker:▪ Windows-Welt: CIFS/SMB▪ Common Internet Filesystem / System Message Block▪ Ursprung: IBM / Microsoft

▪ Unix-Welt: NFS▪ Network Filesystem▪ Ursprung: Sun Microsystems

Netzwerk-Filesystem-Protokolle

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 81: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

81

▪ SMB▪ Version 1.0

▪ CIFS▪ Version 2.0 (2006) (>= Windows Vista / Server 2008)

› Vereinfachung (Subcommands: > 100 => 19)› Neu: Symbolische Links, Größere Blockgröße, Unicode

▪ Version 2.1 (>= Windows 7 / Server 2008 R2)› Performance

▪ Version 3.0 (ehemals 2.2, >= Windows 8 / Server 2012)› SMB Direct (SMB over RDMA)› SMB Multichannel› End-to-End encryption

Netzwerk-Filesystem-Protokolle – CIFS/SMB

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 82: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

82

▪ NFS – Version 2▪ Basierend auf RPC (Remote Procedure Call)▪ Portmapper (Port 111):› Vermittelt Dienste auf dynamischen Ports (Firewall!)› UDP (später erst: auch TCP)

▪ 32 bit (max. 2 GB Filegröße)▪ NFS – Version 3

▪ UDP + TCP▪ 64 bit Support

Netzwerk-Filesystem-Protokolle – NFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 83: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

83

▪ NFS – Version 4▪ IETF▪ Single Standard Port 2049 => kein Portmapper mehr notwendig▪ NFSv4 ACLS (ähnlich Windows/CIFS ACLs)▪ RPCSEC_GSS (Kerberos)

▪ NFS – Version 4.1▪ pNFS

Netzwerk-Filesystem-Protokolle – NFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 84: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

84

▪ Sicherheit:▪ Beschränkung Host-basiert (AUTH_SYS / AUTH_UNIX)▪ ro / rw, (no_)root_squash, (in)secure (NAT VMs!)▪ Client-Server Mapping uid/gid-basiert (Sicherheit!)▪ Posix ACLs (nur RFC, kein Standard!)

▪ Ab Version 4.0:▪ Client-Server Mapping „String“-basiert (idmap!)▪ Starke Verschlüsselung / Authentifizierung

› krb5: Authentication Only› krb5i: Integrity› krb5p: Privacy

Netzwerk-Filesystem-Protokolle – NFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 85: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

AGENDA

§ Hardware§ Storage§ Zugriffs-Protokolle§ Filesysteme

Page 86: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

86

▪ Heute mal aus der anderen Richtung

▪ Von der Hardware …

▪ … bis zum Bit

Storage / Filesysteme

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 87: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

TOP 1

Hardware§ Typischer Aufbau / Storage Appliances

Page 88: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

8817.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

DAS – DirectAttached Storage

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Server

Platten

FAS3220FAS3220

Page 89: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

89

Klassisch

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

FAS3220FAS3220 FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopf1(aktiv) Kopf2(passiv)

Platten

Page 90: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

90

Klassisch (inkl. Spiegelung)

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

FAS3220FAS3220 FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopf1(aktiv) Kopf2(passiv)

Platten

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Platten

Spiegelung

Page 91: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

91

Scale-Out

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopf1FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopf2FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopf3FAS3220FAS3220

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

3.0TB

Kopfn

Page 92: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

92

Unterscheidung: SAN ↔ NAS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

▪ SAN (Storage Area Network)▪ Block-Level Zugriff▪ Protokolle:› Eigene Verkabelung: Fibre Channel (FC), SAS

▪ Basierend auf klassischem TCP/IP Netzwerk:› iSCSI, FCoE, AoE

▪ NAS (Network Attached Storage)▪ File-Level Zugriff▪ Mehr dazu später …

Page 93: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

TOP 2

Storage-Grundlagen§ Verbund von Speichermedien:

§ RAID, Volume Manager

Page 94: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

9417.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

▪ Zusammenfassung mehrerer Festplatten für▪ mehr Speicherplatz (am Stück)▪ mehr Ausfallsicherheit (nicht immer!)▪ RAID 0: Striping▪ RAID 1: Mirroring▪ RAID 4: 1 Parity (dedizierte Parity-Platte)▪ RAID 5: 1 Parity (verteilt Parity, Platz v. 1 Platte f. Parity)▪ RAID 6: 2 Parity (verteilt, Platz v. 2 Platten f. Parity)▪ Implementierungen in Hard- und Software› Vor- und Nachteile!

RAID (Redundant Array of Independent Disks)

Page 95: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

95

Raid Levels

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Raid-Level Data Disks

ParityDisks

Spare Disks

Disk Errors

SpeedW / R

UsableSpace

0 N 0 0 0 ++ / ++ N1 N N 0 1 0 / + N/24 N 1 0 1 - / 0 N/(N+1)5 N 1 0 1 0 / 0 N/(N+1)5 + Spare N 1 1 1 0 / 0 N/(N+2)6 N 2 0 2 - / 0 N/(N+2)10 N N 0 1 ++ / ++ N/250 N 2 0 1 0 / + N/(N+2)60 N 4 0 1 0 / + N/(N+4)

Page 96: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

96

Raid Levels / Bsp: 8x 1TB Disks

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Raid-Level Data Disks

ParityDisks

Spare Disks

Disk Errors

UsableSpace

0 8 0 0 0 8 TB1 4 4 0 1 4 TB4 7 1 0 1 7 TB5 7 1 0 1 7 TB5 + Spare 6 1 1 1 6 TB6 6 2 0 2 6 TB10 4 4 0 1 4 TB50 6 2 0 1 6 TB60 4 4 0 1 4 TB

Page 97: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

97

▪ Raid6 oder RAID5 mit Hotspare?▪ Verschnitt an Speicherplatz ist gleich▪ RAID5: Hotspare wird „geschont“▪ Aber im Fall eines Plattendefekts:› Bei RAID5 besteht keinerlei Redundanz (effektiv:

langsames Raid0)› Nach Einspringen der HotSpare werden alle Daten von

allen verbliebenen, intakten Platte gelesen um die Parityneu zu berechnen

Fragen aus der Praxis:Raid5 + Hotspare oder Raid6

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 98: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

98

› Treten dabei Lesefehler auf, ist ein Rebuild ohne Datenverlust unmöglich

› Zeitfenster für Rebuild bei großen Festplatten enorm (2 TB bei 100 MB/s = 6 Stunden!)

› Fehlerwahrscheinlichkeit durch atypisches Lesen aller Disks ebenfalls!

▪ RAID6: Eine weitere Platte kann ausfallen / Lesefehler produzieren

Fragen aus der Praxis:Raid5 + Hotspare oder Raid6

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 99: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

99

▪ LVM (Logical Volume Manager)▪ Zusammenfassung mehrere Festplatten, meist flexibler als

RAID▪ Auch bei Windows:▪ Software-Raid über Systemsteuerung (auch System, Raid1)▪ Neuer: Storage Spaces (Resilient Storage)› Mirror (è Raid 1)› Parity (1/2 è Raid 5/6)› Simple (è Raid 0)

LVM

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 100: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

LVM (Logical Volume Manager)Bsp: Linux LVM2

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 101: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

TOP 3

Storage-Grundlagen§ Grundlagen: Speichermedien

Page 102: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

102

▪ Block-basierte Speichermedien▪ Mechanisch: Festplatten▪ Speicher-basiert: SSDs, USB-Stick

▪ Begriffe▪ Latenz / Zugriffszeit› Spurwechselzeit

▪ IO-Größe▪ IO-Rate▪ Bandbreite

Storage: Grundlagen Speichermedien

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 103: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

103

▪ Bsp.: Festplatte 15k (15.000 Umdrehungen / Min)▪ Latenz: 60s / 15.000 = 4 ms▪ IOPs: 1 / 4 ms = 250 / s

▪ Bandbreite:› Random / Worst Case:› 250/s x 4k Blöcke pro Sekunde -> 1000 KB/s (!)

› Linear Read/Write› 150 MB/s

Storage: Speichermedien – Mechanisch

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 104: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

104

▪ Keine mechanisch bedingten Latenzen▪ Potentiell höhere Bandbreiten

▪ Random I/O weniger „schmerzhaft“▪ Aber:

▪ Limitierte Anzahl Schreib-Zyklen pro Zelle▪ Wear-Leveling notwendig

› Gleichmäßige Verteilung von Schreiboperationen für max. Lebensdauer▪ Verantwortlich: eigener Controller▪ Problem: nicht länger genutzte Sektoren erkennen

› Neues Kommando: TRIM

Storage: Speichermedien – Speicherbasiert

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 105: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

105

Storage: Vergleich Speichermedien Mechanisch / SSD / NVDIMM

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

* 1s / (Latenz+Seek) (max. random) ** bei 4k Blöcken (max. random) *** „-N“: DRAM-based, „-F“ FLASH-based „-P“ Mixed – Coming with DDR5?

Type Latenz+Seek(Theorie)

IOPs(Theorie)*

Bandbreite (Theorie)**

R/W IOPs(Praxis)

3,5“ 15k SAS 4 ms 250 1.000 KB/s 180 / 165

2,5“ 15k SAS 4 ms 250 1.000 KB/s 200 / 190

2,5“ 10k SAS 6 ms 166 664 KB/s 150 / 140

2,5“ 7.2k SATA 8 ms 120 480 KB/s 80 / 74

2,5“ 5.4k SATA 11 ms 90 360 KB/s 52 / 50

2,5“ eMLC SSD SAS 0.5 ms - - ~ 50.000

SSD NVMe (TOP!) 0.01 ms - - ~ 300.000

NVDIMM(-N) *** 0.00001 ms - > 1.000.000

Typische Leistungsdaten:

Page 106: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

106

TRIM – weitere Funktionalität

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 107: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

TOP 4

§ Filesysteme

Page 108: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

108

▪ Quota, Rechte (xattr, acl), ▪ Journal (Filesystem-Check!)▪ Kompression, Verschlüsselung, Checksummen▪ Snapshots, Klonen, Deduplikation▪ int. RAID / LVM▪ Beschränkungen:

▪ Dateigröße, Filesystemgröße, Länge Dateiname▪ Vergrößern/Verkleinern

Eigenschaften

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 109: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

109

▪ Teil fast aller aktueller Linux-Dateisysteme▪ Änderungen werden erst in Journal geschrieben▪ Später (im Hintergrund) „sauber“ ins Dateisystem integriert▪ Warum?

▪ Ohne: Prüfung des kompletten Dateisystems bei ungeplantem Reboot / Ausfall (kann Stunden dauern!)

▪ Journal reduziert diese Zeit auf wenige Sekunden

Journal

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 110: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

110

▪ Kompression▪ Daten werden beim Speichern (oder in einem nachgelagerten

Prozess) komprimiert um Platz zu sparen▪ Verschlüsselung

▪ Daten werden beim Speichern verschlüsselt▪ Bei Diebstahl der Platten kein Zugriff auf Daten möglich▪ Aber: Eingabe eines Passworts vor dem Zugriff notwendig

▪ Checksummen▪ Datenblöcke werden beim Schreiben mit Checksumme versehen▪ Fehler beim Lesen können dadurch erkannt werden

(8 TB Festplatten!)

Kompression / Verschlüsselung / Checksummen

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 111: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

111

▪ Snapshot▪ (Schnelles) Einfrieren des Zustands eines Dateisystems

▪ Klonen▪ Schnelles „Kopieren“ von Dateien▪ COW (Copy-on-Write)

▪ Deduplikation▪ Zusammenfassen von Datenblöcken mit gleichem Inhalt▪ Speicherhungrig!▪ Durchbruch erst mit SSDs (weniger Penalty!)

▪ Scrubbing▪ Regelmäßiges Prüfen der Daten (ggf. inkl. Schreibtest)

Snapshot / Klonen / Dedup / Scrubbing

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 112: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

112

▪ Dateisystemgröße▪ z.B. ReiserFS: 16 TB

▪ Dateigröße▪ z.B. FAT32: 2 GB (USB Sticks!)

▪ Länge Dateiname/-pfad▪ z.B. DOS: 8.3 Zeichen „autoexec.bat“

▪ Vergrößern / Verkleinern des Dateisystems▪ Online / Offline?

▪ Einsatzzweck?

Beschränkungen

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 113: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

TOP 5

Network Attached Storage (NAS)§ Zugriffsprotokolle

Page 114: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

114

▪ 2 „Klassiker:

▪ Windows-Welt: CIFS/SMB▪ Common Internet Filesystem / System Message Block▪ Ursprung: IBM / Microsoft

▪ Unix-Welt: NFS▪ Network Filesystem▪ Ursprung: Sun Microsystems

Netzwerk-Filesystem-/NAS-Protokolle

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 115: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

115

▪ SMB (Server Message Block)

▪ Version 1.0

▪ CIFS (Common Internet FileSystem)

▪ Version 2.0 (2006) (>= Windows Vista / Server 2008)

› Vereinfachung (Subcommands: > 100 => 19)› Neu: Symbolische Links, Größere Blockgröße, Unicode

▪ Version 2.1 (>= Windows 7 / Server 2008 R2)

› Performance

Netzwerk-Filesystem-Protokolle – CIFS/SMB

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 116: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

116

▪ Version 3.0 (ehemals 2.2, >= Windows 8 / Server 2012)

› SMB Direct (SMB over RDMA)› SMB Multichannel› End-to-End encryption

▪ Version 3.0.2 (auch 3.02, >= Windows 8.1 / Server 2012R2)

› SMB1 abschaltbar (Sicherheit!)

▪ Version 3.1.1 (>= Windows 10 / Server 2016)

› Secure negotiation Pflicht für SMB >= 2.x

Netzwerk-Filesystem-Protokolle – CIFS/SMB

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 117: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

117

▪ Version 2 (RFC 1094, 03/1989)

▪ Basierend auf RPC (Remote Procedure Call)▪ Portmapper (Port 111):› Vermittelt Dienste auf dynamischen Ports (Firewall!)› UDP (später erst: auch TCP)

▪ 32 bit (max. 2 GB Filegröße)▪ Version 3 (RFC 1813, 06/1995)

▪ UDP + TCP▪ 64 bit Support▪ Asynchrones Schreiben

Netzwerk-Filesystem-Protokolle – NFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 118: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

118

▪ Version 4 (RFC 3010, 12/2000, Rev.: RFC 3530/7530)

▪ Single Standard Port 2049 (kein Portmapper!)▪ NFSv4 ACLS (ähnlich Windows/CIFS ACLs)▪ RPCSEC_GSS (Kerberos)

▪ Version 4.1 (RFC 5661, 01/2010)

▪ pNFS▪ Version 4.2 (RFC 7862, 11/2016)

▪ Sparse File Support▪ Server Side Copy▪ Space Reservation

Netzwerk-Filesystem-Protokolle – NFS

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 119: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

119

▪ Bis inkl. Version 3▪ Beschränkung Host-basiert (AUTH_SYS / AUTH_UNIX)▪ ro / rw, (no_)root_squash, (in)secure (NAT VMs!)▪ Client-Server Mapping uid/gid-basiert (Sicherheit!)▪ Posix ACLs (nur RFC, kein Standard!)

▪ Ab Version 4.0:▪ Client-Server Mapping „String“-basiert (idmap!)▪ Starke Verschlüsselung / Authentifizierung› krb5 (Authentication Only), krb5i (Integrity), krb5p (Privacy)

Netzwerk-Filesystem-Protokolle –Warum NFS 4.x nutzen?

17.05.2017 | Systemausbildung – Storage / Filesysteme | Gregor Longariva, Marcel Ritter

Page 120: Storage / Filesysteme...Klassischer Bootsektor MBR vs. GPT MBR GPT 512 Bytes BIOS EFI Primäre Partitionstabelle Backup Partitionstabelle min. 16 384 Bytes eine Partitionstabelle 17.05.2017

REGIONALES RECHENZENTRUM ERLANGEN [RRZE]

Vielen Dank für Ihre Aufmerksamkeit!Regionales RechenZentrum Erlangen [RRZE]Martensstraße 1, 91058 Erlangenhttp://www.rrze.fau.de