ubuntu挂载raid硬盘_Ubuntu文件挂载时报错“linux_raid_member”

本文介绍了在Ubuntu服务器上挂载硬盘时遇到'linux_raid_member'错误的解决过程。通过查看设备、创建分区、挂载、删除RAID信息并重新格式化硬盘,最终成功挂载硬盘并实现开机自动挂载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天在一台Ubuntu服务器上进行挂载硬盘时报错提示“linux_raid_member”

下面看下解决办法。

首先查看下原有设备。

root@file:/home/file# lsblk

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

loop0    7:0    0 89.1M  1 loop /snap/core/8268

sda      8:0    0  477G  0 disk

├─sda1   8:1    0    1M  0 part

└─sda2   8:2    0  477G  0 part /

sdb      8:16   0  7.3T  0 disk

开始分区、挂载

root@file:/home/file# parted /dev/sdb

GNU Parted 3.2

Using /dev/sdb

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p

Model: ATA ST8000NM000A-2KE (scsi)

Disk /dev/sdb: 8002GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags:

Number Start End Size File system Name Flags

(parted) mklabel gpt

Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?

Yes/No? y

(parted) mkpart

Partition name? []?

File system type? [ext2]? ext4

Start? 0

End? -1

Warning: The resulting partition is not properly aligned for best performance.

Ignore/Cancel?

Ignore/Cancel? i

(parted) exit

感觉哪里不对,之前挂载没有这些提示啊,继续挂载

root@file:/home/file# mount /dev/sdb1 /data

mount: /data: unknown filesystem type 'linux_raid_member'.

问题来了,格式化一下,依然报错

root@file:/home/file# mkfs.ext4 /dev/sdb1

mke2fs 1.44.1 (24-Mar-2018)

/dev/sdb1 contains a linux_raid_member file system labelled 'file-System-Product-Name:0'

Proceed anyway? (y,N) y

/dev/sdb1 is apparently in use by the system; will not make a filesystem here!

这时才想起来,原来这块硬盘是之前做过软raid,好了问题找到了,我们删除下raid信息

root@file:/home/file# dmsetup status

No devices found

root@file:/home/file# cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]

md127 : inactive sdb1[1](S)

7813893495 blocks super 1.2

unused devices:

root@file:/home/file#  mdadm -S /dev/md127mdadm: stopped /dev/md127

root@file:/home/file#   cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]

unused devices:

再次格式化

root@file:/home/file# mkfs.ext4 /dev/sdb1

mke2fs 1.44.1 (24-Mar-2018)

/dev/sdb1 contains a linux_raid_member file system labelled 'file-System-Product-Name:0'

Proceed anyway? (y,N) y

/dev/sdb1 alignment is offset by 3072 bytes.

This may result in very poor performance, (re)-partitioning suggested.

Creating filesystem with 1953506397 4k blocks and 244191232 inodes

Filesystem UUID: 1d2d1374-ca5e-42ad-87bd-6d8cdb7279b1

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Allocating group tables: done

Writing inode tables: done

Creating journal (262144 blocks): done

Writing superblocks and filesystem accounting information:

done

挂载没问题。

root@file:/home/file# mount /dev/sdb1 /data

查看下,容量出来了

root@file:/home/file# df -h /data

Filesystem      Size  Used Avail Use% Mounted on/dev/sdb1       7.3T   93M  6.9T   1% /data

添加到 /etc/fstab 文件末尾,保存退出 实现开机自动挂载

root@file:/home/file# vim /etc/fstab

/dev/sdb1  /data        ext4    defaults        0 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值