How do we change the dimensions of the sections (mapped) in the linux?
Injecting into the command line: df -hI see:
Filesystem Size Used Avail Use% Mounted on udev 3.8G 0 3.8G 0% /dev tmpfs 772M 9.1M 763M 2% /run /dev/sda1 4.7G 3.0G 1.5G 67% / tmpfs 3.8G 79M 3.7G 3% /dev/shm tmpfs 5.0M 8.0K 5.0M 1% /run/lock tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup /dev/mapper/vg01-some--common 2.0G 3.1M 1.8G 1% /opt/some-common /dev/mapper/vg01-some--game 12G 1.5G 11G 13% /opt/some /dev/mapper/vg01-some--var 20G 45M 19G 1% /opt/some-var /dev/mapper/vg01-some--log 20G 48M 19G 1% /opt/some-log tmpfs 772M 0 772M 0% /run/user/1000
I'm interested in the sections that start on. / dev/mapper
What instrument is most likely to fix these sections and how to change (reduce them)? (GParted can't see them)
I did. lvmosphere lvreduce --size 5G /dev/mapper/some-gkt-log but unfortunately, a file system has fled (after reloading, it says: “Welcome to emergency mode!”) Wouldn't want to (and there's no time) study all the magic spells, if you could lead to direct sequencing to reduce the section. /dev/mapper/vg01-some-log to a given size
I don't have much knowledge. Reduced the logistic party - the file system broke.“Welcome to emergency mode!”And then he went back to the old size, and then he fixed it again. Something else needs to be done after. lvreduceBut what?
logical volumelogical volume♪ lv) lvm (sighs)logical volume management(d) is an example of " analog " or of a whole " (disclosure " , " quinchester " , " hdd " ) if it is not divided into sections or in the " blade " (the functional part of the blade is also a blade).
Just like any squirrel, on the other side. lv A file system can be established ( " retrieve " ).
The file system usually takes all the space of the blade device, but nothing (except for artificial limitations or mishandling in the implementation of the code that works with this f.s.) does not prevent it from taking up any more than part A blade device.
I hope it is clear from the considerations that have been made that if the size of the blade is to be reduced (Doc, its section, the logical volume) lvm The size of the file system must be reduced, otherwise it will be ruined.
You're probably all on. lv Family files used https://ru.wikipedia.org/wiki/Ext (definition, e.g. with help)
df -Tif f.s. is installed or, for example, by
sudo blkidif not; see, for example https://unix.stackexchange.com/a/53552/110559 The answer is that we shall proceed.
to reduce the size of the f.s.:
Install it if it has been installed:
$ sudo umount блочное-устройство-или-точка-монтирования
If the files from this f.s. are used, cannot be repaired, then it makes sense to use some live/rescue-driver by downloading it.
verify its integrity:
$ sudo e2fsck -f блочное-устройство
(CLEARS) resize2fs will simply refuse to work by issuing a reminder.
Reduce the size of the file system, either to the specified size (the size can be indicated in the blocks, or by adding the souffix in the relevant units of measurement, for example,
100G- 100 gigabytes; see
$ sudo resize2fs блочное-устройство размер
or to the limit:
$ sudo resize2fs -M блочное-устройство
The second option (in my view) is preferable, as in fact the file system should have A little less. Places other than the size of the blank device are due to any leveling, meta-information, etc., and if the size is equal and when the minus is reduced, and the subsequent reduction of the blending device, f.s. may result in a " little " , and therefore the size of the blank device will have to be increased to " fix " .
and now the size of the bracket can be reduced lv:
$ sudo lvreduce -L размер блочное-устройство
If, at a previous step, you chose to " reduce the f.s. to the specified size " , it is now strongly recommended that the integrity of the f.s. (see above) be checked, and if the verification fails, there will be a slight increase in the size of the blending device (see above).
шагIt makes sense to point out somewhere near the megabayt,
-L +1m, if necessary, may be repeated:
$ sudo lvresize -L +шаг блочное-устройство
If, at a previous step, you reduced the size of the " to the limit " , then a reverse operation should now be made to increase the size of the " to the limit " so that F.S. would take all the free space of the blade:
$ sudo resize2fs блочное-устройство