The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
In this example, there are 586 free physical extents.<br />
Creating a single logical volume<br />
<strong>The</strong> lvcreate command is used to create a logical volume. <strong>The</strong> -l flag specifies to use all<br />
free extents, 586 in this example. <strong>The</strong> -n homelv specifies the name of the new logical<br />
volume. <strong>The</strong> last argument homevg specifies the name of the volume group from which the<br />
logical volume will be created.<br />
# lvcreate -l 586 -n homelv homevg<br />
Logical volume "homelv" created<br />
Use the lvdisplay command to verify. <strong>The</strong> parameter is the full path of the logical volume,<br />
not just the logical volume name:<br />
# lvdisplay /dev/homevg/homelv<br />
--- Logical volume ---<br />
LV Name /dev/homevg/homelv<br />
VG Name homevg<br />
LV UUID BvXj0n-vA8D-yMY0-Ydex-bF2y-Gfeg-1pyr4O<br />
LV Write Access read/write<br />
LV Status available<br />
# open 0<br />
LV Size 2.29 GiB<br />
Current LE 586<br />
Segments 2<br />
Allocation inherit<br />
Read ahead sectors auto<br />
- currently set to <strong>10</strong>24<br />
Block device 253:4<br />
Making a file system from the logical volume<br />
Now you have a logical volume. Create an ext4 file system out of it using the mkfs.ext4<br />
command:<br />
# mkfs.ext4 /dev/homevg/homelv<br />
mke2fs 1.41.12 (17-May-20<strong>10</strong>)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
Stride=1 blocks, Stripe width=0 blocks<br />
150176 inodes, 600064 blocks<br />
30003 blocks (5.00%) reserved <strong>for</strong> the super user<br />
First data block=0<br />
Maximum filesystem blocks=616562688<br />
19 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
7904 inodes per group<br />
Superblock backups stored on blocks:<br />
32768, 98304, 163840, 229376, 294912<br />
Writing inode tables: done<br />
Creating journal (16384 blocks): done<br />
Writing superblocks and filesystem accounting in<strong>for</strong>mation: done<br />
This filesystem will be automatically checked every 25 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
<strong>The</strong> file system created from the logical volume is now ready to be mounted.<br />
196 <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6