sles_12_update_schulung
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sles_12_update_schulung [2016/07/14 14:16] – michael | sles_12_update_schulung [2021/04/24 07:40] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== Startskripte ====== |
| Line 24: | Line 24: | ||
| | | ||
| | | ||
| - | ====== | + | ====== chkconfig ====== |
| Line 64: | Line 64: | ||
| - | ====== | + | ====== Eigener Runlevel ====== |
| | | ||
| Line 323: | Line 323: | ||
| ext3 platte etc: max-mount auf 0 Setzen. sonst kann es zu fsck kommen. -I intervall 0 | ext3 platte etc: max-mount auf 0 Setzen. sonst kann es zu fsck kommen. -I intervall 0 | ||
| + | |||
| + | |||
| + | |||
| + | linux-tmer: | ||
| + | |||
| + | |||
| + | Dateisysteme vergrößern nach vergrößern der Partition: | ||
| + | |||
| + | ext2/3/4: | ||
| + | resize2fs device | ||
| + | |||
| + | SLES12:~ # resize2fs / | ||
| + | resize2fs 1.42.11 (09-Jul-2014) | ||
| + | Filesystem at / | ||
| + | old_desc_blocks = 1, new_desc_blocks = 2 | ||
| + | The filesystem on / | ||
| + | |||
| + | |||
| + | xfs: | ||
| + | xfs_growfs device | ||
| + | | ||
| + | | ||
| + | ====== LVM ====== | ||
| + | |||
| + | Create Physical Volume | ||
| + | SLES12:~ # pvcreate /dev/sdb1 | ||
| + | Physical volume "/ | ||
| + | |||
| + | |||
| + | == Create Volume Group == | ||
| + | |||
| + | SLES12:~ # vgcreate vg01 /dev/sdb1 | ||
| + | Volume group " | ||
| + | SLES12:~ # | ||
| + | |||
| + | == Create logical Volumes == | ||
| + | |||
| + | SLES12:~ # lvcreate -n lv101 -L 400M vg01 | ||
| + | Logical volume " | ||
| + | SLES12:~ # lvcreate -n lv102 -L 500M vg01 | ||
| + | Logical volume " | ||
| + | SLES12:~ # | ||
| + | |||
| + | |||
| + | == Create additional Swap == | ||
| + | |||
| + | SLES12:~ # | ||
| + | SLES12:~ # mkswap / | ||
| + | Setting up swapspace version 1, size = 511996 KiB | ||
| + | no label, UUID=523b3c51-55fa-4361-b5e0-7bfb596dce9e | ||
| + | SLES12:~ # | ||
| + | |||
| + | == Aktivate Swap == | ||
| + | |||
| + | SLES12:~ # swapon / | ||
| + | SLES12:~ # | ||
| + | SLES12:~ # | ||
| + | |||
| + | |||
| + | == Check if swap is aktivated == | ||
| + | |||
| + | SLES12:~ # swapon -s | ||
| + | Filename | ||
| + | / | ||
| + | / | ||
| + | SLES12:~ # | ||
| + | |||
| + | == Erstellen eines ext3 Filesystems == | ||
| + | |||
| + | SLES12:~ # mke2fs -j / | ||
| + | mke2fs 1.42.11 (09-Jul-2014) | ||
| + | Creating filesystem with 409600 1k blocks and 102400 inodes | ||
| + | Filesystem UUID: e9ebd313-7641-4a4c-8c45-e71739794b25 | ||
| + | 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: | ||
| + | |||
| + | == Mount formatted Filesystem, copy /usr/bin/ and " | ||
| + | |||
| + | SLES12:~ # | ||
| + | SLES12:~ # mount / | ||
| + | SLES12:~ # | ||
| + | SLES12:~ # cp -R /usr/bin/* /mnt/ | ||
| + | SLES12:~ # | ||
| + | SLES12:~ # umount /mnt | ||
| + | SLES12:~ # | ||
| + | SLES12:~ # mount / | ||
| + | SLES12:~ # | ||
| + | |||
| + | |||
| + | == List the VG and look for free PE == | ||
| + | |||
| + | SLES12:~ # vgdisplay -v | ||
| + | Using volume group(s) on command line. | ||
| + | --- Volume group --- | ||
| + | VG Name vg01 | ||
| + | System ID | ||
| + | Format | ||
| + | Metadata Areas 1 | ||
| + | Metadata Sequence No 3 | ||
| + | VG Access | ||
| + | VG Status | ||
| + | MAX LV 0 | ||
| + | Cur LV 2 | ||
| + | Open LV 2 | ||
| + | Max PV 0 | ||
| + | Cur PV 1 | ||
| + | Act PV 1 | ||
| + | VG Size 2.00 GiB | ||
| + | PE Size 4.00 MiB | ||
| + | Total PE 511 | ||
| + | Alloc PE / Size 225 / 900.00 MiB | ||
| + | Free PE / Size 286 / 1.12 GiB | ||
| + | VG UUID | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv101 | ||
| + | VG Name vg01 | ||
| + | LV UUID yBT0Vq-w2Am-CfnX-cmCo-8n39-GySx-HQgHkT | ||
| + | LV Write Access | ||
| + | LV Creation host, time SLES12, 2016-07-15 10:05:52 +0200 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size 400.00 MiB | ||
| + | Current LE 100 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 1024 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv102 | ||
| + | VG Name vg01 | ||
| + | LV UUID zVqjlO-kdfz-xliL-znpJ-Mgb1-4FFi-jUHYoW | ||
| + | LV Write Access | ||
| + | LV Creation host, time SLES12, 2016-07-15 10:05:59 +0200 | ||
| + | LV Status | ||
| + | # open 2 | ||
| + | LV Size 500.00 MiB | ||
| + | Current LE 125 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 1024 | ||
| + | Block device | ||
| + | |||
| + | --- Physical volumes --- | ||
| + | PV Name / | ||
| + | PV UUID | ||
| + | PV Status | ||
| + | Total PE / Free PE 511 / 286 | ||
| + | |||
| + | SLES12:~ # | ||
| + | |||
| + | == Fragmentierung einer Datei == | ||
| + | |||
| + | SLES12:/mnt # filefrag -v services | ||
| + | Filesystem type is: ef53 | ||
| + | Filesystem cylinder groups approximately 16 | ||
| + | File size of services is 1263621 (309 blocks of 4096 bytes) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | services: 5 extents found | ||
| + | |||
| + | ====== BTRFS ====== | ||
| + | |||
| + | SLES12:/ # mkfs.btrfs -f /dev/sdc1 /dev/sdc8 | ||
| + | btrfs-progs v4.1.2+20151002 | ||
| + | See http:// | ||
| + | |||
| + | Label: | ||
| + | UUID: | ||
| + | Node size: 16384 | ||
| + | Sector size: 4096 | ||
| + | Filesystem size: 3.00GiB | ||
| + | Block group profiles: | ||
| + | Data: | ||
| + | Metadata: | ||
| + | System: | ||
| + | SSD detected: | ||
| + | Incompat features: | ||
| + | Number of devices: | ||
| + | Devices: | ||
| + | | ||
| + | 1 | ||
| + | 2 | ||
| + | |||
| + | |||
| + | == Mounten des Filesystems via uuid == | ||
| + | |||
| + | |||
| + | SLES12:/mnt # mount / | ||
| + | SLES12:/mnt # | ||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 2 FS bytes used 256.00KiB | ||
| + | devid 1 size 2.00GiB used 327.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 315.12MiB path /dev/sdc8 | ||
| + | |||
| + | btrfs-progs v4.1.2+20151002 | ||
| + | |||
| + | |||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 3 FS bytes used 256.00KiB | ||
| + | devid 1 size 2.00GiB used 327.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 315.12MiB path /dev/sdc8 | ||
| + | devid 3 size 2.00GiB used 0.00B path /dev/sdc2 | ||
| + | |||
| + | |||
| + | |||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 3 FS bytes used 256.00KiB | ||
| + | devid 1 size 2.00GiB used 327.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 315.12MiB path /dev/sdc8 | ||
| + | devid 3 size 2.00GiB used 0.00B path /dev/sdc2 | ||
| + | |||
| + | btrfs-progs v4.1.2+20151002 | ||
| + | |||
| + | == Testdaten auf das Filesystem kopieren == | ||
| + | |||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 3 FS bytes used 86.88MiB | ||
| + | devid 1 size 2.00GiB used 503.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 491.12MiB path /dev/sdc8 | ||
| + | devid 3 size 2.00GiB used 176.00MiB path /dev/sdc2 | ||
| + | |||
| + | btrfs-progs v4.1.2+20151002 | ||
| + | |||
| + | == Ein Volume aus dem btrfs Filesystem löschen == | ||
| + | |||
| + | |||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 2 FS bytes used 792.45MiB | ||
| + | devid 1 size 2.00GiB used 647.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 635.12MiB path /dev/sdc8 | ||
| + | |||
| + | |||
| + | == Reduzieren des Filesystems um 500M == | ||
| + | |||
| + | |||
| + | SLES12:/ | ||
| + | Resize '/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | SLES12:/ | ||
| + | Label: ' | ||
| + | Total devices 2 FS bytes used 792.33MiB | ||
| + | devid 1 size 1.51GiB used 647.12MiB path /dev/sdc1 | ||
| + | devid 2 size 1.00GiB used 635.12MiB path /dev/sdc8 | ||
| + | |||
| + | |||
| + | == Informationen über die Belegung ausgeben == | ||
| + | |||
| + | SLES12:/ | ||
| + | Data, RAID0: total=947.12MiB, | ||
| + | System, RAID1: total=8.00MiB, | ||
| + | System, single: total=4.00MiB, | ||
| + | Metadata, RAID1: total=153.56MiB, | ||
| + | Metadata, single: total=8.00MiB, | ||
| + | GlobalReserve, | ||
| + | |||
| + | == Filesystem ausbalancieren == | ||
| + | |||
| + | btrfs balance start /mnt | ||
| + | btrfs balance status /mnt | ||
| + | btrfs balance cancel /mnt | ||
| + | btrfs balance pause /mnt | ||
| + | btrfs balance resume /mnt | ||
| + | |||
| + | == Snapshots == | ||
| + | |||
| + | Subvolume2 unterhalb Subvolume1, wird beim snap von Subvolume1 _nicht_ mitgesnapped | ||
| + | |||
| + | |||
| + | SLES12:/ | ||
| + | Create a snapshot of '/ | ||
| + | |||
| + | SLES12:/ | ||
| + | .: | ||
| + | total 4 | ||
| + | drwxr-xr-x 1 root root 6 Jul 15 12:48 ordner1 | ||
| + | -rw-r--r-- 1 root root** 2929** Jul 15 12:53 passwd | ||
| + | drwxr-xr-x 1 root root 26 Jul 15 12:48 snap | ||
| + | |||
| + | ./ordner1: | ||
| + | total 0 | ||
| + | -rw-r--r-- 1 root root 0 Jul 15 12:48 abc | ||
| + | |||
| + | ./snap: | ||
| + | total 4 | ||
| + | drwxr-xr-x 1 root root 6 Jul 15 12:48 ordner1 | ||
| + | -rw-r--r-- 1 root root **1633** Jul 15 12:48 passwd | ||
| + | |||
| + | ./ | ||
| + | total 0 | ||
| + | -rw-r--r-- 1 root root 0 Jul 15 12:48 abc | ||
| + | |||
| + | |||
| + | cp --reflink | ||
| + | | ||
| + | | ||
| + | |||
| + | When --reflink[=always] is specified, perform a lightweight copy, where the data blocks are copied only when modified. | ||
| + | | ||
| + | |||
| + | |||
| + | |||
| + | SLES12:/ # snapper list | ||
| + | Type | # | Pre # | Date | User | Cleanup | Description | ||
| + | -------+---+-------+--------------------------+------+---------+-----------------------+-------------- | ||
| + | single | 0 | | ||
| + | single | 1 | | Tue Mar 15 12:29:47 2016 | root | | first root filesystem | | ||
| + | single | 2 | | Tue Mar 15 12:40:02 2016 | root | number | ||
| + | pre | 3 | | Thu Jul 14 12:22:57 2016 | root | number | ||
| + | post | 4 | 3 | Thu Jul 14 12:23:18 2016 | root | number | ||
| + | single | 5 | | Fri Jul 15 15:03:51 2016 | root | | ||
| + | |||
| + | |||
| + | SLES12:/ # snapper diff 3..4 | ||
| + | --- / | ||
| + | +++ / | ||
| + | @@ -318,7 +318,7 @@ | ||
| + | # FW_SERVICES_ACCEPT_* | ||
| + | # | ||
| + | # Example: " | ||
| + | -FW_CONFIGURATIONS_EXT="" | ||
| + | +FW_CONFIGURATIONS_EXT=" | ||
| + | |||
| + | ## Type: | ||
| + | # | ||
| + | @@ -1068,7 +1068,7 @@ | ||
| + | # | ||
| + | # See also FW_SERVICES_ACCEPT_RELATED_EXT | ||
| + | # | ||
| + | -FW_LOAD_MODULES="" | ||
| + | +FW_LOAD_MODULES=" | ||
| + | |||
| + | ## Type: | ||
| + | ## Default: | ||
| + | Binary files / | ||
| + | Binary files / | ||
| + | Binary files / | ||
| + | |||
| + | |||
| + | SLES12:/etc # snapper diff 6..7 / | ||
| + | --- / | ||
| + | +++ / | ||
| + | @@ -17,5 +17,3 @@ | ||
| + | # file and in case of a " | ||
| + | # | ||
| + | ### Please remove (at least) this line when you modify the file! | ||
| + | -search localdomain | ||
| + | -nameserver 192.168.24.2 | ||
| + | |||
| + | == Zurückgehen auf einen vorherigen Stand == | ||
| + | SLES12:/etc # snapper undochange 6..7 | ||
| + | create:12 modify:3 delete:0 | ||
sles_12_update_schulung.1468505776.txt.gz · Last modified: 2021/04/24 07:38 (external edit)
