me ajuda a entender o dispositivo de loop de configuração inicial do lvm

3

Eu tenho uma compreensão (muito) grosseira do que é o lvm, mas acho um pouco difícil entender os dispositivos de loop. Enfim aqui está o meu problema:

Alguém executou uma instalação de servidor Ubuntu para mim e provavelmente foi com qualquer configuração de lvm padrão oferecida. E agora estou precisando consertar isso. O servidor possui duas unidades físicas de 146 GB. A intenção original era definir um ataque-1 com aproximadamente 100 GB de espaço em uma partição.

Em vez disso, tenho uma bagunça para resolver. Veja algumas informações:

fdisk -l (não muito claro, veja a seguir):

Disk /dev/sda: 146.8 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders, total 286677120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006e6c2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   286676991   143087617    5  Extended
/dev/sda5          501760   286676991   143087616   8e  Linux LVM

Disk /dev/mapper/nmk203-root: 77.8 GB, 77791756288 bytes
255 heads, 63 sectors/track, 9457 cylinders, total 151937024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/nmk203-root doesn't contain a valid partition table

Disk /dev/mapper/nmk203-swap_1: 68.7 GB, 68706893824 bytes
255 heads, 63 sectors/track, 8353 cylinders, total 134193152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/nmk203-swap_1 doesn't contain a valid partition table

Disk /dev/mapper/loop0p1: 20.0 GB, 19998967808 bytes
255 heads, 63 sectors/track, 2431 cylinders, total 39060484 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/loop0p1 doesn't contain a valid partition table

Disk /dev/mapper/loop0p2: 1023 MB, 1023410176 bytes
255 heads, 63 sectors/track, 124 cylinders, total 1998848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/loop0p2 doesn't contain a valid partition table

Disk /dev/mapper/loop2p1: 20.0 GB, 19998967808 bytes
255 heads, 63 sectors/track, 2431 cylinders, total 39060484 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/loop2p1 doesn't contain a valid partition table

Disk /dev/mapper/loop2p2: 1023 MB, 1023410176 bytes
255 heads, 63 sectors/track, 124 cylinders, total 1998848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/loop2p2 doesn't contain a valid partition table

parted / dev / sda imprimir todos:

Model: HP LOGICAL VOLUME (scsi)
Disk /dev/sda: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type      File system  Flags
 1      1049kB  256MB  255MB  primary   ext2         boot
 2      257MB   147GB  147GB  extended
 5      257MB   147GB  147GB  logical                lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/loop2p2: 1023MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  1023MB  1023MB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/loop2p1: 20.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  20.0GB  20.0GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/loop0p2: 1023MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  1023MB  1023MB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/loop0p1: 20.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  20.0GB  20.0GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/nmk203-swap_1: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  68.7GB  68.7GB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/nmk203-root: 77.8GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  77.8GB  77.8GB  ext4

fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/nmk203-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb1 during installation
UUID=26b5157b-8db8-47f3-a8ec-398e92d5e4cf /boot           ext2    defaults        0       2
/dev/mapper/nmk203-swap_1 none            swap    sw              0       0

mount:

/dev/mapper/nmk203-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
/dev/sda1 on /boot type ext2 (rw)
/dev/dm-2 on /tmp/tmpq2vQ64 type ext4 (rw)
/dev/dm-4 on /tmp/tmptlvPgg type ext4 (rw)

df -h:

Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/nmk203-root   72G  5.1G   63G   8% /
udev                           32G  4.0K   32G   1% /dev
tmpfs                          13G  316K   13G   1% /run
none                          5.0M     0  5.0M   0% /run/lock
none                           32G     0   32G   0% /run/shm
cgroup                         32G     0   32G   0% /sys/fs/cgroup
/dev/sda1                     228M   54M  162M  25% /boot
/dev/loop1                     19G  630M   17G   4% /tmp/tmpq2vQ64
/dev/loop3                     19G  630M   17G   4% /tmp/tmptlvPgg

Então, minha primeira pergunta é. Quais são esses dispositivos de loop montados na pasta / tmp? Posso simplesmente removê-los e usar esse espaço em / (ou não por causa de swap etc. etc.)? Como eu iria reduzir outras partições para adicionar espaço a / (e, eventualmente, trabalhar o meu caminho no plano original do RAID-1)? Eu prefiro evitar uma reinstalação neste momento (se possível).

Obrigado antecipadamente

    
por D.Mill 02.04.2013 / 01:43

0 respostas