7

I would like to shrink my logical volume for home directory, so that I can extend volume for root.

df -h

/dev/mapper/vg_mitoscomp-lv_root   50G   33G   15G  70% /
/dev/mapper/vg_mitoscomp-lv_home   53G  180M   51G   1% /home

lsblk

─sdc2                                                                      8:34   0 111.3G  0 part
  ├─vg_mitoscomp-lv_root (dm-0)                                           253:0    0    50G  0 lvm  /
  ├─vg_mitoscomp-lv_swap (dm-1)                                           253:1    0   7.6G  0 lvm  [SWAP]
  └─vg_mitoscomp-lv_home (dm-2)                                           253:2    0  53.8G  0 lvm  /home

I can successfully unmount /home, but than I can't perform health check nor can I resize volume.

[root@MITOs-Comp ~]# e2fsck -f /dev/mapper/vg_mitoscomp-lv_home
e2fsck 1.41.12 (17-May-2010)
/dev/mapper/vg_mitoscomp-lv_home is in use.
e2fsck: Cannot continue, aborting.
root@MITOs-Comp ~]# resize2fs /dev/mapper/vg_mitoscomp-lv_home 10G
resize2fs 1.41.12 (17-May-2010)
resize2fs: Device or resource busy while trying to open /dev/mapper/vg_mitoscomp-lv_home
Couldn't find valid filesystem superblock.
Braiam
  • 35,380
  • 25
  • 108
  • 167
Tomi S
  • 71
  • 1
  • 1
  • 2

2 Answers2

0

This is probably doesn't tell you something you already know since you said the umount was successful. But do a "more /etc/mtab". This is the kernels mount file and the device shouldn't be mounted and not listed in the /etc/mtab file.

user62612
  • 61
  • 2
0

I had the same thing.

I had the /data (/dev/VolGroup00/LogVol07 ) partion umounted, but block device could not be checked with fsck.ext4 with

e2fsck 1.41.12 (17-May-2010)
/dev/VolGroup00/LogVol07 is mounted.
e2fsck: Cannot continue, aborting.

error

lsof showed nothing.

Then I've made #cat /etc/mtab, and found that I had /tmp folder mounted to /data/tmp folder.

umount /tmp solved the problem.

HalosGhost
  • 4,732
  • 10
  • 33
  • 41
Ignis
  • 1