[問題] 新裝的硬碟無法mount

看板Linux作者 (chings22)時間2年前 (2021/10/24 23:13), 2年前編輯推噓2(203)
留言5則, 3人參與, 2年前最新討論串1/1
有一台主機redhat 5.x已有一組raid-1的disk,用LVM管理(前人做的) 後來新增2個disk,做成第2個raid-1,在linux看到是/dev/sdb 已經切成/dev/sdb1,並format了 以下是fdisk -l的訊息 Disk /dev/sdb: 999.9 GB, 999999668224 bytes 255 heads, 63 sectors/track, 121576 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 121576 976559188+ 83 Linux Disk /dev/dm-2: 999.9 GB, 999999668224 bytes 255 heads, 63 sectors/track, 121576 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/dm-2p1 1 121576 976559188+ 83 Linux Disk /dev/dm-3: 999.9 GB, 999996609024 bytes 255 heads, 63 sectors/track, 121575 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-3 doesn't contain a valid partition table https://imgur.com/3nt17Se.jpg
但要mount時,就是有這訊息 # mount /dev/sdb1 /u03 mount: /dev/sdb1 already mounted or /u03 busy # dmsetup ls mpath5p1 (253, 3) VolGroup00-LogVol01 (253, 1) mpath5 (253, 2) VolGroup00-LogVol00 (253, 0) https://imgur.com/8XwDy4N.jpg
/dev/dm-2跟/dev/dm-3 都是系統自己生出來的 用LVM GUI介面對/dev/sdb做initilize 也不行,說已在使用 (我linux的LVM不是很熟) google一些文件後,是否要把multipath移除 ? 1.才能直接mount /dev/sdb1 2.或是加到LVM管理 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.166.230.9 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1635088408.A.8EA.html

10/25 00:19, 2年前 , 1F
你先找 sdb1 誰在用吧
10/25 00:19, 1F

10/25 08:26, 2年前 , 2F
妳都說用lvm管理了 lvs pvs vgs的結果? r1也有可能是
10/25 08:26, 2F

10/25 08:26, 2年前 , 3F
mdadm
10/25 08:26, 3F
[root@xxx ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VolGroup00 -wi-ao 921.44G LogVol01 VolGroup00 -wi-ao 9.75G [root@xxx ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 VolGroup00 lvm2 a- 931.22G 32.00M [root@xxx ~]# vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 931.22G 32.00M 2個raid-1都是raid card做的 https://imgur.com/PPFRpKS

10/25 08:27, 2年前 , 4F
請問要用什麼指令看sdb1被佔用了?
10/25 08:27, 4F

10/25 09:04, 2年前 , 5F
mount/df/lsof 之類的都可以啊
10/25 09:04, 5F
[root@xxx ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) none on /proc type proc (rw) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/sda1 on /boot type ext3 (rw) none on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) [root@xxx ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 951035932 864930732 37795340 96% / /dev/sda1 101086 14975 80892 16% /boot none 4082748 0 4082748 0% /dev/shm [root@xxx ~]# lsof |grep /sdb multipath 850 root 5r BLK 8,16 1281 /dev/sdb 好像被設定multipath了,disk剛在bios config好,開完機就這樣了 [root@xxx ~]# lsof |grep /sda ==>no output https://imgur.com/zWNJAh6
https://imgur.com/TZBn2oK
[root@xxx ~]# multipath -ll mpath5 (3600508e000000000d6b9d8f636d7c603) [size=931 GB][features="1 queue_if_no_path"][hwhandler="0"] \_ round-robin 0 [active] \_ 0:0:8:0 sdb 8:16 [active][ready] https://imgur.com/mDbGWaO
[root@xxx ~]# dmsetup ls mpath5p1 (253, 3) VolGroup00-LogVol01 (253, 1) mpath5 (253, 2) VolGroup00-LogVol00 (253, 0) https://imgur.com/mYoNPEC
如果要移除的話,是否移除mpath5,還是要先移除 mpath5p1 ? multipath -f mpath5 不會影響原本的這2個lv吧? VolGroup00-LogVol01 VolGroup00-LogVol00 ※ 編輯: chings22 (118.166.230.9 臺灣), 10/25/2021 18:14:54
文章代碼(AID): #1XTNWOZg (Linux)