Our fileserver needed some room for VMWare images. So I needed to add an LVM volume. Martijn came to the rescue and because there was a lot of free space on the server we only needed to add a volume and didn't need to resize another volume.
lvdisplay
nuil@xenon:~$ sudo lvdisplay
--- Logical volume ---
LV Name /dev/xenon/boot
VG Name xenon
LV UUID 0OMrgo-F6C1-JfKq-yH9d-8zi2-z3jz-6A8ErA
LV Write Access read/write
LV Status available
# open 1
LV Size 100.00 MB
Current LE 25
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:0
[---SNIP----]
pvdisplay
nuil@xenon:~$ sudo pvdisplay
--- Physical volume ---
PV Name /dev/sda5
VG Name xenon
PV Size 696.51 GB / not usable 1.65 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 178305
Free PE 113768
Allocated PE 64537
PV UUID p3Ofku-028q-g0ut-w1Ll-gXlF-Sn9c-9pTws9
lvcreate --name images --size 100G xenon
nuil@xenon:~$ sudo lvcreate --name images --size 100G xenon
Logical volume "images" created
mkfs.ext3 /dev/mapper/xenon-images
nuil@xenon:~$ sudo mkfs.ext3 /dev/mapper/xenon-images
mke2fs 1.40.2 (12-Jul-2007)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
13107200 inodes, 26214400 blocks
1310720 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
800 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
vi /etc/fstab
nuil@xenon:~$ sudo vi /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/mapper/xenon-root
UUID=9c2e4925-a941-4769-ad2d-80d8d54f3906 / ext3 defaults,errors=remount-ro 0 1
# /dev/mapper/xenon-boot
UUID=1ed62d16-6dfd-4a78-bacb-1746f84e0e15 /boot ext3 defaults 0 2
# /dev/mapper/xenon-klanten
UUID=73843cd4-c121-4fa7-8128-911b8ee54d76 /media/lvm/klanten ext3 defaults 0 2
# /dev/mapper/xenon-svn
UUID=b1d57aaa-411c-4350-83d3-39cfa1af3b41 /media/lvm/svn ext3 defaults 0 2
# /dev/sda1
UUID=07D8-0109 /media/sda1 vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/mapper/xenon-swap
UUID=a38f32cf-e8ef-4b98-8a7c-1f0c9e515e44 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/mapper/xenon-images /media/lvm/images ext3 defaults 0 2

Comments