[root@ebsapp01 ~]# cd /dev/
[root@ebsapp01 dev]# ls -l sd*
brw-rw---- 1 root disk 8, 0 Aug 29 2014 sda
brw-rw---- 1 root disk 8, 1 Aug 29 2014 sda1
brw-rw---- 1 root disk 8, 2 Aug 29 2014 sda2
brw-rw---- 1 root disk 8, 16 Aug 29 2014 sdb
brw-rw---- 1 root disk 8, 17 Aug 29 2014 sdb1
brw-rw---- 1 root disk 8, 32 Aug 29 2014 sdc
--------------------------------------------------------------------------------------
[root@ebsapp01 dev]# fdisk sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab el
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 26108.
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)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk sdc: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-26108, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-26108, default 26108):
Using default value 26108
Command (m for help): p
Disk sdc: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
sdc1 1 26108 209712478+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
--------------------------------------------------------------------------------------
[root@ebsapp01 dev]# mkdir -p /db01
--------------------------------------------------------------------------------------
[root@ebsapp01 ~]# 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)
26214400 inodes, 52428119 blocks
2621405 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=54525952
1600 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 (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
--------------------------------------------------------------------------------------
[root@ebsapp01 ~]# mount -t ext3 /dev/sdc1 /db01/
[root@ebsapp01 ~]# mount -a
[root@ebsapp01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.9G 2.1G 5.5G 28% /
none 506M 0 506M 0% /dev/shm
/dev/sdb1 2.0G 270M 1.8G 14% /app01
/dev/sdc1 197G 93M 187G 1% /db01
--------------------------------------------------------------------------------------
[root@ebsapp01 ~]# grep "/dev/sdc1" /etc/fstab
/dev/sdc1 /db01 ext3 defaults 0 0
[root@ebsapp01 ~]#
http://geektnt.com/how-to-format-and-mount-second-hard-drive-on-linux.html
No comments:
Post a Comment