Tag Archives: LVM

Home »  Tag: LVM

If you just added a new Disk to a Linux Box (for example under VMware) you may want to add that one to a LVM to a new Volume Group. Here are the steps quick and easy with a bit of commenting. You have not yet added the new disk and want to do this hot. Then I refer to this here. How to add a new disk without reboot fdisk -l #to show us the available disks We assume our new disk is /dev/sdb and we will not create a partition on it but use /dev/sdb as it is. This gives us the advantage that if we increase the disksize outside of the OS (for example a vmdk which we just increase or a SAN lun which we just increase in size) we can easily increase the volume under lvm. pvcreate /dev/sdb Writing physical volume data to disk “/dev/sdb” […]

Particularly under VMware you may just add a new disk to linux without the need to reboot the whole thingy. So after adding the new disk as root on the OS: echo “- – -” > /sys/class/scsi_host/host#/scan where host# is the bus address usually 0 example echo “- – -” > /sys/class/scsi_host/host0/scan fdisk -l will show you the new disk as unpartioned while you would expect to see a message in the messages log tail -f /var/log/message and thats it, you now have a new disk which you can partition and add to LVM or whatever you want with it. Related posts: Linux / VMware: Howto Increase a / (Root) LVM partition on a single vmdk without adding another partition Linux: Howto show the Servers IP address at the login console Centos / Debian / LVM: Add a new disk as a LVM volume Linux / RedHat /CentOS / Ubuntu […]

Howto Increase a / (Root) LVM partition on a single vmdk without adding another partition (For example under VMware Workstation)   Increase Vmware partition and LVM Resize your vmdk under VMWare as you would do it usually. Once you’ve resized the vmdk I advise to take a snapshot while everything is still fine. That way if you completely screw your VM’s partition table you have a back-out Run # df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/vg_sat01-lv_root                        16G  3.9G   11G  27% / tmpfs                 935M     0  935M   0% /dev/shm /dev/sda1             485M   37M  423M   8% /boot It will all look a bit like this run # /sbin/fdisk -u -l /dev/sda Disk /dev/sda: 96.6 GB, 96636764160 bytes 255 heads, 63 sectors/track, 11748 cylinders, total 188743680 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 […]

%d bloggers like this: