You are here

Volume Online increase


 

 

-- Volume wird angelegt.

 

# more /proc/partitions

major minor #blocks name
8 0 6291456 sda
8 1 104391 sda1
8 2 6185025 sda2
8 16 2097152 sdb
8 17 803218 sdb1
253 0 4947968 dm-0
253 1 1212416 dm-1

  

# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created

# vgcreate testvg /dev/sdb1
Volume group "testvg" successfully created

 

# lvcreate -L 100M -n testvol testvg mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
25688 inodes, 102400 blocks
5120 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1976 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

# mount -t ext3 /dev/sdb1 /testvol/

 

 

-- Volume wird online vergrößert.

# pvscan PV /dev/sdb1 VG testvg lvm2 [784.00 MB / 684.00 MB free]
PV /dev/sda2 VG VolGroup00 lvm2 [5.88 GB / 0 free]
Total: 2 [6.64 GB] / in use: 2 [6.64 GB] / in no VG: 0 [0 ]

  

 

# lvextend -L +100 /dev/testvg/testvol
Extending logical volume testvol to 200.00 MB
Logical volume testvol successfully resized

 

# pvscan PV /dev/sdb1 VG testvg lvm2 [784.00 MB / 584.00 MB free]
PV /dev/sda2 VG VolGroup00 lvm2 [5.88 GB / 0 free]
Total: 2 [6.64 GB] / in use: 2 [6.64 GB] / in no VG: 0 [0 ]

 

 

 

-- Filesystem wird vergrößert.

 

# df -k |grep testvol
/dev/mapper/testvg-testvol 99150 5724 88306 7% /testvol

 # resize2fs -p /dev/testvg/testvol
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/testvg/testvol is mounted on /testvol;
on-line resizing required
Performing an on-line resize of /dev/testvg/testvol to 204800 (1k) blocks.
The filesystem on /dev/testvg/testvol is now 204800 blocks long.

 

   

# df -k |grep testvol
/dev/mapper/testvg-testvol 198562 5732 182802 4% /testvol