1.首先查看分区,发现300多G的硬盘/dev/sdc1只使用了200多G而已
[[email protected] dbbackup]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 16G 9.6G 5.1G 66% /
/dev/sda1 99M 19M 76M 20% /boot
tmpfs 1006M 22M 984M 3% /dev/shm
/dev/sdb1 79G 39G 37G 52% /disk1
/dev/sdc1 197G 173G 15G 93% /disk2
[[email protected] dbbackup]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2088 16667437+ 83 Linux
/dev/sda3 2089 2610 4192965 82 Linux swap / Solaris
Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 83 Linux
Disk /dev/sdc: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 26108 209712478+ 83 Linux
2.进行分区
[[email protected] dbbackup]# fdisk /dev/sdc
The number of cylinders for this disk is set to 39162.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (26109-39162, default 26109): 回车(仔细看就会发现这个是sdc1结束扇区+1的值)
Using default value 26109
Last cylinder or +size or +sizeM or +sizeK (26109-39162, default 39162): 回车
Using default value 39162
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[[email protected] dbbackup]# partprobe
[[email protected] dbbackup]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2088 16667437+ 83 Linux
/dev/sda3 2089 2610 4192965 82 Linux swap / Solaris
Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 83 Linux
Disk /dev/sdc: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 26108 209712478+ 83 Linux
/dev/sdc2 26109 39162 104856255 83 Linux
[[email protected] dbbackup]# mkfs.ext3 /dev/sdc2
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
13107200 inodes, 26214063 blocks
1310703 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
800 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
Writing inode tables: done
Creating journal (32768 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.
[[email protected] dbbackup]# mkdir /disk3
[[email protected] dbbackup]# mount /dev/sdc2 /disk3
添加到/etc/fstab
LABEL=/ / ext3 defaults 1 1
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 /disk1 ext3 defaults 1 3
/dev/sdc1 /disk2 ext3 defaults 1 4
/dev/sdc2 /disk3 ext3 defaults 1 5