1314作業

先做raid
將機器加上兩塊硬盤:分別是:
Disk /dev/hdd: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1       17753     8388261   8e  Linux LVM

Disk /dev/hdb: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       17753     8388261   8e  Linux LVM

做一個raid10

[root@benwen ~]# mdadm --create --auto=yes /dev/md1 --level=10 --raid-devices=2 /dev/hdb1 /dev/hdd1
mdadm: array /dev/md1 started.

[root@benwen ~]# pvcreate /dev/md1
  Physical volume "/dev/md1" successfully created
[root@benwen ~]#

[root@benwen ~]# vgcreate -s 16M benwen /dev/md1
  /dev/cdrom: open failed: Read-only file system
  Attempt to close device '/dev/cdrom' which is not open.
  Volume group "benwen" successfully created
[root@benwen ~]#

[root@benwen ~]# lvcreate -L 200M -n benwenw benwen
  Rounding up size to full physical extent 208.00 MB
  Logical volume "benwenw" created
[root@benwen ~]#

[root@benwen ~]# mkfs.ext3 /dev/benwen/benwenw
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
53248 inodes, 212992 blocks
10649 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
26 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
 8193, 24577, 40961, 57345, 73729, 204801

Writing inode tables: done                           
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@benwen ~]#


mount -o usrquota,grpquota /dev/benwen/benwenw /mnt/raid/

[root@benwen ~]# useradd benwen

[root@benwen ~]# quotacheck -acvg
quotacheck: Scanning /dev/mapper/benwen-benwenw [/mnt/raid] quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
done
quotacheck: Checked 3 directories and 2 files
quotacheck: Old file not found.

isk quotas for user benwen (uid 500):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/mapper/benwen-benwenw          0       1000       2000          0        0        0

[benwen@benwen raid]$ dd if=/dev/zero of=2.txt bs=10M count=100
dd: writing `2.txt': No space left on device
2+0 records in
1+0 records out
20656128 bytes (21 MB) copied, 0.831926 seconds, 24.8 MB/s
[benwen@benwen raid]$
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章