[root@localhost snmp]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda2 48G 2.1G 43G 5% /
/dev/sda5 81G 184M 77G 1% /opt
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@localhost snmp]# parted /dev/sdb
GNU Parted 1.8.1
使用 /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 0 -1
(parted) print
Model: DELL PERC 6/E Adapter (scsi)
Disk /dev/sdb: 5995GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 标志
1 17.4kB 5995GB 5995GB primary
(parted) quit
信息: 如果必要,不要忘记更新 /etc/fstab。
[root@localhost snmp]# fdisk -l
Disk /dev/sda: 146.1 GB, 146163105792 bytes
255 heads, 63 sectors/track, 17769 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 6387 51199155 83 Linux
/dev/sda3 6388 6897 4096575 82 Linux swap / Solaris
/dev/sda4 6898 17769 87329340 5 Extended
/dev/sda5 6898 17769 87329308+ 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 5994.7 GB, 5994700603392 bytes
255 heads, 63 sectors/track, 728814 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPT
[root@localhost snmp]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
731774976 inodes, 1463549943 blocks
73177497 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44664 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost snmp]#
[root@localhost snmp]# mount /dev/sdb1 /data
[root@localhost snmp]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda2 48G 2.1G 43G 5% /
/dev/sda5 81G 184M 77G 1% /opt
/dev/sda1 99M 12M 83M 13% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 5.4T 187M 5.1T 1% /data
固化
[root@localhost snmp]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/opt /opt ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/sdb1 /data ext3 defaults 1 2
阅读(1372) | 评论(0) | 转发(0) |