GFS distributed file system error reporting solution

1. The
problem is reported: the partition cannot be mounted when mounting the partition.
Solution: I use a script to automatically partition the partition. The script is as follows:

vim /opt/fdisk.sh
#!/bin/bash
NEWDEV=`ls /dev/sd* | grep -o 'sd[b-z]' | uniq`
for VAR in $NEWDEV
do
   echo -e "n\np\n\n\n\nw\n" | fdisk /dev/$VAR &> /dev/null
   mkfs.xfs /dev/${
    
    VAR}"1" &> /dev/null
   mkdir -p /data/${
    
    VAR}"1" &> /dev/null
   echo "/dev/${VAR}"1" /data/${VAR}"1" glusterfs defaults 0 0" >> /etc/fstab
done
mount -a &> /dev/null

chmod +x /opt/fdisk.sh
cd /opt/
./fdisk.sh
df -Th        #查看是否挂载成功

Try to find that the format of the file mounted in the script is wrong. After modification, it is:

vim /opt/fdisk.sh
#!/bin/bash
NEWDEV=`ls /dev/sd* | grep -o 'sd[b-z]' | uniq`
for VAR in $NEWDEV
do
   echo -e "n\np\n\n\n\nw\n" | fdisk /dev/$VAR &> /dev/null
   mkfs.xfs /dev/${
    
    VAR}"1" &> /dev/null
   mkdir -p /data/${
    
    VAR}"1" &> /dev/null
   echo "/dev/${VAR}"1" /data/${VAR}"1" xfs defaults 0 0" >> /etc/fstab
done
mount -a &> /dev/null

chmod +x /opt/fdisk.sh
cd /opt/
./fdisk.sh
df -Th        #查看是否挂载成功

Error: After the
Insert picture description here
solution is solved, the mount can be realized:
Insert picture description here

2.
Error report problem: The following error message will appear when creating a new volume.
Solution: The problem is solved when the firewall is restarted when the firewall is restarted. The problem is solved after the firewall is turned off.

Error:
Insert picture description here
After solving:
Insert picture description here

Guess you like

Origin blog.csdn.net/Gengchenchen/article/details/114305254