lvm及磁盘配额
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-17
查看新硬盘 [root@localhost ~]# fdisk -l Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 78 522112 82 Linux swap / Solaris /dev/sda3 79 1044 7759395 83 Linux Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn''t contain a valid partition table Disk /dev/sdc: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn''t contain a valid partition table 把第一块新硬盘 转化为pv [root@localhost ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created 查看PV [root@localhost ~]# pvdisplay /dev/hdc: open failed: No medium found --- NEW Physical volume --- PV Name /dev/sdb VG Name PV Size 20.00 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID iC7CD3-J1qd-Lz2c-Cri6-t5Vo-uQZf-KfMhZF 创建一个名为NEWGV的GV [root@localhost ~]# vgcreate newvg /dev/sdb Volume group "newvg" successfully created 创建一个名字为home的逻辑卷 [root@localhost ~]# lvcreate -L 19g –n home newvg Logical volume "home”ated 格式化home的逻辑卷 [root@localhost ~]# mkfs -t ext3 /dev/newvg/home mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux 拥有帝国一切,皆有可能。欢迎访问phome.net Block size=4096 (log=2) Fragment size=4096 (log=2) 2490368 inodes, 4980736 blocks 249036 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 152 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. 挂载home分区到/mnt下 [root@localhost ~]# mount /dev/newvg/home /mnt/ 开机自动挂载并检查 [root@localhost ~]# vim /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 LABEL=SWAP-sda2 swap swap defaults |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: 使用zebra 配置linux AS4.0 路由协议功能下一篇: 配置TELNET服务
关于lvm及磁盘配额的所有评论