ubuntuusers.de

Tester gesucht!
Aktuell sind noch immer mehr als 300 Wiki-Artikel nur für Ubuntu 14.04 "Trusty Tahr" getestet. Artikel, die für keine aktuelle Version getestet sind, werden demnächst archiviert. Das Wikiteam freut sich über Deine Hilfe und steht Dir bei Fragen gerne zur Verfügung.

Titel:
lvm_reduce_part_2
Autor:
fleet_street
Datum:
17. November 2019 14:28
Aktionen:
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ubuntu-mate@ubuntu-mate:~$ # …
ubuntu-mate@ubuntu-mate:~$ # wer lesen kann … ;)  swap entfernen
ubuntu-mate@ubuntu-mate:~$ # …
ubuntu-mate@ubuntu-mate:~$ sudo swapoff -a
ubuntu-mate@ubuntu-mate:~$ sudo lvremove ubuntu-mate-vg/swap_1
Do you really want to remove and DISCARD active logical volume ubuntu-mate-vg/swap_1? [y/n]: y
  Logical volume "swap_1" successfully removed
ubuntu-mate@ubuntu-mate:~$ sudo lvscan
  ACTIVE            '/dev/ubuntu-mate-vg/root' [15.00 GiB] inherit
ubuntu-mate@ubuntu-mate:~$ sudo pvresize -v --setphysicalvolumesize 16G /dev/sda1
    Wiping internal VG cache
    Wiping cache of LVM-capable devices
    Archiving volume group "ubuntu-mate-vg" metadata (seqno 7).
/dev/sda1: Requested size 16.00 GiB is less than real size 28.87 GiB. Proceed?  [y/n]: y
    Accepted input: [y]
  WARNING: /dev/sda1: Pretending size is 33554432 not 60551168 sectors.
    Resizing volume "/dev/sda1" to 33554432 sectors.
    Resizing physical volume /dev/sda1 from 7391 to 4095 extents.
    Updating physical volume "/dev/sda1"
    Creating volume group backup "/etc/lvm/backup/ubuntu-mate-vg" (seqno 8).
  Physical volume "/dev/sda1" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized
ubuntu-mate@ubuntu-mate:~$ # …
ubuntu-mate@ubuntu-mate:~$ # parted (interaktiv)
ubuntu-mate@ubuntu-mate:~$ # …
ubuntu-mate@ubuntu-mate:~$ sudo parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: Verbatim STORE N GO (scsi)
Disk /dev/sda: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  31.0GB  31.0GB  primary               boot, lvm

(parted) resizepart 1 16G                                                 
Warning: Shrinking a partition can cause data loss, are you sure you want to continue?
Yes/No? y                                                                 
(parted) print                                                            
Model: Verbatim STORE N GO (scsi)
Disk /dev/sda: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  16.0GB  16.0GB  primary               boot, lvm

(parted) quit                                                             
Information: You may need to update /etc/fstab.

ubuntu-mate@ubuntu-mate:~$