前言:
今天各位老铁们对“ubuntubyuuid”大致比较讲究,大家都需要学习一些“ubuntubyuuid”的相关资讯。那么小编在网络上汇集了一些关于“ubuntubyuuid””的相关内容,希望小伙伴们能喜欢,你们一起来了解一下吧!今天在一台Ubuntu服务器上进行挂载硬盘时报错提示“linux_raid_member”
下面看下解决办法。
首先查看下原有设备。
root@file:/home/file# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTloop0 7:0 0 89.1M 1 loop /snap/core/8268sda 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/sdbGNU Parted 3.2Using /dev/sdbWelcome to GNU Parted! Type 'help' to view a list of commands.(parted) p Model: ATA ST8000NM000A-2KE (scsi)Disk /dev/sdb: 8002GBSector size (logical/physical): 512B/4096BPartition Table: gptDisk 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 /datamount: /data: unknown filesystem type 'linux_raid_member'.
问题来了,格式化一下,依然报错
root@file:/home/file# mkfs.ext4 /dev/sdb1mke2fs 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 statusNo devices foundroot@file:/home/file# cat /proc/mdstatPersonalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md127 : inactive sdb1[1](S) 7813893495 blocks super 1.2unused devices: <none>root@file:/home/file# mdadm -S /dev/md127mdadm: stopped /dev/md127root@file:/home/file# cat /proc/mdstatPersonalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] unused devices: <none>
再次格式化
root@file:/home/file# mkfs.ext4 /dev/sdb1mke2fs 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 inodesFilesystem UUID: 1d2d1374-ca5e-42ad-87bd-6d8cdb7279b1Superblock 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, 1934917632Allocating group tables: done Writing inode tables: done Creating journal (262144 blocks): doneWriting 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
版权声明:
本站文章均来自互联网搜集,如有侵犯您的权益,请联系我们删除,谢谢。
标签: #ubuntubyuuid