1

In order to use gluster snapshots, I am trying to create LVs through LVM as thinly provisioned logical volumes are needed to make gluster snapshots work.

Creation works, but the setup does not survive a reboot. Somewhere in the process there must be an error. Here is what I am doing to create the LVs:

user@node1:~$ sudo lvs
[sudo] password for user: 
  LV     VG        Attr      LSize Pool Origin Data%  Move Log Copy%  Convert
  root   rabbit-vg -wi-ao--- 8.86g                                           
  swap_1 rabbit-vg -wi-ao--- 5.86g                                           

show physical volumes:

user@node1:~$ sudo pvs
  PV         VG        Fmt  Attr PSize  PFree 
  /dev/sda5  rabbit-vg lvm2 a--  14.76g 48.00m
  /dev/sde1            lvm2 a--  20.00g 20.00g

create volume

user@node1:~$ sudo vgcreate gluster /dev/sde1
  Volume group "gluster" successfully created

create thin pool

user@node1:~$ sudo lvcreate -L 19.9G -T gluster/mythinpool
  Rounding up size to full physical extent 19.90 GiB
  Rounding up size to full physical extent 20.00 MiB
  Logical volume "mythinpool" created

create logical volume

user@node1:~$ sudo lvcreate -V 19.9G -T gluster/mythinpool -n thinv1
  Rounding up size to full physical extent 19.90 GiB
  Logical volume "thinv1" created

create file system

user@node1:~$ sudo mkfs.ext4 /dev/gluster/thinv1 
mke2fs 1.42.9 (4-Feb-2014)
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=16 blocks, Stripe width=16 blocks
1305600 inodes, 5217280 blocks
260864 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
8160 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

show setup

user@node1:~$ sudo lvscan
  ACTIVE            '/dev/gluster/mythinpool' [19.90 GiB] inherit
  ACTIVE            '/dev/gluster/thinv1' [19.90 GiB] inherit
  ACTIVE            '/dev/rabbit-vg/root' [8.86 GiB] inherit
  ACTIVE            '/dev/rabbit-vg/swap_1' [5.86 GiB] inherit

mount it

user@node1:~$ sudo mount /dev/gluster/thinv1 /bricks/brick1/

show mounted devices

user@node1:~$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/rabbit--vg-root  8.6G  7.4G  839M  90% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         1.5G  4.0K  1.5G   1% /dev
tmpfs                        301M  592K  301M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         1.5G     0  1.5G   0% /run/shm
none                         100M     0  100M   0% /run/user
/dev/sda1                    236M   38M  186M  17% /boot
/dev/sdb1                     15G  4.8G  9.2G  35% /data/mysql
/dev/sdc1                     20G  7.2G   12G  39% /data/gluster
/dev/sdd1                     20G   17G  2.3G  88% /data/files
gs1:/volume1                  20G  7.2G   12G  39% /data/nfs
/dev/mapper/gluster-thinv1    20G   44M   19G   1% /bricks/brick1

now reboot, and check again:

user@node1:~$ sudo lvscan
[sudo] password for user: 
inactive          '/dev/gluster/mythinpool' [19.90 GiB] inherit
inactive          '/dev/gluster/thinv1' [19.90 GiB] inherit
ACTIVE            '/dev/rabbit-vg/root' [8.86 GiB] inherit
ACTIVE            '/dev/rabbit-vg/swap_1' [5.86 GiB] inherit

volumes inactive, try to activate

user@node1:~$ sudo vgchange -ay gluster
/usr/sbin/thin_check: execvp failed: No such file or directory
Check of thin pool gluster/mythinpool failed (status:2). Manual repair required (thin_dump --repair /dev/mapper/gluster-mythinpool_tmeta)!
/usr/sbin/thin_check: execvp failed: No such file or directory
0 logical volume(s) in volume group "gluster" now active

No matter what I do, the volumes stay inactive and I can not mount them.

What am I doing wrong? Thank you in advance for any help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.