Compare commits
3 Commits
961b2205ac
...
0490b14ef8
Author | SHA1 | Date | |
---|---|---|---|
0490b14ef8 | |||
fa5ddb1313 | |||
695a3ef687 |
@ -40,6 +40,8 @@ on LV:
|
|||||||
# lvcreate --type raid1 --mirrors 1 -n backup -L 4t vgbackup /dev/sda /dev/sdb
|
# lvcreate --type raid1 --mirrors 1 -n backup -L 4t vgbackup /dev/sda /dev/sdb
|
||||||
# cat /sys/class/block/nvme0n1/queue/logical_block_size
|
# cat /sys/class/block/nvme0n1/queue/logical_block_size
|
||||||
512
|
512
|
||||||
|
# dumpe2fs -h /dev/vgbackup/backup | grep 'Block size'
|
||||||
|
Block size: 4096
|
||||||
# lvconvert --raidintegrity y --raidintegrityblocksize 4096 --raidintegritymode bitmap /dev/vgbackup/backup
|
# lvconvert --raidintegrity y --raidintegrityblocksize 4096 --raidintegritymode bitmap /dev/vgbackup/backup
|
||||||
# mkfs.ext4 -b 4096 -O ^has_journal /dev/vgbackup/backup
|
# mkfs.ext4 -b 4096 -O ^has_journal /dev/vgbackup/backup
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
@ -34,7 +34,7 @@ If problems are found, this is denoted by @m@ on 9th bit of attributes displayed
|
|||||||
by @lvs@:
|
by @lvs@:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
$ cat /tmp/lvs
|
# lvs
|
||||||
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
|
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
|
||||||
backup vgdev rwi-aor-m- 4.00g 100.00
|
backup vgdev rwi-aor-m- 4.00g 100.00
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
@ -58,7 +58,8 @@ bq. Integrity limitations
|
|||||||
pvmove, snapshots, splitmirror, raid syncaction commands, raid rebuild.
|
pvmove, snapshots, splitmirror, raid syncaction commands, raid rebuild.
|
||||||
|
|
||||||
That means commands like @lvchange --syncaction repair@ or @lvchange --rebuild@
|
That means commands like @lvchange --syncaction repair@ or @lvchange --rebuild@
|
||||||
won't work as expected.
|
*should not be run* on RAID with integrity. They can give misleading results,
|
||||||
|
e.g. signal mismatch when there is none.
|
||||||
|
|
||||||
If RAID1 with integrity LV requires refresh (partial synchronization) due to
|
If RAID1 with integrity LV requires refresh (partial synchronization) due to
|
||||||
e.g. device write errors, but both PVs are otherwise available, take the
|
e.g. device write errors, but both PVs are otherwise available, take the
|
||||||
@ -82,7 +83,8 @@ so the process must be performed manually:
|
|||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
* check integrity of both RAID1 parts:
|
* check integrity of both RAID1 parts:
|
||||||
** whether they differ at all:
|
** whether they differ at all (this may be time consuming and it may be more
|
||||||
|
appropriate to proceed directly to file content comparison instead):
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
# sha512sum /dev/vgdev/backup /dev/vgdev/backup_split
|
# sha512sum /dev/vgdev/backup /dev/vgdev/backup_split
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
@ -92,11 +94,19 @@ so the process must be performed manually:
|
|||||||
# fsck.ext4 -n -f /dev/vgdev/backup_split
|
# fsck.ext4 -n -f /dev/vgdev/backup_split
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
** once filesystems are fixed and can be mounted, compare file content to
|
** once filesystems are fixed and can be mounted, compare file content to
|
||||||
determine which mirror is valid:
|
determine which mirror is valid (no output from @rsync@ means no differences):
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
# mount /dev/vgdev/backup /mnt/mirror1
|
# mount /dev/vgdev/backup /mnt/mirror1
|
||||||
# mount /dev/vgdev/backup_split /mnt/mirror1
|
# mount /dev/vgdev/backup_split /mnt/mirror2
|
||||||
# rsync -d /mnt/mirror1 /mnt/mirror2
|
# rsync -n -c -a --delete --progress /mnt/mirror1 /mnt/mirror2
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
* finally remove invalid mirror, recreate RAID1 and re-add integrity layer
|
* finally remove invalid mirror, recreate RAID1, re-add integrity layer and
|
||||||
|
discard unused space if necessary
|
||||||
|
|
||||||
|
|
||||||
|
h2. SSD related maintenance
|
||||||
|
|
||||||
|
h3. Discard unused space
|
||||||
|
|
||||||
|
* OWC does not support TRIM
|
||||||
|
@ -43,6 +43,7 @@ h3 {
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 0.6em;
|
||||||
}
|
}
|
||||||
p, ul {
|
p, ul {
|
||||||
line-height: 1.35rem;
|
line-height: 1.35rem;
|
||||||
@ -77,8 +78,8 @@ figcaption {
|
|||||||
figcaption .lang {
|
figcaption .lang {
|
||||||
color: #606060;
|
color: #606060;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 0.8rem;
|
font-size: 0.7rem;
|
||||||
line-height: 1.5rem;
|
line-height: 1.3rem;
|
||||||
padding: 0 0.4rem;
|
padding: 0 0.4rem;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
@ -123,5 +124,5 @@ a:hover {
|
|||||||
|
|
||||||
em {
|
em {
|
||||||
color: #505050;
|
color: #505050;
|
||||||
font-size: 0.9rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user