Eu estou tentando reduzir o espaço dedicado ao root LVM, já que eu realmente não preciso disso e estou tendo algumas dúvidas. Abaixo está a saída para lvdisplay
:
# lvdisplay
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/root
LV Name root
VG Name pc_rperez_lvm
LV UUID m7XejM-82cZ-hODn-nT8H-y2BM-3B4s-lq2xgn
LV Write Access read/write
LV Status available
# open 1
LV Size 72.37 GiB
Current LE 18527
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/home
LV Name home
VG Name pc_rperez_lvm
LV UUID Ehl9tF-XV30-uF4Y-T1Bc-WB8r-Pfim-ONQFn3
LV Write Access read/write
LV Status available
# open 1
LV Size 25.00 GiB
Current LE 6400
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/swap
LV Name swap
VG Name pc_rperez_lvm
LV UUID pJuBnV-fhD1-NgOe-xMUc-gck8-CfeM-YkQHAX
LV Write Access read/write
LV Status available
# open 2
LV Size 8.00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
O que eu quero alcançar é reduzir root
para 25gb e adicionar o espaço livre a home
. Eu li um monte de posts, mas nenhum deles menciona como conseguir isso em uma partição raiz com a partição montada. Então, com essa informação, é possível reduzir o espaço com a partição montada? Se sim como? Se não o que você me recomendaria? Eu estou usando o Fedora 23
O que eu sinto falta?
EDIT: sistema de arquivos:
Conforme solicitado, este é o sistema de arquivos usado:
# cat /etc/fsatb
/dev/mapper/pc_rperez_lvm-root / ext4
/dev/mapper/pc_rperez_lvm-home /home ext4
/dev/mapper/pc_rperez_lvm-swap swap swap
Nota: Eu li sobre alguns Live CD para gerenciar partição LVM (como GParted), mas até agora eu não encontrei nenhum, se você souber algum adicionar à sua resposta!
Artigos lidos: 1 , 2 , 3 , 4 e muitos outros
EDIT: Não pode crescer o outro LVM
Eu executei o comando para reduzir o pc_lvm_root
e estava tudo bem, conforme mostrado abaixo:
$ sudo ssm resize -s 50G /dev/mapper/pc_rperez_lvm-root
fsck from util-linux 2.28
/dev/mapper/pc_rperez_lvm-root: 425214/4743168 files (0.2% non-contiguous), 9042371/18971648 blocks
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/mapper/pc_rperez_lvm-root to 13107200 (4k) blocks.
The filesystem on /dev/mapper/pc_rperez_lvm-root is now 13107200 (4k) blocks long.
Size of logical volume pc_rperez_lvm/root changed from 72.37 GiB (18527 extents) to 50.00 GiB (12800 extents).
Logical volume root successfully resized.
Agora, quero adicionar esses 50G ao pc_rperez_lvm-home
, mas não consigo ver a saída abaixo:
$ sudo ssm resize -s+50G /dev/mapper/pc_rperez_lvm-home
SSM Error (2005): There is not enough space in the pool 'pc_rperez_lvm' to grow volume '/dev/mapper/pc_rperez_lvm-home' to size 78538342.4 KB!
EDIT: ainda não pode crescer o LVM
Infelizmente eu não posso crescer a casa LVM ainda, abaixo é o que eu fiz seguindo as sugestões da resposta:
$ sudo ssm resize /dev/mapper/pc_rperez_lvm-home
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/pc_rperez_lvm-home: 34602/1638400 files (3.0% non-contiguous), 2213886/6553600 blocks
resize2fs 1.42.13 (17-May-2015)
Please run 'e2fsck -f /dev/mapper/pc_rperez_lvm-home' first.
SSM Error (2012): ERROR running command: "resize2fs /dev/mapper/pc_rperez_lvm-home"
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 260K 3.9G 1% /dev/shm
tmpfs 3.9G 1.4M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sdb1 15G 1.6G 13G 11% /run/initramfs/live
/dev/mapper/live-rw 6.3G 4.2G 2.2G 66% /
tmpfs 3.9G 20K 3.9G 1% /tmp
vartmp 3.9G 63M 3.9G 2% /var/tmp
tmpfs 798M 24K 798M 1% /run/user/1000
$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/root
LV Name root
VG Name pc_rperez_lvm
LV UUID m7XejM-82cZ-hODn-nT8H-y2BM-3B4s-lq2xgn
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/home
LV Name home
VG Name pc_rperez_lvm
LV UUID Ehl9tF-XV30-uF4Y-T1Bc-WB8r-Pfim-ONQFn3
LV Write Access read/write
LV Status available
# open 0
LV Size 25.00 GiB
Current LE 6400
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/pc_rperez_lvm/swap
LV Name swap
VG Name pc_rperez_lvm
LV UUID pJuBnV-fhD1-NgOe-xMUc-gck8-CfeM-YkQHAX
LV Write Access read/write
LV Status available
# open 2
LV Size 8.00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
$ sudo e2fsck -f /dev/mapper/pc_rperez_lvm-home
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/pc_rperez_lvm-home: 34602/1638400 files (3.0% non-contiguous), 2213886/6553600 blocks
Idéias neste momento?
EDIT: informações necessárias
$ sudo vgdisplay
--- Volume group ---
VG Name pc_rperez_lvm
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 105.38 GiB
PE Size 4.00 MiB
Total PE 26976
Alloc PE / Size 21248 / 83.00 GiB
Free PE / Size 5728 / 22.38 GiB
VG UUID Gi0r0L-gRJe-Tzwz-QQE0-CLOY-ofb2-Hk5YCe
$ sudo dumpe2fs -h /dev/mapper/pc_rperez_lvm-home
dumpe2fs 1.42.13 (17-May-2015)
Filesystem volume name: <none>
Last mounted on: /home
Filesystem UUID: eb319b45-03f2-49d3-b849-6e1ff4b19046
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 1638400
Block count: 6553600
Reserved block count: 327680
Free blocks: 4358401
Free inodes: 1607559
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1022
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Fri Mar 18 13:16:13 2016
Last mount time: Thu Jul 7 08:06:05 2016
Last write time: Thu Jul 7 13:21:17 2016
Mount count: 1
Maximum mount count: -1
Last checked: Thu Jul 7 07:56:48 2016
Check interval: 0 (<none>)
Lifetime writes: 714 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: a4d5967b-3ad8-4d22-833d-a6126de8ee41
Journal backup: inode blocks
Journal features: journal_incompat_revoke
Journal size: 128M
Journal length: 32768
Journal sequence: 0x002cb467
Journal start: 0