Permissão negada para redimensionar o sistema de arquivos

3

Estou tentando redimensionar um sistema de arquivos em um volume mulipathed que eu cresci, redigitalizei todos os discos e redimensionei o mapa multipath.

# resize2fs /dev/mapper/my_vol 
resize2fs 1.43-WIP (20-Jun-2013)
Filesystem at /dev/mapper/my_vol is mounted on /var/lib/myvol; on-line resizing required
old_desc_blocks = 6, new_desc_blocks = 12
resize2fs: Permission denied to resize filesystem



# strace -f resize2fs /dev/mapper/my_vol
(finishes with)
....snip....
 write(1, "Filesystem at /dev/mapper/my_vol"..., 101Filesystem at /dev/mapper/my_vol is mounted on /var/lib/myvol; on-line resizing required
) = 101
write(1, "old_desc_blocks = 6, new_desc_bl"..., 42old_desc_blocks = 6, new_desc_blocks = 12
) = 42
access("/sys/fs/ext4/features/meta_bg_resize", R_OK) = 0
open("/var/lib/my_vol", O_RDONLY) = 4
ioctl(4, 0x40086610, 0x7fffb729c2e8)    = -1 EPERM (Operation not permitted)
write(2, "resize2fs", 9resize2fs)                = 9
write(2, ": ", 2: )                       = 2
write(2, "Permission denied to resize file"..., 38Permission denied to resize filesystem) = 38
ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?

Eu gostaria de manter este servidor como ele hospeda muitas máquinas virtuais, e eu não tive permissão negada ao executar um resizefs como root antes, o que poderia estar negando root um simples redimensionamento? Qualquer ajuda muito apreciada.

O servidor tem o selinux desativado e o multipath -ll mostra o volume em um estado de leitura-gravação. (wp = rw)

myvol (3600c0ff00013d24d8c20725301000000) dm-12 HP,P2000 G3 iSCSI
size=186G features='1 queue_if_no_path' hwhandler='0' wp=rw

Eu notei que ls -ld no ponto de montagem mostra

drwxr-xr-x  5 root root 4096 Jan 27 12:49 myvol

e não

drwxr-xr-x. 5 root root 4096 Jan 27 12:49 myvol

#ls -Zd myvol
drwxr-xr-x root root ?                                myvol

Relacionado?

    
por Sirch 27.01.2015 / 15:35

2 respostas

2

/dev/mapper/ pode conter dispositivos de bloco em vez de links simbólicos. Em caso afirmativo, remova-os, execute udevadm trigger . Trabalhou para o Debian 7.8.

    
por 08.07.2015 / 16:51
7

O mesmo problema - o meu FS tinha algumas inconsistências:

# resize2fs /dev/blah/lvol0
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/blah/lvol0 is mounted on /mnt/lvol0; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem

# umount /mnt/lvol0

# resize2fs /dev/blah/lvol0
resize2fs 1.42.9 (28-Dec-2013)
Please run 'e2fsck -f /dev/blah/lvol0' first.

# fsck /dev/blah/lvol0
fsck from util-linux 2.23.2
e2fsck 1.42.9 (28-Dec-2013)
/dev/mapper/blah-lvol0 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/blah-lvol0: 513/3072 files (2.9% non-contiguous), 12288/12288 blocks

# mount /dev/blah/lvol0 /mnt/lvol0

# resize2fs /dev/blah/lvol0
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/blah/lvol0 is mounted on /mnt/lvol0; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/blah/lvol0 is now 225280 blocks long.
    
por 06.08.2015 / 19:40

Tags