分类: LINUX
2008-07-20 23:00:53
对大于1T的磁盘进行分区
下面一块有3T RAID的硬盘的分区情况
#parted /dev/sdc
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Using /dev/sdc
(parted) m
check MINOR do a simple check on the filesystem
cp [FROM-DEVICE] FROM-MINOR TO-MINOR copy filesystem to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel LABEL-TYPE create a new disklabel (partition table)
mkfs MINOR FS-TYPE make a filesystem FS-TYPE on partititon MINOR
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a filesystem
move MINOR START END move partition MINOR
name MINOR NAME name partition MINOR NAME
print [MINOR] display the partition table, or a partition
quit exit program
rescue START END rescue a lost partition near START and END
resize MINOR START END resize filesystem on partition MINOR
rm MINOR delete partition MINOR
select DEVICE choose the device to edit
set MINOR FLAG STATE change a flag on partition MINOR
(parted) p
Disk geometry for /dev/sdc: 0.000-2860032.000 megabytes
Disk label type: gpt
Minor Start End Filesystem Name Flags
1 0.017 1000.000 ext3
2 1000.000 2000.000 ext3
3 2000.000 3000.000 ext3
(parted) rm 3
(parted) rm 2
(parted) rm 1
(parted) mkpartfs primary ext3 0 1000000
No Implementation: Support for creating ext3 file systems is not implemented yet.
(parted) mkpart primary 0 1000000
(parted) mkpart primary 1000000 2000000
(parted) mkpart primary 2000000 3000000
Error: Can't have a partition outside the disk!
(parted) mkpart primary 2000000 2800000
(parted) q
Information: Don't forget to update /etc/fstab, if necessary.
#mkfs.ext3 /dev/sdc1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
128008192 inodes, 255999995 blocks
12799999 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=260046848
7813 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
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
#