Add ariane doc
This commit is contained in:
87
doc/ariane.md
Normal file
87
doc/ariane.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# ariane
|
||||||
|
## Hard disks
|
||||||
|
| | V1 | V2 | V3 | V4 |
|
||||||
|
| :-: | :-: | :-: | :-: | :-: |
|
||||||
|
|**H1**|00 /dev/sda `6TB` <br> `WD-WX21D36PP32E`|04 |08 |12 |
|
||||||
|
|**H2**|01 /dev/sdb `6TB` <br> `WD-WX21D36PPLPH`|05 |09 |13 |
|
||||||
|
|**H3**|02 /dev/sdc `6TB` <br> `WD-WX21D36PP0K1`|06 |10 |14 |
|
||||||
|
|**H4**|03 /dev/sdd `6TB` <br> `WD-WXB1HB4MJCMM`|07 |11 |15 |
|
||||||
|
## Install ZFS
|
||||||
|
```shell
|
||||||
|
apt-get install zfsutils-linux
|
||||||
|
modprobe zfs
|
||||||
|
systemctl restart zfs-import-cache
|
||||||
|
systemctl restart zfs-import-scan
|
||||||
|
systemctl restart zfs-mount
|
||||||
|
systemctl restart zfs-share
|
||||||
|
```
|
||||||
|
## Initial ZFS Setup
|
||||||
|
### Find disk serial numbers
|
||||||
|
```shell
|
||||||
|
for i in a b c d e f g; do echo -n "/dev/sd$i: "; hdparm -I /dev/sd$i | awk '/Serial Number/ {print $3}'; done
|
||||||
|
```
|
||||||
|
### Wipe disks
|
||||||
|
```shell
|
||||||
|
mdadm --zero-superblock --force /dev/sda
|
||||||
|
sgdisk --zap-all /dev/sdX
|
||||||
|
```
|
||||||
|
### Partition disks
|
||||||
|
```shell
|
||||||
|
sgdisk -n1:0:0 -t1:BF01 /dev/sdX
|
||||||
|
```
|
||||||
|
### Create zpool
|
||||||
|
```shell
|
||||||
|
zpool create -o ashift=12 -O atime=off -O compression=lz4 \
|
||||||
|
zv1 raidz2 \
|
||||||
|
/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WX21D36PP32E-part1 \
|
||||||
|
/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WX21D36PPLPH-part1 \
|
||||||
|
/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WX21D36PP0K1-part1 \
|
||||||
|
/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WXB1HB4MJCMM-part1
|
||||||
|
```
|
||||||
|
### Create datasets
|
||||||
|
```shell
|
||||||
|
zfs create zv1/homes
|
||||||
|
zfs create zv1/daten
|
||||||
|
zfs create zv1/fotos
|
||||||
|
```
|
||||||
|
### Set dataset quota
|
||||||
|
```shell
|
||||||
|
zfs set quota=1T zv1/daten zv1/fotos zv1/homes
|
||||||
|
```
|
||||||
|
### Transfer data
|
||||||
|
```shell
|
||||||
|
rsync --stats -avhP --exclude Pictures root@atlas:/mnt/save/fet_daten/ /zv1/daten/
|
||||||
|
rsync --stats -avhP root@atlas:/mnt/save/fet_daten/Pictures/ /zv1/fotos/
|
||||||
|
rsync --stats -avhP root@atlas:/home/ /zv1/homes/
|
||||||
|
```
|
||||||
|
### Before reinstalling
|
||||||
|
```shell
|
||||||
|
zfs export
|
||||||
|
```
|
||||||
|
### After reinstalling
|
||||||
|
```shell
|
||||||
|
zfs import
|
||||||
|
```
|
||||||
|
### Add 2GB log partition on ssd
|
||||||
|
```shell
|
||||||
|
zpool add zv1 log mirror /dev/nvme0n1p2 /dev/nvme1n1p2
|
||||||
|
```
|
||||||
|
### If intend using ACL (not done!)
|
||||||
|
```shell
|
||||||
|
zfs set xattr=sa <dataset>
|
||||||
|
zfs set acltype=posixacl <dataset>
|
||||||
|
```
|
||||||
|
## ZFS Maintenance
|
||||||
|
```shell
|
||||||
|
zpool status -v
|
||||||
|
zpool list -v
|
||||||
|
zpool get all
|
||||||
|
zpool history
|
||||||
|
zpool scrub zv1
|
||||||
|
```
|
||||||
|
## MDADM Maintenance
|
||||||
|
```shell
|
||||||
|
mdadm --misc --detail /dev/md0
|
||||||
|
echo check > /sys/block/md0/md/sync_action
|
||||||
|
watch -n 0.1 cat /proc/mdstat
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user