重新调整的磁盘 – Linux blkid命令返回不正确的信息

前端之家收集整理的这篇文章主要介绍了重新调整的磁盘 – Linux blkid命令返回不正确的信息前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用从VMware ESXi安装中删除的SSD驱动器.我正在尝试在现有的 Linux安装(CentOS 6.2)中重用磁盘.该驱动器位于HP Smart Array P410 RAID控制器后面,并配置为单独的逻辑驱动器.

当我第一次尝试磁盘格式时,我收到以下内容

[root@poot ~]# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 240.0 GB,240021504000 bytes
255 heads,63 sectors/track,29180 cylinders

我按照instructions here使用gdisk删除了GUID分区表:

[root@poot ~]# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.2   

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): x

Expert command (? for help): z
About to wipe out GPT on /dev/sdb. Proceed? (Y/N): y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): y

我继续使用fdisk,然后mkfs.xfs驱动器上的XFS文件系统.我通常使用磁盘标签安装,但自从EL6开始采用UUID安装.但是,使用此磁盘时,按标签安装失败.我试图检索UUID,但是blkid命令返回带有UUID_SUB和TYPE =“VMFS_volume_member”的错误或陈旧数据.

[root@poot ~]# mkfs.xfs -f -L /data -d agcount=50 -l size=1024m,version=2 /dev/sdb1
Meta-data=/dev/sdb1              isize=256    agcount=50,agsize=1171975 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=58598744,imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=262144,version=2
         =                       sectsz=512   sunit=0 blks,lazy-count=1
realtime =none                   extsz=4096   blocks=0,rtextents=0

[root@poot ~]# mount /data/
mount: special device LABEL=/data does not exist

[root@poot ~]# blkid       
/dev/sda1: UUID="7406b992-4aab-4164-bfa1-1920f97658c7" TYPE="ext4" 
/dev/sda5: UUID="2390f2aa-d671-430d-b286-c6eca7c073a6" TYPE="swap" 
/dev/sda7: UUID="3c6f94d5-3898-4f36-be16-a33cf175d2ca" TYPE="xfs" 
/dev/sdb1: UUID_SUB="4eb0c035-4fe6b2d8-77ed-00265583f46d" UUID="4eb0c035-4b5714b0-b987-00265583f46d" TYPE="VMFS_volume_member"

我以前从未见过这样的事.

我试过删除/ etc / blkid / blkid *.它似乎也在重新启动时持续存在.我该怎么做才能清除这些数据并获得干净的UUID?

解决方法

对于这种情况,您需要擦除超过1 MiB以杀死旧的VMFS超级块:
dd if=/dev/zero of=/dev/sdb1 bs=4M count=1

根据blkid消息来源,VMFS卷成员超级块位于距分区开始的1024 KiB偏移处,并且VMFS文件系统超级块处于2048 KiB偏移量,因此擦除4 MiB以确定.

原文链接:https://www.f2er.com/linux/398493.html

猜你在找的Linux相关文章