# How to mount LVM2 partition (if possible)?



## urello (Jul 30, 2015)

I need to mount centos lvm2 partition under FreeBSD. There are steps iI've done:

Compiled & kldloaded fuse.ko
Compiled & kldloaded geom_linux_lvm.ko
Installed sysutils/fusefs-ext4fuse
Trying to mount:

```
# ext4fuse /dev/linux_lvm/centos-home /mnt/
Partition doesn't contain EXT4 filesystem
```


```
# gpart show
=>  34  156299308  ada0  GPT  (75G)
  34  128  1  freebsd-boot  (64K)
  162  41943040  2  freebsd-ufs  (20G)
  41943202  106954624  4  freebsd-ufs  (51G)
  148897826  7401515  3  freebsd-swap  (3.5G)
  156299341  1  - free -  (512B)

=>  34  1953522988  ada1  GPT  (932G)
  34  2014  - free -  (1.0M)
  2048  409600  1  efi  (200M)
  411648  1024000  2  linux-data  (500M)
  1435648  1952086016  3  linux-lvm  (931G)
  1953521664  1358  - free -  (679K)
```


```
# geom linux_lvm list
Geom name: centos
Providers:
1. Name: linux_lvm/centos-root
  Mediasize: 53687091200 (50G)
  Sectorsize: 512
  Mode: r0w0e0
2. Name: linux_lvm/centos-home
  Mediasize: 941717716992 (877G)
  Sectorsize: 512
  Mode: r0w0e0
3. Name: linux_lvm/centos-swap
  Mediasize: 4060086272 (3.8G)
  Sectorsize: 512
  Mode: r0w0e0
Consumers:
1. Name: diskid/DISK-9VP4SLJZp3
  Mediasize: 999468040192 (931G)
  Sectorsize: 512
  Stripesize: 0
  Stripeoffset: 735051776
  Mode: r0w0e0
```


----------



## cabriofahrer (Feb 18, 2017)

Well, thanks for this, because it helped me and it worked. In your case, it looks like you don't have an ext4 filesystem:


```
root@elvis69:/usr/home/test # geom linux_lvm list
Geom name: fedora
Providers:
1. Name: linux_lvm/fedora-root
   Mediasize: 34938552320 (33G)
   Sectorsize: 512
   Mode: r0w0e0
2. Name: linux_lvm/fedora-swap
   Mediasize: 4005560320 (3.7G)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: ada0s2
   Mediasize: 38945161216 (36G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1074790400
   Mode: r0w0e0
```


```
root@elvis69:/usr/home/test # kldload fuse
root@elvis69:/usr/home/test # ext4fuse /dev/linux_lvm/fedora-root /mnt
root@elvis69:/usr/home/test #
```

Only thing is that I can only access the contents of /mnt as root. Any ideas how access as normal user is possible, like in other cases where you mount something into /mnt?


----------

