-
查看系統內容:
#lvs #pvs #vgs
參考資料:
- http://jamyy.us.to/blog/2015/09/7673.html
- http://dywang.csie.cyut.edu.tw/dywang/rhel7/node60.html
#lvs #pvs #vgs
#yum install
#yum install iscsi-initiator-utils
#vim /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.2016-05.com.example:server2
#systemctl enable iscsi #systemctl restart iscsi
#iscsiadm -m discovery -t st -p 192.168.5.244 #iscsiadm -m node -T iqn.2016-05.com.example:server1.disk01 -p 192.168.5.244 -l
#lsblk #tail /var/log/messages #fdisk /dev/sdb #mkfs -t ext4 /dev/sdb1 #blkid /dev/sdb1 #vim /etc/fstab UUID=xxxx /mnt/data ext4 _netdev 0 0
#iscsiadm -m node -T iqn.2016-05.com.example:server1.disk01 -p 192.168.5.244 -u
#yum -y install targetcli
#firewall-cmd --permanent --add-port=3260/tcp #firewall-cmd --reload
#systemctl enable target #systemctl start target
#mkdir /iscsi_disks #dd if=/dev/zero of=/iscsi_disks/disk01.img bs=1M count=1024
# targetcli
/> cd backstores/fileio /backstores/fileio> create server1.disk01 /iscsi_disks/disk01.img
/backstores/fileio> cd /iscsi /iscsi> create iqn.2016-05.com.example:server1.disk01
/iscsi> cd iqn.2016-05.com.example:server1.disk01/tpg1/acls/ /iscsiiqn.2016-05.com.example:server1.disk01/tpg1/acls/> create iqn.2016-05.com.example:server2
/iscsiiqn.2016-05.com.example:server1.disk01/tpg1/acls/> cd iqn.2016-05.com.example:server1.disk01/tpg1/luns/ /iscsiiqn.2016-05.com.example:server1.disk01/tpg1/luns/> create /backstores/fileio/server1.disk01
/iscsiiqn.2016-05.com.example:server1.disk01/tpg1/acls/> cd iqn.2016-05.com.example:server1.disk01/tpg1/portals/ /iscsiiqn.2016-05.com.example:server1.disk01/tpg1/portals/> create 192.168.5.243
/iscsiiqn.2016-05.com.example:server1.disk01/tpg1/acls/> cd / /> saveconfig /> exit
#yum -y install quota
xfs_quota [option] [mount_point][option]
#vim /etc/fstab UUID=XXXX /webhome xfs defaults,usrquota,grpquota 0 0
#mount -o remount -a
#xfs_quota -x -c "print" #xfs_quota -x -c "df -h" /home #xfs_quota -x -c "report -ubih" /home #xfs_quota -x -c "state"
#xfs_quota -x -c "limit -u bsoft=1024M bhard=1500M user1" /webhome #xfs_quota -x -c "timer -u -b 30days" /webhome
#su - user1 $dd if=/dev/zero of=/webhome/123.img bs=1M count=1300 $ls -al /webhome/123.img $exit #xfs_quota -x -c "report -ubh" /webhome