You are here

create Mount Point

[root@server_2 ]# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1 8704684 4154464 4108036 51% /
none 428440 0 428440 0% /dev/shm
.host:/ 58597528 52585824 6011704 90% /mnt/hgfs

 

[root@server_2 ]# ls -ld /dev/sd*

brw-rw----  1 root disk 8,  0 May  8  2009 sda
brw-rw---- 1 root disk 8, 1 May 8 2009 sda1
brw-rw---- 1 root disk 8, 2 May 8 2009 sda2
brw-rw---- 1 root disk 8, 16 May 8 2009 sdb

 

[root@server_2 ]# fdisk -l /dev/sdb

Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

 

[root@server_2 ]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
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.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 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): 1
First cylinder (1-522, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522): 100M

Command (m for help): p

Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 100 803218+ 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

[root@server_2 ]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1101 8843751 83 Linux
/dev/sda2 1102 1305 1638630 82 Linux swap

Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 100 803218+ 83 Linux

 

[root@server_2 ]# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1 8704684 4154352 4108148 51% /
none 428440 0 428440 0% /dev/shm
.host:/ 58597528 52586208 6011320 90% /mnt/hgfs

 

[root@server_2 ]# mkfs.ext3 /dev/sdb1

[root@server_2 ]# mkdir /gg

[root@server_2 ]# mount -t ext3 /dev/sdb1 /gg

[root@server_2 ]# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1 8704684 4154352 4108148 51% /
none 428440 0 428440 0% /dev/shm
.host:/ 58597528 52586352 6011176 90% /mnt/hgfs
/dev/sdb1 790556 17216 733180 3% /gg

 

[root@server_2 ]# more  /etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
# Beginning of the block added by the VMware software
.host:/ /mnt/hgfs vmhgfs defaults,ttl=5 0 0
# End of the block added by the VMware software
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/sdb1 /gg ext3 defaults 1 1