mount - nbd-client Fsync error - Ask Ubuntu
i try insert usb memory , check device "/dev/sdb1"
root@ubuntu:~# lsblk
name maj:min rm size ro type mountpoint
sda 8:0 0 64g 0 disk
├─sda1 8:1 0 63g 0 part /
├─sda2 8:2 0 1k 0 part
└─sda5 8:5 0 1022m 0 part [swap]
sdb 8:16 1 3.8g 0 disk
└─sdb1 8:17 1 3.8g 0 part /media/fd74eeb0-2bf8-49b0-872a- 4a283f124c10
sr0 11:0 1 1024m 0 rom
sr1 11:1 1 1024m 0 rom
and create network device
nbd-server -r 2000 /dev/sdb
** (process:2778): warning **: specifying export on command line deprecated.
** (process:2778): warning **: please use configuration file instead.
and client side( same machine )
nbd-client 172.20.10.3 2000 /dev/nbd0
negotiation: ..size = 3850mb
bs=1024, sz=4037017600 bytes
and mount nbd device
mount -o loop /dev/nbd0p1 point/
but mount follows problem occurs
root@ubuntu# mount /dev/nbd0p1 point/
mount: block device /dev/nbd0p1 write-protected, mounting read-only
when tried modify files in device error occurrs
vi point/test.c
add lines
and :wq
point/test.c" e212: can't open file writing
why ??
i don't understand this
root@ubuntu:~# dmesg | tail
[ 371.280809] loop: write error @ byte offset 3035136, length 4096.
[ 371.280810] buffer i/o error on device loop0, logical block 741
[ 371.280812] lost page write due i/o error on loop0
[ 371.280815] loop: write error @ byte offset 4096, length 4096.
[ 371.280816] buffer i/o error on device loop0, logical block 1
[ 371.280818] lost page write due i/o error on loop0
[ 389.039901] loop: write error @ byte offset 8396800, length 4096.
[ 389.039909] ext4-fs warning (device loop0): ext4_end_bio:317: i/o error -1 writing inode 12 (offset 0 size 0 starting block 2050)
[ 389.039913] buffer i/o error on device loop0, logical block 2050
[ 391.266099] hrtimer: interrupt took 8643276 ns
solved.
my mistake
nbc-server "-r" option read-only. ..
remove "-r" , mount -o loop correctly operates
Comments
Post a Comment