LVM Anlegen unter Linux

Hallo,

hier hatte ich mal gezeigt wie ein LVM vergrößert werden kann.

http://konkretor.blog.de/2013/06/21/lvm-vmware-speichervergroessern-16151980

Heute will ich zeigen wie ein LVM überhaupt angelegt werden kann.

Tools die man dazu braucht

pvdisplay
vgdisplay

$ lvmdiskscan
/dev/ram0 [ 16.00 MiB]
/dev/VolGroup02/LV_data [ 150.00 GiB]
/dev/ram1 [ 16.00 MiB]
/dev/ram2 [ 16.00 MiB]
/dev/sda2 [ 8.80 GiB]
/dev/ram3 [ 16.00 MiB]
/dev/sda3 [ 6.00 GiB]
/dev/ram4 [ 16.00 MiB]
/dev/ram5 [ 16.00 MiB]
/dev/ram6 [ 16.00 MiB]
/dev/ram7 [ 16.00 MiB]
/dev/ram8 [ 16.00 MiB]
/dev/ram9 [ 16.00 MiB]
/dev/ram10 [ 16.00 MiB]
/dev/ram11 [ 16.00 MiB]
/dev/ram12 [ 16.00 MiB]
/dev/ram13 [ 16.00 MiB]
/dev/ram14 [ 16.00 MiB]
/dev/ram15 [ 16.00 MiB]
/dev/sdd1 [ 5.00 GiB]
/dev/sde1 [ 150.00 GiB] LVM physical volume
/dev/sdf [ 25.00 GiB] LVM physical volume
/dev/sdg [ 25.00 GiB]
0 disks
0 partitions
3 LVM physical volume whole disk
3 LVM physical volumes

pvcreate /dev/sdg
Physical volume “/dev/sdg” successfully created

vgcreate VolumeGroup01 /dev/sdg
Volume group “VolumeGroup01” successfully created

vcreate -n backup -l+100%FREE VolumeGroup01
Logical volume “backup” created

mkfs.ext4 /dev/VolumeGroup01/backup
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1638400 inodes, 6552576 blocks
327628 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
200 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

mkdir backup

mount /dev/VolumeGroup01/backup backup

Danach noch in /etc/fstab

den Mountpoint noch eintragen

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s