Nick: stefanct E-mail: none Board: resize disk Contents: # Scan for disk size changes (verified by dmesg) $ echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan # change MBR partition table... # get number of current sectors $ fdisk -l /dev/sda | head -n1 Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors # get txt representation of current partition table $ sfdisk -d /dev/sda > partitions.txt # edit partitions.txt, e.g., extend sda2 and sda5 from 100663296 sectors $ nano partitions.txt # from this table: # /dev/sda1 : start= 2048, size= 497664, type=83, bootable # /dev/sda2 : start= 501758, size= 100161538, type=5 # /dev/sda5 : start= 501760, size= 100161536, type=8e # to match 134217728 overall sectors: # 134217728 - 501758 = 133715970 # /dev/sda1 : start= 2048, size= 497664, type=83, bootable # /dev/sda2 : start= 501758, size= 133715970, type=5 # /dev/sda5 : start= 501760, size= 133715968, type=8e # write it back $ sfdisk /dev/sda < partitions.txt --no-reread # make kernel aware $ partprobe /dev/sda # resize physical LVM volume $ pvresize /dev/sda5 Physical volume "/dev/sda5" changed 1 physical volume(s) resized / 0 physical volume(s) not resized # resize logical LVM volume $ lvresize /dev/dm-0 -l +100%FREE Size of logical volume dm-0 changed from 46.76 GiB (11971 extents) to 62.76 GiB (16067 extents). Logical volume root successfully resized # resize fs $ resize2fs /dev/dm-0 resize2fs 1.42.12 (29-Aug-2014) Filesystem at /dev/dm-0 is mounted on /; on-line resizing required old_desc_blocks = 3, new_desc_blocks = 4 The filesystem on /dev/dm-0 is now 16452608 (4k) blocks long.