Re: [Hampshire] mounting a logical volume

Top Page

Reply to this message
Author: James Dutton via Hampshire
Date:  
To: Hampshire LUG Discussion List
CC: James Dutton, Peter Alefounder
Subject: Re: [Hampshire] mounting a logical volume
Hi,

Just in case, I would like to point out that Joseph B email contains
incorrect instructions. mkfs on /dev/sde5 will cause problems.
LVM has 3 levels.
1) Physical Volume. the "pv"
2) Volume Ground. the "vg"
3) Logical Volume. the "lv"

If you have defined some LVM partitions, then the command to use is
lvdisplay.
It will list the available LVs.

Then do:
mount  /dev/mapper/data2     and not mount /dev/sde5
If "data2" is the lv name in the lvdisplay output.
LVM logical volumes will appear as devices in /dev/mapper/...



If you have not set up lvm yet.
You need to assign /dev/sde5 as a pv in a vg. You then get a name for the
vg.
You then create LVs within the vg.
You then mount the LVs.









On Thu, 17 Feb 2022 at 00:18, Joseph Bennie via Hampshire <
hampshire@???> wrote:

>
>
> Sent from my iPhone
>
> > On 16 Feb 2022, at 23:37, Peter Alefounder via Hampshire <
> hampshire@???> wrote:
> >
> > I am trying to mount a logical volume, under Debian 11.1.0. lsblk gives:
> > NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> > sde           8:64   0 931.5G  0 disk
> > sde1          8:65   0   243M  0 part
> > sde2          8:66   0     1K  0 part
> > sde5          8:69   0 931.3G  0 part

> >
> > It is sde5 that I want access to. Trying to mount it:
> >
> > root@debian:~# mount /dev/sde5 /mnt
> > mount: /mnt: unknown filesystem type 'LVM2_member'.
> >
> > An internet search suggests use of lvdisplay to get a name that
> > can be used to mount it:
> >
> > root@debian:~# lvdisplay
> > WARNING: PV /dev/sde5 in VG debian is using an old PV header, modify
> > the VG to update.
> >
> > (and then lists disks for which there is no problem)
> >
> > Any ideas on how I proceed from here?
>
> Hi Peter,
>
> a)
> in mnt create an empty folder ie petersdisk. its not cool to mount
> directly on /mnt it blocks other mounts. to say /mnt/cdrom …
>
> if its not a new disk. stop. i know nothing about lvm2 (software raid)
> suggests this disk is actually one from a set of disks.
>
> you probably cant mount the disk in isolation from its set. (a striped set
> would mean the file parts span multiple physical disks. )
>
> if not and
> b) this is a new disk…have you formated the partition yet? if i recall its
> mkfs.ext4 /dev/sde5 (substitute filesystem format as required? )
>
> once formated them do: mount /dev/sde5 /mnt/petersdisk ext4
>
> (obv my example chose ext4 just for illustration… i’m a bit out of date on
> whats best to use.. it can be subjective to the use case, but ext4 used to
> be the pref for a single everyday internal desktop drive)
>
> finally add an entry to /etc/fstab
> hope that helps
> Jay
>
>
> >
> > Peter Alefounder.
> >
> > --
> > Please post to: Hampshire@???
> > Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> > LUG URL: http://www.hantslug.org.uk
> > --------------------------------------------------------------
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>

--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------