M
M
m0zal2017-05-11 00:02:48
Debian
m0zal, 2017-05-11 00:02:48

LVM Debian 8 How to move the user/home/ folder?

Haven't used linux for a long time, installed
uname -a
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
Installed on new ssd 120Gb, with LVM,
vgs
VG # PV #LV #SN Attr VSize VFree
debian-vg 1 5 0 wz--n- 111.55g 0
pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 debian-vg lvm2 a-- 111.55g 0
lvscan
ACTIVE '/dev/debian-vg/root' [8.38 GiB] inherit
ACTIVE '/dev/debian-vg/swap_1' [13.37 GiB] inherit
ACTIVE '/dev/debian-vg/tmp' [5.04 GiB] inherit
ACTIVE '/dev/debian-vg/var' [8.38 GiB] inherit
ACTIVE '/dev/debian-vg/home' [76.37 GiB] inherit
And everything was clear until the system said about a small place. I look and in truth the size is only 8GB
df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs
Filesystem Type Size Used Avail Use% Mounted on
/dev/dm-0 ext4 8.2G 7.0G 730M 91% /
/dev/sda1 ext2 236M 41M 183M 19% /boot
and what to do?
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root 9 May 10 21:32 ata-KINGSTON_SHFS37A120G_50026B726401FEF0 -> ../../sda
lrwxrwxrwx 1 root root 10 May 10 21:32 ata-KINGSTON_SHFS17F020G_ -> ../../sda1
lrwxrwxrwx 1 root root 10 May 10 21:32 ata-KINGSTON_SHFS37A120G_50026B726401FEF0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 10 21:32 ata-KINGSTON_SHFS37A120G_50026B726401FEF0-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-name-debian--vg-home -> ../. ./dm-4
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-name-debian--vg-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-name- debian--vg-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-name-debian--vg-tmp -> ../../dm-2
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-name-debian--vg-var -> ../../dm-3
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-uuid-LVM-Gv7Pasdasdasdasdasdasdasdasdasdasd4kwLP -> .. /../dm-2
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-uuid-LVM-Gv7PzHFqOWfjUPnl5Joeasdasdd1fLlupGA -> ../../dm-3
1 lrwxrwxrwx root root 10 May 10 dm-uuid 21:18-LVM-Gv7PzHFjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjhLF2vz -> ../../dm-1
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-uuid-LVM-Gv7PzHFasdasdasdasdasasxJ1d0atAfwk5zk -> ../ ../dm-4
lrwxrwxrwx 1 root root 10 May 10 21:18 dm-uuid-LVM-Gv7UPnl5aaaaaaaaaaaaaaaqt1611asdB8Y -> ../../dm-0
lrwxrwxrwx 1 root root 10 May 10 21:32 xasddS-7rxS-SUasddasdB-PmkB-PlI3-mKViox -> ../../sda5
lrwxrwxrwx 1 root root 9 May 10 21:32 wwn-0x50026b726401fef0 -> ../../sda
lrwxrwxrwx 1 root root 10 May 10 21 :32 wwn-0x50026b726401fef0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 10 21:32 wwn-0x50026b726401fef0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 10 21:3 wwn-0x50026b726401fef0-part5 -> ../../sda5
/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 May 10 21:32 47688870-ad1d-4afd-9260-bffeasddasdasdeabe -> ../../sda1
lrwxrwxrwx 1 root root 10 May 10 21:18 8cfd04c3 -85e2-46e3-a68e-9aasddaasdasda5405 -> ../../dm-0
lrwxrwxrwx 1 root root 10 May 10 21:18 ffdaf808-8ca4-401f-9fbd-8asdasdadsaasddaasdef -> ../../dm-1
I not so advanced user. Tell me what to do? How can I use the entire volume and not the miserable 8GB?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-05-11
@Tabletko

you have 8GB allocated for the root partition "/". Since you are using lvm, it is quite easy to resize partitions - reduce one lv, increase the other due to the freed up space.
The order is:
0. Reduce the fs on the logical volume
1. Check the integrity of the fs
2. Reduce the logical volume
3. Expand the target logical volume
4. Expand the target fs
5. Check the integrity of the target fs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question