[root@atyu30 ~]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x8
[root@atyu30 ~]# rpm -ivh /opt/kmod-xfs-0.4-2.x86_64.rpm
warning: /opt/kmod-xfs-0.4-2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:kmod-xfs ########################################### [100%]
[root@atyu30 ~]# rpm -ivh /opt/xfsprogs-2.9.4-1.el5.centos.x86_64.rpm
warning: /opt/xfsprogs-2.9.4-1.el5.centos.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:xfsprogs ########################################### [100%]
[root@atyu30 ~]# modprobe xfs
[root@atyu30 ~]# lsmod | grep xfs
xfs 508625 0
[root@atyu30 ~]# 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 3824 30716248+ 83 Linux
/dev/sda2 3825 17260 107924670 83 Linux
/dev/sda3 17261 17769 4088542+ 82 Linux swap / Solaris
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@atyu30 ~]# 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) p
Model: ATA WDC WD2002FYPS-0 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 标志
(parted) mkpart primary xfs 0 -0
(parted) p
Model: ATA WDC WD2002FYPS-0 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name 标志
1 17.4kB 2000GB 2000GB primary
(parted) quit
信息: 如果必要,不要忘记更新 /etc/fstab。
[root@atyu30 ~]#
[root@atyu30 ~]# 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 3824 30716248+ 83 Linux
/dev/sda2 3825 17260 107924670 83 Linux
/dev/sda3 17261 17769 4088542+ 82 Linux swap / Solaris
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 243202 1953514583+ ee EFI GPT
[root@atyu30 ~]# mkfs.xfs -L /data -f /dev/sdb1
meta-data=/dev/sdb1 isize=256 agcount=32, agsize=15261832 blks
= sectsz=512 attr=0
data = bsize=4096 blocks=488378624, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks, lazy-count=0
realtime =none extsz=4096 blocks=0, rtextents=0
[root@atyu30 ~]# cat /etc/fstab
LABEL=/1 / ext3 defaults 1 1
LABEL=/opt1 /opt 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
LABEL=/data /data xfs defaults 1 2
[root@atyu30 ~]# mount -a
[root@atyu30 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 29G 3.1G 24G 12% /
/dev/sda2 100G 190M 95G 1% /opt
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 1.9T 5.1M 1.9T 1% /data
阅读(1109) | 评论(0) | 转发(0) |