LVM

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

LVM

perat
Приветствую, уважаемое сообщество!

Помогите, пожалуйста, разобратьса с LVM.

Сейчас переразмечал диски и в итоге получилось, что куда-то потерялось место.

$ sudo vgdisplay
  --- Volume group ---
  VG Name               fedora_localhost
  System ID            
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  10
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               223.07 GiB
  PE Size               4.00 MiB
  Total PE              57105
  Alloc PE / Size       31887 / 124.56 GiB
  Free  PE / Size       25218 / 98.51 GiB
  VG UUID               37QhMY-1wNF-5RQH-XcpW-nyGN-k7YY-fSWWLQ


$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora_localhost/swap
  LV Name                swap
  VG Name                fedora_localhost
  LV UUID                ruo9s5-wAdo-hJVY-kvpP-Dg0C-iFqN-uc7Hac
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-08-17 04:03:56 +0400
  LV Status              available
  # open                 2
  LV Size                7.64 GiB
  Current LE             1956
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/fedora_localhost/root
  LV Name                root
  VG Name                fedora_localhost
  LV UUID                yme4FY-9Srp-pxwx-zO0A-1fi9-lZCW-iWtejo
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-08-17 04:03:56 +0400
  LV Status              available
  # open                 1
  LV Size                116.92 GiB
  Current LE             29931
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1


Как бы мне корневой раздел растянуть на оставшееся место?
Пробовал делать:
$ sudo lvresize -l 100%FREE /dev/fedora_localhost/root
  Extending logical volume root to 116.92 GiB
  Logical volume root successfully resized

$ sudo resize2fs /dev/mapper/fedora_localhost-root
resize2fs 1.42.7 (21-Jan-2013)
Filesystem at /dev/mapper/fedora_localhost-root is mounted on /; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 8
The filesystem on /dev/mapper/fedora_localhost-root is now 30649344 blocks long.

$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/fedora_localhost-root  115G   81G   30G  74% /
devtmpfs                           3.8G     0  3.8G   0% /dev
tmpfs                              3.8G  3.6M  3.8G   1% /dev/shm
tmpfs                              3.8G  1.2M  3.8G   1% /run
tmpfs                              3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs                              3.8G  328K  3.8G   1% /tmp
/dev/sda6                          477M  118M  330M  27% /boot


--
With best regards,
Taras.

--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru
Reply | Threaded
Open this post in threaded view
|

Re: LVM

Алексей Смирнов-2
М.б. так?
$ sudo lvresize -r -l 100%FREE /dev/fedora_localhost/root

-r для расширения ФС.
--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru
Reply | Threaded
Open this post in threaded view
|

Re: LVM

perat
-r требует отмонтирования раздела, я не хочу перезагружаться ради этого.
То же дейсвие, только в онлайн может делать:
$ sudo resize2fs /dev/fedora_localhost/root
resize2fs 1.42.7 (21-Jan-2013)
The filesystem is already 30649344 blocks long.  Nothing to do!

Но похоже именно размер тома LVM не находит места в VG.


On Sun, Aug 25, 2013 at 5:15 PM, Алексей Смирнов <[hidden email]> wrote:
М.б. так?
$ sudo lvresize -r -l 100%FREE /dev/fedora_localhost/root

-r для расширения ФС.
--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru



--
With best regards,
Taras.

--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru
Reply | Threaded
Open this post in threaded view
|

Re: LVM

Алексей Смирнов-2
In reply to this post by perat

Эврика!

Надо было использовать '+'

$ sudo lvresize -l +100%FREE ...


--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru
Reply | Threaded
Open this post in threaded view
|

Re: LVM

perat
Спасибо! Слона то я и незаметил) А не заметил потому, что до этого и без плюса оно понимало чего я хочу)

$ sudo lvresize -r -l +100%FREE /dev/fedora_localhost/root
  Extending logical volume root to 215.43 GiB
  Logical volume root successfully resized
resize2fs 1.42.7 (21-Jan-2013)
Filesystem at /dev/mapper/fedora_localhost-root is mounted on /; on-line resizing required
old_desc_blocks = 8, new_desc_blocks = 14
The filesystem on /dev/mapper/fedora_localhost-root is now 56472576 blocks long.

$ sudo resize2fs /dev/fedora_localhost/root
resize2fs 1.42.7 (21-Jan-2013)
The filesystem is already 56472576 blocks long.  Nothing to do!

$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/fedora_localhost-root  212G   81G  123G  40% /
devtmpfs                           3.8G     0  3.8G   0% /dev
tmpfs                              3.8G  7.4M  3.8G   1% /dev/shm
tmpfs                              3.8G  1.2M  3.8G   1% /run
tmpfs                              3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs                              3.8G  2.3M  3.8G   1% /tmp
/dev/sda6                          477M  118M  330M  27% /boot




2013/8/25 Алексей Смирнов <[hidden email]>

Эврика!

Надо было использовать '+'

$ sudo lvresize -l +100%FREE ...


--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru




--
With best regards,
Taras.

--
ubuntu-ru mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-ru