Add new hard disk devices and hard disk partitions in linux format mounting use disk quota limit disk management 1. View hard disk device information fdisk-l 2. Use www.2cto.com 1 for disk partitioning, formatting, and mounting) view hard disk information: fdisk-l [root @ localhost ~] # Fdisk-l Disk/dev/sda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 6 48163 + 83 Linux/dev/sda2 7 515 4088542 + 83 Linux/ dev/sda3 516 2480 15783862 + 83 Linux/dev/sda4 2481 2610 1044225 5 Extended/dev/sda5 2481 2610 1044193 + 82 Linux swap/Solaris www.2cto.com Disk/dev/sdb: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sdb1 1 1 2610 20964793 + 5 Extended/dev/sdb5 1 2610 20964762 83 LinuxWarning: invalid flag 0x0000 of partition table 5 will be corrected by w (rite) Disk/dev/sdc: 42.9 GB, 42949672960 bytes255 heads, 63 sectors/track, 5221 cylindersUnits = c Ylinders of 16065*512 = 8225280 bytes www.2cto.com Device Boot Start End Blocks Id System/dev/sdc1 11 5221 41857357 + 5 Extended/dev/sdc4 1 10 80293 + 83 Linux 2), to the hard disk partition fdisk/dev/sdb E. g.: fdisk/dev/hda (for the first IDE disk) or: fdisk/dev/sdc (for the third SCSI disk) or: fdisk/dev/eda (for the first PS/2 ESDI drive) Command action l list known partition types n add a new partition www.2cto. co M p print the partition tableq quit without saving changes t change a partition's system idu change display/entry units w write table to disk and exit www.2cto.com 3), n create a new partition [d is to delete a partition] 4), e --- create an extended partition ---> l create a logical partition p --- create a primary partition and fill in the start and end columns 5), t set file system number 83 ---> linux 6), w write partition information to the partition table [or q exit, do not write] 7), format as ext3 -----> mkfs. ext3/dev/sdb58), partprobe/dev/sdb notify all software with this hard disk device 9), set automatic mounting vi/etc/fstab/dev/sdb5/ Mnt ext3 defaults 0 010), mount the device that is not mounted to the fstab file (mount-a 11), df-h to view the disk quota of all mounted devices: 1. Add a new disk, partition, format, (mkfs. etx3/dev/sdc5/) 2. Set automatic mounting upon startup (vi/etc/fstab) to add Disk Quota support (User quota usrquota and group quota kgquota) /dev/sdc5/mnt ext3 defaults, usrquota, create a quota database named quotacheck-cumg/mnt www.2cto.com [root @ localhost mnt] # lltotal 16-rw ------- 1 root 6144 Jun 16 05:21 aquota. group- Rw ------- 1 root 6144 Jun 16 05:21 aquota. user 5. Edit the user quota and group quota edquota-u user1 or edquota-g web. Here, the entire group can only be used within the quota or can everyone in the group use that much? 6. Enable disk quota limit quotaon-aug 7. Test dd if =/dev/zero of1_test.txt bs = 10 M count = 2 author zdrjlamp