Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
notes_brot [2013/12/16 21:08] – [Umzug] brot | notes_brot [2015/01/31 09:11] – brot | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Notizzettel vom brot ====== | ====== Notizzettel vom brot ====== | ||
+ | |||
+ | ===== NAS Einführung btrfs ===== | ||
+ | |||
+ | Stand siehe Unten - tl;dr: 3x 3TB (500mb efi, 500mb raid1 /boot, 50G raid5 /, 2,7TB / | ||
+ | |||
+ | Einbau neuer 2x 5TB wd red | ||
+ | |||
+ | ==== Anlegen der neuen Partitionstabellen ==== | ||
+ | |||
+ | <code bash> | ||
+ | nas brot # gdisk /dev/sde | ||
+ | GPT fdisk (gdisk) version 0.8.10 | ||
+ | |||
+ | Caution: invalid backup GPT header, but valid main header; regenerating | ||
+ | backup header from main header. | ||
+ | |||
+ | Warning! Main and backup partition tables differ! Use the ' | ||
+ | on the recovery & transformation menu to examine the two tables. | ||
+ | |||
+ | Warning! One or more CRCs don't match. You should repair the disk! | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: protective | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: damaged | ||
+ | |||
+ | **************************************************************************** | ||
+ | Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk | ||
+ | verification and recovery are STRONGLY recommended. | ||
+ | **************************************************************************** | ||
+ | |||
+ | Command (? for help): o | ||
+ | This option deletes all partitions and creates a new protective MBR. | ||
+ | Proceed? (Y/N): y | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (1-128, default 1): | ||
+ | First sector (34-9767541134, | ||
+ | Last sector (2048-9767541134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): ef00 | ||
+ | Changed type of partition to 'EFI System' | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (2-128, default 2): | ||
+ | First sector (34-9767541134, | ||
+ | Last sector (1026048-9767541134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): fd00 | ||
+ | Changed type of partition to 'Linux RAID' | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (3-128, default 3): | ||
+ | First sector (34-9767541134, | ||
+ | Last sector (2050048-9767541134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sde: 9767541168 sectors, 4.5 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): D69BC615-B1AC-4A38-BA71-791CD94C2154 | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 9767541134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sde. | ||
+ | The operation has completed successfully. | ||
+ | </ | ||
+ | |||
+ | ==== Kopieren der EFI-Partition ==== | ||
+ | nas brot # umount /boot/efi | ||
+ | nas brot # cp /dev/sda1 /dev/sdd1 | ||
+ | nas brot # cp /dev/sda1 /dev/sde1 | ||
+ | |||
+ | ==== Hinzufügen der / | ||
+ | |||
+ | <code bash> | ||
+ | nas brot # mdadm -D /dev/md0 | ||
+ | /dev/md0: | ||
+ | Version : 1.0 | ||
+ | Creation Time : Fri Aug 24 04:18:31 2012 | ||
+ | Raid Level : raid1 | ||
+ | Array Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Used Dev Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Raid Devices : 2 | ||
+ | Total Devices : 3 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Update Time : Sun Nov 16 19:15:17 2014 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 3 | ||
+ | | ||
+ | Spare Devices : 1 | ||
+ | |||
+ | Name : localhost.localdomain: | ||
+ | UUID : 262c8e68: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | nas brot # mdadm --verbose --manage --add /dev/md0 /dev/sdd2 | ||
+ | mdadm: added /dev/sdd2 | ||
+ | nas brot # mdadm --verbose --manage --add /dev/md0 /dev/sde2 | ||
+ | mdadm: added /dev/sde2 | ||
+ | nas brot # cat / | ||
+ | Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] | ||
+ | md2 : active raid5 sdb3[6] sdc3[5] sda3[0] | ||
+ | 52430848 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | | ||
+ | md4 : active raid5 sdb4[2] sdc4[1] sda4[3] | ||
+ | 5753362432 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | bitmap: 0/22 pages [0KB], 65536KB chunk | ||
+ | |||
+ | md0 : active raid1 sde2[5](S) sdd2[2](S) sdb1[3](S) sdc1[4] sda2[0] | ||
+ | 511988 blocks super 1.0 [2/2] [UU] | ||
+ | | ||
+ | unused devices: < | ||
+ | nas brot # mdadm /dev/md0 --fail /dev/sdc1 | ||
+ | mdadm: set /dev/sdc1 faulty in /dev/md0 | ||
+ | nas brot # mdadm /dev/md0 --fail /dev/sdb1 | ||
+ | mdadm: set /dev/sdb1 faulty in /dev/md0 | ||
+ | nas brot # cat / | ||
+ | Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] | ||
+ | md2 : active raid5 sdb3[6] sdc3[5] sda3[0] | ||
+ | 52430848 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | | ||
+ | md4 : active raid5 sdb4[2] sdc4[1] sda4[3] | ||
+ | 5753362432 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU] | ||
+ | bitmap: 0/22 pages [0KB], 65536KB chunk | ||
+ | |||
+ | md0 : active raid1 sde2[5] sdd2[2](S) sdb1[3](S) sdc1[4](F) sda2[0] | ||
+ | 511988 blocks super 1.0 [2/1] [U_] | ||
+ | [==========> | ||
+ | nas brot # mdadm /dev/md0 --remove /dev/sdb1 /dev/sdc1 | ||
+ | mdadm: hot removed /dev/sdb1 from /dev/md0 | ||
+ | mdadm: hot removed /dev/sdc1 from /dev/md0 | ||
+ | nas brot # mdadm -D /dev/md0 | ||
+ | /dev/md0: | ||
+ | Version : 1.0 | ||
+ | Creation Time : Fri Aug 24 04:18:31 2012 | ||
+ | Raid Level : raid1 | ||
+ | Array Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Used Dev Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Raid Devices : 2 | ||
+ | Total Devices : 3 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Update Time : Sun Nov 16 19:41:39 2014 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 3 | ||
+ | | ||
+ | Spare Devices : 1 | ||
+ | |||
+ | Name : localhost.localdomain: | ||
+ | UUID : 262c8e68: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | nas brot # mdadm --grow /dev/md0 --raid-devices=3 | ||
+ | raid_disks for /dev/md0 set to 3 | ||
+ | unfreeze | ||
+ | nas brot # mdadm -D /dev/md0 | ||
+ | /dev/md0: | ||
+ | Version : 1.0 | ||
+ | Creation Time : Fri Aug 24 04:18:31 2012 | ||
+ | Raid Level : raid1 | ||
+ | Array Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Used Dev Size : 511988 (500.07 MiB 524.28 MB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Update Time : Sun Nov 16 19:45:49 2014 | ||
+ | State : clean, degraded, recovering | ||
+ | | ||
+ | Working Devices : 3 | ||
+ | | ||
+ | Spare Devices : 1 | ||
+ | |||
+ | | ||
+ | |||
+ | Name : localhost.localdomain: | ||
+ | UUID : 262c8e68: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ==== btrfs Filesystem erzeugen und Subvolumes anlegen ==== | ||
+ | <code bash> | ||
+ | nas brot # mkfs.btrfs -d raid1 -m raid1 /dev/sdd3 /dev/sde3 | ||
+ | |||
+ | nas brot # btrfs filesystem show /dev/sdd3 | ||
+ | Label: none uuid: c356873f-4034-43cc-8052-b2a4bf68cb26 | ||
+ | Total devices 2 FS bytes used 112.00KiB | ||
+ | devid 1 size 4.55TiB used 2.03GiB path /dev/sdd3 | ||
+ | devid 2 size 4.55TiB used 2.01GiB path /dev/sde3 | ||
+ | |||
+ | Btrfs v3.17 | ||
+ | |||
+ | nas brot # mount /dev/sdd3 / | ||
+ | |||
+ | nas brot # btrfs subvolume create / | ||
+ | Create subvolume '/ | ||
+ | nas brot # btrfs subvolume create / | ||
+ | Create subvolume '/ | ||
+ | nas brot # btrfs subvolume create / | ||
+ | Create subvolume '/ | ||
+ | nas brot # btrfs subvolume create / | ||
+ | Create subvolume '/ | ||
+ | |||
+ | nas brot # btrfs fi df / | ||
+ | Data, RAID1: total=1.00GiB, | ||
+ | Data, single: total=8.00MiB, | ||
+ | System, RAID1: total=8.00MiB, | ||
+ | System, single: total=4.00MiB, | ||
+ | Metadata, RAID1: total=1.00GiB, | ||
+ | Metadata, single: total=8.00MiB, | ||
+ | GlobalReserve, | ||
+ | |||
+ | nas ~ # btrfs subvolume list / | ||
+ | ID 258 gen 155 top level 5 path root-subvol | ||
+ | ID 259 gen 8 top level 5 path data-subvol | ||
+ | ID 260 gen 9 top level 5 path backup-subvol | ||
+ | ID 261 gen 10 top level 5 path brot-backup-subvol | ||
+ | |||
+ | nas ~ # btrfs subvolume set-default 258 / | ||
+ | (setzen vom rootfs als std-subvol) | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Umzug Rootfs ==== | ||
+ | * Boot von USB-Stick (grml) | ||
+ | * einbinden der alten Dateisysteme (/dev/md2 als /, md1 als /boot und EFI) | ||
+ | * einbinden des neuen BTRFS-Volumes ( auf die richtige Subvolume zuordnung achten) | ||
+ | * cp -a / | ||
+ | * grml-chroot / | ||
+ | * grub-install /dev/sdd | ||
+ | * grub-install /dev/sde | ||
+ | * fstab anpassen - nur die wichtigen einträge aktiv lassen um bootfehler zu vermeiden | ||
+ | * initrd (u kernel) neubauen mit dracut | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | UUID=c356873f-4034-43cc-8052-b2a4bf68cb26 | ||
+ | UUID=4549-7F03 | ||
+ | </ | ||
+ | |||
+ | ==== Kopieren der Daten ==== | ||
+ | |||
+ | * Einbinden der Subvolumes (primär erstmal daten und backup) | ||
+ | * mount -o ro /dev/md4 / | ||
+ | * cp -av / | ||
+ | * | ||
+ | |||
+ | ==== Kopieren der Backups ==== | ||
+ | |||
+ | Problem: btrfs-image-files auf den alten FS. Jetzt: subvolumes auf dem btrfs-fs | ||
+ | |||
+ | Lösung: Übertragen aller Snapshots per btrfs send/ | ||
+ | |||
+ | <code bash> | ||
+ | nas ~ # for i in $( ls / | ||
+ | nas ~ # btrfs send -v / | ||
+ | At subvol / | ||
+ | At subvol backup-2011.11.07-22: | ||
+ | receiving subvol backup-2011.11.07-22: | ||
+ | </ | ||
+ | |||
+ | ==== Hinzufügen der alten Platten in den BTRFS-Pool ==== | ||
+ | |||
+ | * Platte sdc soll dem BTRFS-RAID1 hinzugefügt werden (sda und sdb sind die neuen Platten) | ||
+ | * Degradieren der RAID5s | ||
+ | * Neupartitionieren der Platte | ||
+ | |||
+ | <code bash> | ||
+ | nas brot # mdadm -D /dev/md2 | ||
+ | /dev/md2: | ||
+ | Version : 1.2 | ||
+ | Creation Time : Tue Aug 28 04:45:52 2012 | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 52430848 (50.00 GiB 53.69 GB) | ||
+ | Used Dev Size : 26215424 (25.00 GiB 26.84 GB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Update Time : Mon Nov 17 23:42:11 2014 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 3 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Name : localhost.localdomain: | ||
+ | UUID : a9d908f3: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | nas brot # mdadm -D /dev/md4 | ||
+ | /dev/md4: | ||
+ | Version : 1.2 | ||
+ | Creation Time : Mon Dec 9 22:06:12 2013 | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 5753362432 (5486.83 GiB 5891.44 GB) | ||
+ | Used Dev Size : 2876681216 (2743.42 GiB 2945.72 GB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 3 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Intent Bitmap : Internal | ||
+ | |||
+ | Update Time : Sun Nov 30 21:05:22 2014 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 3 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Name : nas:4 (local to host nas) | ||
+ | UUID : f6924d42: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | <code bash> | ||
+ | nas brot # mdadm --manage --set-faulty /dev/md2 /dev/sdc3 | ||
+ | mdadm: set /dev/sdc3 faulty in /dev/md2 | ||
+ | nas brot # mdadm --manage --set-faulty /dev/md4 /dev/sdc4 | ||
+ | mdadm: set /dev/sdc4 faulty in /dev/md4 | ||
+ | nas brot # mdadm --manage /dev/md2 -r /dev/sdc3 | ||
+ | mdadm: hot removed /dev/sdc3 from /dev/md2 | ||
+ | nas brot # mdadm --manage /dev/md4 -r /dev/sdc4 | ||
+ | mdadm: hot removed /dev/sdc4 from /dev/md4 | ||
+ | </ | ||
+ | <code bash> | ||
+ | nas brot # mdadm -D /dev/md4 | ||
+ | /dev/md4: | ||
+ | Version : 1.2 | ||
+ | Creation Time : Mon Dec 9 22:06:12 2013 | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 5753362432 (5486.83 GiB 5891.44 GB) | ||
+ | Used Dev Size : 2876681216 (2743.42 GiB 2945.72 GB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 2 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Intent Bitmap : Internal | ||
+ | |||
+ | Update Time : Sun Dec 7 12:07:18 2014 | ||
+ | State : clean, degraded | ||
+ | | ||
+ | Working Devices : 2 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Name : nas:4 (local to host nas) | ||
+ | UUID : f6924d42: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | <code bash> | ||
+ | nas brot # gdisk /dev/sdc | ||
+ | GPT fdisk (gdisk) version 0.8.10 | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: protective | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: present | ||
+ | |||
+ | Found valid GPT with protective MBR; using GPT. | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sdc: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-4): 4 | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-3): 3 | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sdc: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 5858485101 sectors (2.7 TiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (3-128, default 3): | ||
+ | First sector (34-5860533134, | ||
+ | Last sector (2050048-5860533134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sdc: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sdc. | ||
+ | The operation has completed successfully. | ||
+ | </ | ||
+ | <code bash> | ||
+ | nas brot # btrfs device add /dev/sdc3 / -f | ||
+ | nas brot # btrfs balance start -v / | ||
+ | Dumping filters: flags 0x7, state 0x0, force is off | ||
+ | DATA (flags 0x0): balancing | ||
+ | METADATA (flags 0x0): balancing | ||
+ | SYSTEM (flags 0x0): balancing | ||
+ | nas brot # watch -n 10 'btrfs balance status /' | ||
+ | Balance on '/' | ||
+ | 1 out of about 3680 chunks balanced (2 considered), | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | nas brot # mdadm -D /dev/md4 | ||
+ | /dev/md4: | ||
+ | Version : 1.2 | ||
+ | Creation Time : Mon Dec 9 22:06:12 2013 | ||
+ | Raid Level : raid5 | ||
+ | Array Size : 5753362432 (5486.83 GiB 5891.44 GB) | ||
+ | Used Dev Size : 2876681216 (2743.42 GiB 2945.72 GB) | ||
+ | Raid Devices : 3 | ||
+ | Total Devices : 2 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Intent Bitmap : Internal | ||
+ | |||
+ | Update Time : Sat Dec 27 10:31:33 2014 | ||
+ | State : clean, degraded | ||
+ | | ||
+ | Working Devices : 2 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | | ||
+ | Chunk Size : 512K | ||
+ | |||
+ | Name : nas:4 (local to host nas) | ||
+ | UUID : f6924d42: | ||
+ | | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | nas brot # mdadm -S /dev/md4 | ||
+ | mdadm: stopped /dev/md4 | ||
+ | nas brot # mdadm -S /dev/md2 | ||
+ | mdadm: stopped /dev/md2 | ||
+ | </ | ||
+ | < | ||
+ | nas brot # gdisk /dev/sdd | ||
+ | GPT fdisk (gdisk) version 0.8.10 | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: protective | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: present | ||
+ | |||
+ | Found valid GPT with protective MBR; using GPT. | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sdd: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-4): 4 | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-3): 3 | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (3-128, default 3): | ||
+ | First sector (34-5860533134, | ||
+ | Last sector (2050048-5860533134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sdd: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sdd. | ||
+ | Warning: The kernel is still using the old partition table. | ||
+ | The new table will be used at the next reboot. | ||
+ | The operation has completed successfully. | ||
+ | nas brot # gdisk /dev/sde | ||
+ | GPT fdisk (gdisk) version 0.8.10 | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: protective | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: present | ||
+ | |||
+ | Found valid GPT with protective MBR; using GPT. | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sde: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-4): 4 | ||
+ | |||
+ | Command (? for help): d | ||
+ | Partition number (1-3): 3 | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (3-128, default 3): | ||
+ | First sector (34-5860533134, | ||
+ | Last sector (2050048-5860533134, | ||
+ | Current type is 'Linux filesystem' | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): p | ||
+ | Disk /dev/sde: 5860533168 sectors, 2.7 TiB | ||
+ | Logical sector size: 512 bytes | ||
+ | Disk identifier (GUID): 0C5623E2-2FF4-4787-9609-750745C161DA | ||
+ | Partition table holds up to 128 entries | ||
+ | First usable sector is 34, last usable sector is 5860533134 | ||
+ | Partitions will be aligned on 2048-sector boundaries | ||
+ | Total free space is 2014 sectors (1007.0 KiB) | ||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sde. | ||
+ | Warning: The kernel is still using the old partition table. | ||
+ | The new table will be used at the next reboot. | ||
+ | The operation has completed successfully. | ||
+ | nas brot # | ||
+ | </ | ||
+ | < | ||
+ | nas brot # sync | ||
+ | nas brot # btrfs device add /dev/sdd3 / -f | ||
+ | nas brot # btrfs device add /dev/sde3 / -f | ||
+ | nas brot # btrfs balance start -v / | ||
+ | Dumping filters: flags 0x7, state 0x0, force is off | ||
+ | DATA (flags 0x0): balancing | ||
+ | METADATA (flags 0x0): balancing | ||
+ | SYSTEM (flags 0x0): balancing | ||
+ | |||
+ | (anderer screen) | ||
+ | nas brot # watch -n 10 'btrfs balance status /' | ||
+ | |||
+ | Every 10,0s: btrfs balance status / Tue Dec 30 11:02:30 2014 | ||
+ | |||
+ | Balance on '/' | ||
+ | 1 out of about 4941 chunks balanced (2 considered), | ||
+ | |||
===== NAS Festplattenausbau ===== | ===== NAS Festplattenausbau ===== | ||
Line 178: | Line 862: | ||
</ | </ | ||
- | ==== Umzug ==== | + | ===== Umzug auf größere Platten ===== |
- Neue Platten einhängen [x] | - Neue Platten einhängen [x] | ||
- Partitionen kopieren [x] | - Partitionen kopieren [x] | ||
Line 184: | Line 868: | ||
- Daten kopieren [x] | - Daten kopieren [x] | ||
- Große Platte aus altem RAID umhängen in das neue [ X ] | - Große Platte aus altem RAID umhängen in das neue [ X ] | ||
- | - Systempartitionen auf die neuen Platten holen [ ] | + | - Systempartitionen auf die neuen Platten holen [ X ] |
=== Partitionierung nach Anpassung === | === Partitionierung nach Anpassung === |