tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2012/07/16 17:38] – ccumer | tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs [2014/10/08 17:36] – kohofer | ||
---|---|---|---|
Line 4: | Line 4: | ||
Expand the original disk or add a second vdisk from **Infrastructure Client**.\\ | Expand the original disk or add a second vdisk from **Infrastructure Client**.\\ | ||
- | If you want to perform a grow w/o reboot you have to add a second disk. | + | <del>If you want to perform a grow w/o reboot you have to add a second disk.</ |
If you are on a kernel newer or equal to 2.6.32 then you can issue the command | If you are on a kernel newer or equal to 2.6.32 then you can issue the command | ||
Line 14: | Line 14: | ||
In case you cant see the " | In case you cant see the " | ||
+ | |||
+ | echo "- - -" > / | ||
+ | | ||
+ | Do this for all host0,1,2 etc. | ||
+ | |||
+ | |||
+ | or | ||
echo " | echo " | ||
whereby after scsi_device you need to find the correct scsi device | whereby after scsi_device you need to find the correct scsi device | ||
+ | |||
+ | |||
**EXPAND ORIGINAL DISK** | **EXPAND ORIGINAL DISK** | ||
Line 28: | Line 37: | ||
# for example if the new partition is /dev/sda3 | # for example if the new partition is /dev/sda3 | ||
- | # create logical disk /dev/sda3 | + | # create logical disk / |
# make disk visible to linux | # make disk visible to linux | ||
Line 126: | Line 135: | ||
lvextend -l +100%FREE / | lvextend -l +100%FREE / | ||
- | Check that the filesystem is ok | + | Check that the filesystem is ok, **but only if the FS is unmounted** |
fsck.ext4 -f /dev/base | fsck.ext4 -f /dev/base | ||
Line 132: | Line 141: | ||
Now resize the filesystem | Now resize the filesystem | ||
- | resize2fs -p / | + | resize2fs -p / |
+ | | ||
===== For swap ===== | ===== For swap ===== | ||
Line 168: | Line 177: | ||
Hier legen wir jetzt alle unsere logischen Volumes an. Als Namen verwenden wir, etwas fantasielos, | Hier legen wir jetzt alle unsere logischen Volumes an. Als Namen verwenden wir, etwas fantasielos, | ||
- | | + | lvcreate -l +100%FREE -n lvol1 vg01 |
+ | |||
+ | oder wir könne die Größen angeben! (1500M) | ||
+ | |||
+ | lvcreate -L 1500M -n lvol1 vg01 | ||
Filesysteme anlegen | Filesysteme anlegen | ||
Line 180: | Line 193: | ||
Damit die neuen Filesysteme nun bei jedem Systemstart automatisch gemountet werden, müssen wir sie in die Datei /etc/fstab eintragen (siehe 'man fstab' | Damit die neuen Filesysteme nun bei jedem Systemstart automatisch gemountet werden, müssen wir sie in die Datei /etc/fstab eintragen (siehe 'man fstab' | ||
- | / | + | / |
+ | |||
+ | ===== Links ===== | ||
- | http://www.linuxhaven.de/dlhp/HOWTO-test/DE-LVM-HOWTO-2.html | + | [[http://www.thegeekstuff.com/2010/08/how-to-create-lvm/|How To Create LVM Using vgcreate, lvcreate, and lvextend lvm2 Commands]]\\ |
+ | [[https:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | [[http:// | ||
+ | http:// | ||
+ | http:// |
/data/www/wiki.inf.unibz.it/data/pages/tech/documentation/procedures/vm/vm_disk_expansion_lvm_xfs.txt · Last modified: 2020/10/13 16:46 by kohofer