自己在2019年整了个蜗牛星际的矿渣安上Linux和nextcloud当NAS用了
起初为了防止数据丢失,用mdadm
搞了个软raid0, 结果硬盘没出什么事
软raid经常出事(重启盘符变化挂不上软raid导致不能开机)
效果上真是南辕北辙了,好在数据没丢
最近它又出了一点点小事
干脆把修复过程中用的命令记录下来
以便日后使用
常用命令
|
|
相关配置文件
#
# /etc/fstab
# Created by anaconda on Mon Apr 1 19:52:47 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=89d95387-7264-4c96-b6ee-0ec57b461ea2 /boot xfs defaults 0 0
UUID=B8DC-B9DD /boot/efi vfat umask=0077,shortname=winnt 0 0
/dev/mapper/centos-swap swap swap defaults 0 0
/dev/md0 /raid xfs defaults 0 0
/raid/root /root none bind 0 0
# /etc/mdadm.conf
DEVICE partitions
ARRAY /dev/md/mynas:0 metadata=1.2 spares=1 name=mynas:0 UUID=c1b93058:3c7913b0:75907b69:83dc1899
记录
[root@mynas baiaiyu]# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Thu Apr 4 20:32:33 2019
Raid Level : raid1
Array Size : 1953381440 (1862.89 GiB 2000.26 GB)
Used Dev Size : 1953381440 (1862.89 GiB 2000.26 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat May 29 13:13:19 2021
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Name : mynas:0 (local to host mynas)
UUID : c1b93058:3c7913b0:75907b69:83dc1899
Events : 1556689
Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 8 49 1 active sync /dev/sdd1
[root@mynas baiaiyu]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sdd linux_raid_member mynas:0 c1b93058-3c79-13b0-7590-7b6983dc1899
└─sdd1 linux_raid_member mynas:0 c1b93058-3c79-13b0-7590-7b6983dc1899
└─md0 xfs 2a7ca360-0e4f-43e9-849a-b1b5f253f6e0 /raid
sdb
└─sdb1 ntfs 会移动の磁盘 F09EDAC29EDA8110
sdc
└─sdc1 linux_raid_member mynas:0 c1b93058-3c79-13b0-7590-7b6983dc1899
└─md0 xfs 2a7ca360-0e4f-43e9-849a-b1b5f253f6e0 /raid
sda
├─sda2 xfs 89d95387-7264-4c96-b6ee-0ec57b461ea2 /boot
├─sda3 LVM2_member WVUjz2-BU3I-eK4h-XtKe-Ai1N-60C3-9qFfsG
│ ├─centos-swap swap 94c61520-7f9e-4697-afe2-3fc963b5d6e2 [SWAP]
│ └─centos-root xfs a046b45e-087a-436c-be50-91ad9961bc8a /
└─sda1 vfat B8DC-B9DD /boot/efi