LVM image mount/umount

本文介绍了两种在Linux下挂载LVM(Logical Volume Manager)映像文件的方法。首先通过`losetup`分配loopback设备,然后使用`kpartx`创建映射分区,接着扫描卷组并挂载逻辑卷。另一种方法是通过`fdisk`确定分区起始位置,使用`losetup`指定偏移量挂载。最后,展示了如何卸载挂载的LVM映像。
摘要由CSDN通过智能技术生成
Error

It can not mount.

#mount system.img /mnt/

mount: system.img is not a block device (maybe try `-o loop'?)

#mount -o loop system.img /mnt/

mount: you must specify the filesystem type

#file system.img

system.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 208782 sectors; partition

0x8e, starthead 0, startsector 208845, 12370050 sectors, code offset 0x48

Solution_1

Mount

1).Survey which is open to the loopback device to mount

#losetup -f/dev/loop0

#losetup /dev/loop0 system.img


2).To check the status of DEBAISUMAPPA add a partition

#ls /dev/mapper/control


Add partition mappings from partition tables

#kpartx -a /dev/loop0

#ls /dev/mapper/

control loop0p1 loop0p2

3).Check out the partition

#fdisk -l -u /dev/loop0Disk /dev/loop0: 6442 MB, 6442450944 bytes Disk

255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System Device Boot
/dev/loop0p1 * 63 208844 104391 83 Linux
/dev/loop0p2 208845 12578894 6185025 8e Linux LVM

4).To Check status

Scan t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值