问题
root@xx:/opt/gopath/src/github.com/hyperledger/fabric# mkdir -p testtt
mkdir: cannot create directory ‘testtt’: Read-only file system
分析
可能是异常关机导致文件系统出现问题。
解决
1、查看机器的文件系统类型:
root@xxx:/opt/gopath/src/github.com/hyperledger/fabric# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 8.6M 790M 2% /run
/dev/vda1 68G 15G 54G 22% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 799M 0 799M 0% /run/user/1000
root@xxx:/opt/gopath/src/github.com/hyperledger/fabric# parted /dev/vda1
GNU Parted 3.2
Using /dev/vda1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print list
Model: Virtio Block Device (virtblk)
Disk /dev/vda1: 75.2GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 75.2GB 75.2GB ext4
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 75.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number