java中的接口是类吗
253
2022-10-28
分区
分区fdisk /dev/vdb vfat ntfs ext xfsnp12048+100MppartprobeCommand (m for help): mCommand action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition 删除分区 g create a new empty GPT partition table G create an IRIX (SGI) partition table l list known partition types m print this menu n add a new partition 新建分区 o create a new empty DOS partition table p print the partition table 显示分区 q quit without saving changes 推出不保存 s create a new empty Sun disklabel t change a partition's system id 修改分区功能id u change display/entry units v verify the partition table w write table to disk and exit 保存更改到分区表中 x extra functionality (experts only)[root@localhost ~]# fdisk /dev/vdbWelcome to fdisk (util-linux 2.23.2).Changes will remain in memory only, until you decide to write them.Be careful before using the write command. 1,4-3 TopCommand (m for help): dPartition number (1-5, default 5):Partition 5 is deletedCommand (m for help): nAll primary partitions are in useAdding logical partition 5First sector (618496-20971519, default 618496):Using default value 618496Last sector, +sectors or +size{K,M,G} (618496-20971519, default 20971519):+100MPartition 5 of type Linux and of size 100 MiB is setCommand (m for help): wqThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.分区类型位主分区分区类型位扩展分区[root@localhost ~]# cat /proc/partitionsmajor minor #blocks name 253 0 10485760 vda 253 1 10484142 vda1 253 16 10485760 vdb 253 17 102400 vdb1 253 18 102400 vdb2 253 19 102400 vdb3 253 20 1 vdb4 253 21 102400 vdb5fdisk -l 查看系统上能识别的设备cat /proc/partitionsmkfs.xfs /dev/vdb5 格式化分区/dev/vdb5(换个文件系统)之后即可识别,挂载使用blkid 查看系统可用的设备swapon -s 查看swap 分区大小使用情况2.swap3.磁盘加密fdisk /dev/vdbcryptsetup luksFormat /dev/vdb1cryptsetup open /dev/vdb1 westosmkfs.xfs /dev/mapper/westosmount /dev/mapper/westos /mnt/umount /mnt/cryptsetup close westos cryptsetup open /dev/vdb1 lol cryptsetup luksFormat/dev/vdb1 密码设置成功不提示 cryptsetup open /dev/vdb1 lol 打开才能用 ll/dev/mapper/ 查看 13 ll /dev/mapper/ 14 mkfs.xfs /dev/mapper/lol 15 mount /dev/mapper/lol /mnt/ 16 df 17 cd /mnt/ 保存文件数据 挂载前后识别的是不同的设备 18 touch tiomo 19 vim tiomo 20 cat tiomo 21 umount /mnt/ 22 cd 25 umount /mnt/ 26 cryptsetup close lol 22.加密磁盘的永久挂载vim /etc/crypttab解密后设备文件管理文件 设备 加密字符存放文件vim /root/lukspdfilechmod 600 /root/lukspsfilecryptsetup luksAddKey /dev/vdb1 /root/lukspsfilevim /etc/fstable /dev/mapper/taxing /mnt xfs defaults 00 reboot3.加密清除vim /etc/fstab> /etc/crypttabrm -rf /root/lukspsfileumount /mntcryptsetup close taxingmkfs.xfs /dev/vdb14.磁盘阵列C创建l执行级别a如果没有这个盘自动建立n同时几块盘创建riadx闲置 1 fdisk /dev/vdb 3 partprobe 4 cat /proc/partitions 6 mdadm -C /dev/md0 -a yes -l 1 -n 2 -x 1 /dev/vdb{1..3} 7 mkfs.xfs /dev/md0 8 cat /proc/partitions 9 mount /dev/md0 /mnt/ 10 df 11 cd /mnt/ 12 touch aa 13 lswatch -n 1 cat /proc/mdstat 监控/dev/md0 状态停止磁盘阵列 15 mdadm -f /dev/md0 /dev/vdb1 先 -f(使停止。处于损坏的状态) 再 -r(使删除) 16 mdadm -r /dev/md0 /dev/vdb1 17 mdadm -f /dev/md0 /dev/vdb3 18 mdadm -r /dev/md0 /dev/vdb3 20 mdadm -f /dev/md0 /dev/vdb2 最后一块在使用,不能删除,需要停止磁盘阵列 21 df 22 umount /mnt/ 23 cd 24 umount /mnt/ 停止磁盘阵列前先卸载 25 mdadm -S /dev/md0 停止磁盘阵列5.配额mkdir /pub chmod 1777 /pub/mount -o usrquota /dev/vdb1 /pub quotaon -uv /dev/vdb1 指定激活显示edquota -u student 编辑设置Disk quotas for user taxing (uid 1001): Filesystem blocks soft hard inodes soft hard /dev/vdb1 482800 0 500000 1 0 0~ su - taxing [taxing@localhost pub]$ dd if=/dev/zero of=/pub/file bs=1M count=500dd: error writing ‘/pub/file’: No space left on device472+0 records in471+0 records out494387200 bytes (494 MB) copied, 2.10227 s, 235 MB/s永久挂载(开机启动)vim /etc/fstab /dev/vdb1 /mnt xfs defaults,usrquota 0 0
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~