Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@redhat ~]# groupadd teachers
- [root@redhat ~]# useradd rcwang
- [root@redhat ~]# useradd jjli
- [root@redhat ~]# useradd hcyang
- [root@redhat ~]# useradd ycc
- [root@redhat ~]# usermod -aG rcwang teachers
- [root@redhat ~]# usermod -aG teachers rcwang
- [root@redhat ~]# usermod -aG teachers jjli
- [root@redhat ~]# usermod -aG teachers hcyang
- [root@redhat ~]# usermod -aG teachers ycc
- [root@redhat ~]# fdisk /dev/vdb
- Welcome to fdisk (util-linux 2.29.2).
- Changes will remain in memory only, until you decide to write them.
- Be careful before using the write command.
- Device does not contain a recognized partition table.
- Created a new DOS disklabel with disk identifier 0x5bb34cbc.
- Command (m for help): n
- Partition type
- p primary (0 primary, 0 extended, 4 free)
- e extended (container for logical partitions)
- Select (default p): p
- Partition number (1-4, default 1): 1
- First sector (2048-20971519, default 2048):
- Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519):
- Created a new partition 1 of type 'Linux' and of size 10 GiB.
- Command (m for help): p
- Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 8192 bytes
- I/O size (minimum/optimal): 8192 bytes / 8192 bytes
- Disklabel type: dos
- Disk identifier: 0x5bb34cbc
- Device Boot Start End Sectors Size Id Type
- /dev/vdb1 2048 20971519 20969472 10G 83 Linux
- Command (m for help): w
- The partition table has been altered.
- Calling ioctl() to re-read partition table.
- Syncing disks.
- root@ts877:~# mkfs.ext4 /dev/vdb1
- mke2fs 1.43.4 (31-Jan-2017)
- Discarding device blocks: done
- Creating filesystem with 2621184 4k blocks and 655360 inodes
- Filesystem UUID: 4fdd9417-445d-4627-b220-9214a2b9c43d
- Superblock backups stored on blocks:
- 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
- Allocating group tables: done
- Writing inode tables: done
- Creating journal (16384 blocks): done
- Writing superblocks and filesystem accounting information: done
- [root@redhat ~]# vim /etc/fstab
- /dev/vdb1 /csie ext4 defaults 0 0
- [root@redhat ~]# chmod 774 /csie # 設定權限:rwx rwx r--
- [root@redhat ~]# chmod g+s /csie # SetGID 重要!!!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement