0

I have an LVM partition in use already so i am good. lvdisplay

  --- Logical volume ---
  LV Name                /dev/unclebob-vg0/unclebob-swap
  VG Name                unclebob-vg0
  LV UUID                BZgkTD-srBf-5wx7-5gO3-ikKt-5zz5-o2Lj1z
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                952.00 MB
  Current LE             238
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/unclebob-vg0/unclebob-root
  VG Name                unclebob-vg0
  LV UUID                qSxZQX-xyOK-9pHt-FMhk-9LNP-Hvgc-B7DXZY
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.86 GB
  Current LE             476
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

How to i go about using these lvm's? I don't understand how use my partitions. I want to install Media wiki on the Logical volume root. My actual root is full, so i am relying on installing things on the lvm partition. thanks

2 Answers2

1

You just need to mount the partition. I'm guessing that unclebob-swap is swap space so I'm going to ignore it. If you already have your system up and running, check it's not already mounted with: cat /proc/mounts and ensure /dev/unclebob-vg0/unclebob-root isn't listed in there. (I'm guessing it is, and is mounted as the root partition).

If it's not, do the following to mount it to /media/unclebob-root:
mkdir /media/unclebob-root
mount /dev/unclebob-vg0/unclebob-root /media/unclebob-root

You will be able to view it inside that directory. To make changes permanent view your /etc/fstab file.

James L
  • 6,025
  • 1
  • 22
  • 26
  • Yeah. Don't do this if /dev/unclebob-vg0/unclebob-root really is your root filesystem. Try not to mess with that. – Allen Nov 09 '10 at 19:21
1

If you are wanting to experiment and haven't done so in the past then the logical volumes in your system are probably not to be messed with since your system is using the existing ones.

So start from scratch.

  1. Create a new logical volume: 'lvcreate' (The newly created lv is treated like a partition or a disk back in the old days.)
  2. Create a filesystem to taste on the lv: 'mkfs.ext4, mkfs.*, etc'
  3. mount the lv somewhere: 'mount'

Later you can increase the size or delete it or a whole bunch of things. Look in the LVM Howto.

Allen
  • 1,315
  • 7
  • 12