Создаю РАМ диск. Создаю на нём ЛВМ. Начинаю создавать файловую систему.
Ext4 - создаёт успешно.
mkfs.xfs -f /dev/... - несоздаёт, и код возврата ноль!!Что неправильно делаю? Куда копать? Под ЦентОС 7 тоже самое работало, под Убунту 16.04 - нет.
Спасибо!
Вот как создаю ФС:
me: ~ $ sudo mkfs.ext4 /dev/developGRP/developVLM
me: ~ $ sudo mkfs.xfs -f /dev/developGRP/developVLM
meta-data=/dev/developGRP/developVLM isize=512 agcount=2, agsize=7680 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0
data = bsize=4096 blocks=15360, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=1605, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
me: ~ $ echo $?
0
me: ~ $ sudo mount /dev/developGRP/developVLM /mnt
mount: wrong fs type, bad option, bad superblock on /dev/mapper/developGRP-developVLM,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
me: ~ $ echo $?
32
Вот скрипт создания RAM диска и LVM:
#!/bin/bashset -x
set -e
declare -r blckDev="/dev/ram0"
declare -r name_vg="developGRP"
declare -r name_lv="developVLM"
if ! egrep "^brd[[:space:]]" /proc/modules ; then
modprobe brd max_part=10 rd_size=128000 # Size is in kb by default.
fi
test -b "${blckDev}"
if ! pvs "${blckDev}" ; then
pvcreate "${blckDev}"
fi
if ! vgs "${name_vg}" ; then
vgcreate "${name_vg}" "${blckDev}"
fi
if ! lvs "${name_vg}/${name_lv}" ; then
lvcreate --extents "50%FREE" --name "${name_lv}" "${name_vg}" "${blckDev}"
fi
vgscan --mknodes --cache
Вот логи из консоли, как всё запускалось, коды возврата:
me: ~ $ sudo bash create-LVM-point.sh
[sudo] password for me:
+ set -e
+ declare -r blckDev=/dev/ram0
+ declare -r name_vg=developGRP
+ declare -r name_lv=developVLM
+ egrep '^brd[[:space:]]' /proc/modules
+ modprobe brd max_part=10 rd_size=128000
+ test -b /dev/ram0
+ pvs /dev/ram0
Failed to find physical volume "/dev/ram0".
+ pvcreate /dev/ram0
Physical volume "/dev/ram0" successfully created
+ vgs developGRP
Volume group "developGRP" not found
Cannot process volume group developGRP
+ vgcreate developGRP /dev/ram0
Volume group "developGRP" successfully created
+ lvs developGRP/developVLM
Failed to find logical volume "developGRP/developVLM"
+ lvcreate --extents 50%FREE --name developVLM developGRP /dev/ram0
Logical volume "developVLM" created.
+ vgscan --mknodes --cache
Reading all physical volumes. This may take a while...
Found volume group "developGRP" using metadata type lvm2
/home/and/Data/coding_mbb/fs-size-change/src/create-LVM.sh: line 29: syntax error near unexpected token `fi'
me: ~ $ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
developVLM developGRP -wi-a----- 60,00m
me: ~ $ sudo mkfs.ext4 /dev/
Display all 234 possibilities? (y or n)
me: ~ $ sudo mkfs.ext4 /dev/developGRP/developVLM
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done
Creating filesystem with 61440 1k blocks and 15360 inodes
Filesystem UUID: 44d47ca1-cd57-49ca-8b53-fd4e94482bfc
Superblock backups stored on blocks:
8193, 24577, 40961, 57345Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
me: ~ $ sudo mount /dev/developGRP/developVLM /mnt
me: ~ $ sudo umount /mnt
me: ~ $ sudo mkfs.xfs -f /dev/developGRP/developVLM
meta-data=/dev/developGRP/developVLM isize=512 agcount=2, agsize=7680 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0
data = bsize=4096 blocks=15360, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=1605, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
me: ~ $ echo $?
0
me: ~ $ sudo mount /dev/developGRP/developVLM /mnt
mount: wrong fs type, bad option, bad superblock on /dev/mapper/developGRP-developVLM,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
me: ~ $ echo $?
32
P.S. Компьютер перезагружал... Если чего...