Since I already have LV configured, how can I add more disk to root? I'd really like to keep everything within the disk without formatting

df -h
Filesystem                      Size  Used Avail Use% Mounted on
udev                             60G  4.0K   60G   1% /dev
tmpfs                            12G  1.3M   12G   1% /run
/dev/sda1                       4.2G  4.0G     0 100% /
none                            4.0K     0  4.0K   0% /sys/fs/cgroup
none                            5.0M     0  5.0M   0% /run/lock
none                             60G   88K   60G   1% /run/shm
none                            100M   24K  100M   1% /run/user
overflow                        1.0M   84K  940K   9% /tmp
/dev/sda6                        11G  101M   11G   1% /home
/dev/mapper/so_data-lv_so_data  3.0T  2.1T  739G  75% /nsm

NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                           8:0    0    30G  0 disk 
├─sda1                        8:1    0   4.3G  0 part / 
├─sda2                        8:2    0     1K  0 part 
├─sda5                        8:5    0   555M  0 part [SWAP]
└─sda6                        8:6    0  11.1G  0 part /home
sdb                           8:16   0     3T  0 disk 
└─so_data-lv_so_data (dm-0) 252:0    0     3T  0 lvm  /nsm
sr0                          11:0    1  1024M  0 rom

sudo lvdisplay 
--- Logical volume ---
LV Path                /dev/so_data/lv_so_data
LV Name                lv_so_data
VG Name                so_data
LV UUID                rVjGS2-z1IV-1zxJ-dWZ9-BJ9C-eyiu-lkhe9i
LV Write Access        read/write
LV Creation host, time O11-PL-ONIAP01, 2018-04-04 14:14:54 +0000
LV Status              available
# open                 1
LV Size                3.00 TiB
Current LE             786431
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           252:0

sudo vgdisplay 
--- Volume group ---
VG Name               so_data
System ID             
Format                lvm2
Metadata Areas        1
Metadata Sequence No  2
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                1
Open LV               1
Max PV                0
Cur PV                1
Act PV                1
VG Size               3.00 TiB
PE Size               4.00 MiB
Total PE              786431
Alloc PE / Size       786431 / 3.00 TiB
Free  PE / Size       0 / 0   
VG UUID               1LoFln-1c6n-3u57-6Upy-Ckf2-rso9-l6iOB4

sudo pvdisplay 
--- Physical volume ---
PV Name               /dev/sdb
VG Name               so_data
PV Size               3.00 TiB / not usable 4.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              786431
Free PE               0
Allocated PE          786431
PV UUID               2nKfAn-tb1e-tqDw-68nw-08e3-LuiQ-2rUwHC
  • 3
    Could you display the output of lsblk? Please also include the output of pvs, vgs, and lvs to give everyone a better idea. You will most likely need to add space to the Physical Volume to be able to extend the Logical volume for the rootfs. If there is no more Physical disk space to work with you will have to shrink an existing volume or add another disk. – kemotep Jun 1 '18 at 20:46
  • This is a good starting point. Please update your post with the issues you are having. – kemotep Jun 1 '18 at 20:49
  • 2
    / is not on LVM, so it is going to be painful. Apart from that, where are you going to find the extra space? Add a new disk? Extend the disk image, if it's a virtual machine? Take space away from /home or /nsm? – Gilles 'SO- stop being evil' Jun 1 '18 at 23:33
  • @Gilles that was my very first thought when I saw this. My kneejerk was to move the mountpoint on the one lvm partition or split it to swallow another folder. – RobotHumans Jun 1 '18 at 23:34
  • 1
    @kemotep I added the info. – WeAreOne Jun 4 '18 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.