Welcome 微信登录

首页 / 操作系统 / Linux / /dev/sdxx is apparently in use by the system; will not make a filesystem here! 解决方法

在存储上共享了一个500G的空间,映射到Linux系统提供上,环境由2个节点组成。 

一. 测试一: 直接mount

用fdisk 格式化之后如下:[root@rac1 u01]# fdisk -l……Disk /dev/sdk: 536.8 GB, 536870912000 bytes255 heads, 63 sectors/track, 65270cylindersUnits = cylinders of 16065 * 512 = 8225280bytes Device Boot Start End Blocks Id System/dev/sdk1 1 65270 524281243+ 83 Linux……[root@rac1u01]# 但是创建文件系统时报错:[root@rac1 u01]# mkfs -t ext3 /dev/sdk1mke2fs 1.39 (29-May-2006)/dev/sdk1 isapparently in use by the system; will not make a filesystem here! 提示/dev/sdk1 正在被使用。 /dev/sdk1 正在被DM管理,所以我们创建文件系统时提示报错,我们手工的移除,就可以正常的创建文件系统,操作如下: [root@rac1 u01]# dmsetup statusmpath2: 0 2097152 multipath 2 0 1 0 1 1 A 01 0 8:16 A 0mpath11p1: 0 1048562487 linearmpath9: 0 209715200 multipath 2 0 1 0 1 1 A0 1 0 8:128 A 0mpath8: 0 629145600 multipath 2 0 1 0 1 1 A0 1 0 8:112 A 0mpath7: 0 629145600 multipath 2 0 1 0 1 1 A0 1 0 8:96 A 0mpath6: 0 2097152 multipath 2 0 1 0 1 1 A 01 0 8:80 A 0mpath5: 0 2097152 multipath 2 0 1 0 1 1 A 01 0 8:64 A 0mpath11: 0 1048576000 multipath 2 0 1 0 1 1A 0 1 0 8:160 A 0mpath4: 0 2097152 multipath 2 0 1 0 1 1 A 01 0 8:48 A 0mpath10: 0 209715200 multipath 2 0 1 0 1 1A 0 1 0 8:144 A 0mpath3: 0 2097152 multipath 2 0 1 0 1 1 A 01 0 8:32 A 0 [root@rac1 u01]# dmsetup remove_all [root@rac1 u01]# dmsetupstatus No devices found [root@rac1 u01]# mkfs -text3 /dev/sdk1 mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)65536000 inodes, 131070310 blocks6553515 blocks (5.00%) reserved for thesuper userFirst data block=0Maximum filesystem blocks=42949672964000 block groups32768 blocks per group, 32768 fragments pergroup16384 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000 Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystemaccounting information: done This filesystem will be automaticallychecked every 36 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override. --创建文件系统成功。 --mount 成功:[root@rac1 u01]# mount /dev/sdk1/u01/backup[root@rac1 u01]# df -lhFilesystem Size Used Avail Use% Mounted on/dev/sda3 59G 22G 35G 39% //dev/sda1 996M 51M 894M 6% /boottmpfs 32G 0 32G 0% /dev/shm/dev/sda4 145G 188M 138G 1% /u01/dave/dev/sdk1 493G 198M 467G 1% /u01/backup  --修改/etc/fstab 文件,让开机自动挂载:[root@rac2 mapper]# vi /etc/fstab LABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0LABEL=SWAP-sda2 swap swap defaults 0 0/dev/sdk1 /u01/backup ext3 defaults 0 0  但重启后测试,该文件不能正常挂载,手工挂载也会失败。 所以,这种解决方法不行。  补充内容:Device mapper 是 Linux 2.6 内核中提供的一种从逻辑设备到物理设备的映射框架机制,在该机制下,用户可以很方便的根据自己的需要制定实现存储资源的管理策略,如条带化,镜像,快照等. 当前比较流行的 Linux 下的逻辑卷管理器如 LVM2(Linux Volume Manager 2 version)、EVMS(EnterpriseVolume Management System)、dmraid(Device Mapper RaidTool)等都是基于该机制实现的. 只要用户在用户空间制定好映射策略,按照自己的需要编写处理具体IO请求的 target driver插件,就可以很方便的实现这些特性. Device Mapper主要包含内核空间的映射和用户空间的device mapper库及dmsetup工具.
  • 1
  • 2
  • 下一页
yum的配置文件说明Multipath实现LUN设备名称的持久化相关资讯      Linux系统基础教程  本文评论 查看全部评论 (0)
表情: 姓名: 字数
版权所有©石家庄振强科技有限公司2024 冀ICP备08103738号-5 网站地图