Physical connection Disk:
[Root @ linux117 ~] # Fdisk/dev/sdbc
Unable to open/dev/sdbc
[Root @ linux117 ~] # More/proc/SCSI
Attached Devices:
HOST: scsi0 channel: 00 ID: 00 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
HOST: scsi0 channel: 00 ID: 01 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
[Root @ linux117 proc] # cd SCSI
[Root @ linux117 SCSI] # ls
Device_info mptspi SCSI SG
[Root @ linux117 SCSI] # More device_info
'Aashim' 'imagery 2400sp '0x1
'Chinon' CD-Rom CDS-431 '0X1
'Chinon' CD-Rom CDS-535 '0X1
'Denon' DRD-25x '0X1
'Hitachi ''dk312c' 0x1
'Hitachi ''dk314c' 0x1
'Ibm ''' 2104-du3' 0x1
'Ibm ''' 2104-tu3' 0x1
'Ims ''cdd521/10' 0x1
'Maxtor ''' XT-3280 '0X1
'Maxtor ''xt-4380s' 0x1
'Maxtor '''mxt-1240s' 0x1
'Maxtor ''' XT-4170s '0X1
'Maxtor ''xt-8760s' 0x1
'Mediavi' 'reno CD-ROMX2A '0X1
'Microtek ''scanmakerii' 0x1
'Nec ''CD-rom drive: 841' 0x1
'Philips ''pca80sc' 0x1
'Rodime' ro3000s '0X1
'Sun' 'sena' 0x1
'Sanay' 'crd-250s' 0x1
'Seagate' 'st157n' 0x1
'Seagate' 'st296 '0X1
[Root @ linux117 SCSI] # ls
Device_info mptspi SCSI SG
[Root @ linux117 SCSI] # More SCSI
Attached Devices:
HOST: scsi0 channel: 00 ID: 00 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
HOST: scsi0 channel: 00 ID: 01 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
Note: Use this command to add a disk:
Echo "SCSI add-single-device w x y z">/proc/SCSI
The specified parameter values w, x, y, and z are as follows:
W is the host adapter identifier, and the first adapter is zero (0)
X is the SCSI channel on the host Adapter. The first channel is zero (0)
Y is the scsi id of the device.
Z is the Lun number, and the first Lun is zero (0)
Note: You can use this command to delete a disk: Echo "SCSI remove-single-device w x y z">/proc/SCSI
[Root @ linux117 SCSI] # echo "SCSI add-single-device 0 00 02 00">/proc/SCSI [root @ linux117 SCSI] # More SCSI
Attached Devices:
HOST: scsi0 channel: 00 ID: 00 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
HOST: scsi0 channel: 00 ID: 01 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
HOST: scsi0 channel: 00 ID: 02 Lun: 00
Vendor: VMWare model: Virtual Disk Rev: 1.0
Type: Direct-access ansi scsi revision: 02
[Root @ linux117 SCSI] # fdisk-l
Disk/dev/SDA: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 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 4699 37640295 8e Linux LVM
Disk/dev/SDB: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device boot start end blocks ID system
/Dev/sdb1 1 65270 524281243 + 83 Linux
Disk/dev/SDC: 231.9 GB, 231928233984 bytes
255 heads, 63 sectors/track, 28197 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk/dev/SDC doesn' t contain a valid Partition Table
[Root @ linux117 SCSI] #
[Root @ linux117 ~] # Vi csdn.txt
[Root @ linux117 ~] # Fdisk-l
Disk/dev/SDA: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 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 4699 37640295 8e Linux LVM
Disk/dev/SDB: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device boot start end blocks ID system
/Dev/sdb1 1 65270 524281243 + 83 Linux
Disk/dev/SDC: 231.9 GB, 231928233984 bytes
255 heads, 63 sectors/track, 28197 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk/dev/SDC doesn' t contain a valid Partition Table
[Root @ linux117 ~] # Fdisk/dev/SDC
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.
The number of cylinders for this disk is set to 28197.
There is nothing wrong with that, but this is larger than 1024,
And coshould in certain setups cause problems:
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): n
Command action
E extended
P primary partition (1-4)
P
Partition Number (1-4): 1
First cylinder (1-28197, default 1 ):
Using default value 1
Last cylinder or + size or + sizem or + sizek (1-28197, default 28197 ):
Using default value 28197
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
[Root @ linux117 ~] # Fdisk-l
Disk/dev/SDA: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 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 4699 37640295 8e Linux LVM
Disk/dev/SDB: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device boot start end blocks ID system
/Dev/sdb1 1 65270 524281243 + 83 Linux
Disk/dev/SDC: 231.9 GB, 231928233984 bytes
255 heads, 63 sectors/track, 28197 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device boot start end blocks ID system
/Dev/sdc1 1 28197 226492371 83 Linux
[Root @ linux117 ~] # Mkf
Mkfifo mkfs. cramfs mkfs. msdos
Mkfontdir mkfs. ACFs mkfs. ext2 mkfs. vfat
Mkfontscale mkfs. ACFs. Bin mkfs. ext3
[Root @ linux117 ~] # Mkfs-T ext3/dev/sdc1
Mke2fs 1.39 (29-may-2006)
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
28311552 inodes, 56623092 Blocks
2831154 blocks (5.00%) reserved for the Super User
First data block = 0
Maximum filesystem blocks = 4294967296
1728 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,
4096000,796 2624, 11239424,204 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.
[Root @ linux117 ~] #
[Root @ linux117 ~] #
[Root @ linux117 ~] # Mkdir/mnt/sdc1
[Root @ linux117 ~] # Chmod 777/mnt/sdc1
[Root @ linux117 ~] # Mount/dev/sdc1/mnt/sdc1
[Root @ linux117 ~] # DF-H
Filesystem size used avail use % mounted on
/Dev/mapper/VolGroup00-LogVol00
28G 22g 4.3g 84%/
/Dev/sda1 99 m 16 m 79 m 17%/boot
Tmpfs 4.9g 1.4G 3.5G 29%/dev/SHM
/Dev/sdc1 213g 188 m 202G 1%/mnt/sdc1