今天上了個Oracle存儲數(shù)據(jù)備份還原掛載存儲新硬盤,裝完系統(tǒng)后讓機房技術(shù)把舊硬盤掛上去,我們這邊遠程操作拷貝數(shù)據(jù)到新的硬盤上面,在mount /dev/sda2 /mnt的時候,提示“mount: /dev/sda2 already mounted or /mnt busy ” 查證/dev/sda2沒有被掛載/mnt也沒有在使用
#fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 38913 312464250 8e Linux LVM
是lvm分區(qū),這種不能直接被掛載。
正確掛載流程:
#fdisk -lu /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 63 208844 104391 83 Linux
/dev/sda2 208845 625137344 312464250 8e Linux LVM
//從上看出lvm分區(qū)起始于208845扇區(qū),把這個地址處的分區(qū)mount為loop設(shè)備:
#losetup -f -o $[208845*512] /dev/sda2
#losetup -a
/dev/loop0: [0011]:1050 (/dev/sda2), offset 106928640
# lvm pvscan //掃描lvm volumns:
PV /dev/sda2 VG VolGroup00 lvm2 [297.97 GB / 0 free]
Total: 1 [297.97 GB] / in use: 1 [297.97 GB] / in no VG: 0 [0 ]
# lvm vgchange -ay //激活lvm volumn
2 logical volume(s) in volume group "VolGroup00" now active
# ls /dev/mapper/ //查看激活后的分區(qū)名稱
control VolGroup00-LogVol00 VolGroup00-LogVol01
# lvm lvs 查看大小
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-a- 296.03G
LogVol01 VolGroup00 -wi-a- 1.94G
# mount /dev/mapper/VolGroup00-LogVol00 /mnt
這樣就掛載上去了
聯(lián)系客服