Linux盘阵挂载

[root@dg1 ~]# fdisk -l -u

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    62910539    31350847+  8e  Linux LVM

Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders, total 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes

Disk /dev/sdb doesn't contain a valid partition table
[root@dg1 ~]# df -ah
文件系统              容量  已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
                       22G   18G  2.9G  87% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 2.9G  1.4G  1.5G  48% /dev/shm
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
sunrpc                   0     0     0   -  /var/lib/nfs/rpc_pipefs

[root@dg1 ~]# fdisk -u /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): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-6291455, default 63): 
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-6291455, default 6291455): 
Using default value 6291455

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@dg1 ~]# fdisk -ul

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    62910539    31350847+  8e  Linux LVM

Disk /dev/sdb: 3221 MB, 3221225472 bytes
160 heads, 24 sectors/track, 1638 cylinders, total 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     6291455     3145696+  83  Linux

[root@dg1 ~]# ll /dev/sd*
brw-r----- 1 root disk 8,  0 06-05 11:07 /dev/sda
brw-r----- 1 root disk 8,  1 06-05 11:07 /dev/sda1
brw-r----- 1 root disk 8,  2 06-05 11:07 /dev/sda2
brw-r----- 1 root disk 8, 16 06-05 11:14 /dev/sdb
brw-r----- 1 root disk 8, 17 06-05 11:15 /dev/sdb1
brw-r----- 1 root disk 8, 18 06-05 11:16 /dev/sdb2
brw-r----- 1 root disk 8, 19 06-05 11:16 /dev/sdb3
brw-r----- 1 root disk 8, 20 06-05 11:16 /dev/sdb4
[root@dg1 ~]# df -ah
文件系统              容量  已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
                       22G   18G  2.9G  87% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 2.9G  1.4G  1.5G  48% /dev/shm
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
sunrpc                   0     0     0   -  /var/lib/nfs/rpc_pipefs
[root@dg1 ~]# fdisk -ul

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    62910539    31350847+  8e  Linux LVM

Disk /dev/sdb: 3221 MB, 3221225472 bytes
160 heads, 24 sectors/track, 1638 cylinders, total 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     6291455     3145696+  83  Linux
[root@dg1 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
393216 inodes, 786424 blocks
39321 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@dg1 ~]# df -ah
文件系统              容量  已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
                       22G   18G  2.9G  87% /
proc                     0     0     0   -  /proc
sysfs                    0     0     0   -  /sys
devpts                   0     0     0   -  /dev/pts
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 2.9G  1.4G  1.5G  48% /dev/shm
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
sunrpc                   0     0     0   -  /var/lib/nfs/rpc_pipefs

[root@dg1 ~]# fdisk -lu

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    62910539    31350847+  8e  Linux LVM

Disk /dev/sdb: 3221 MB, 3221225472 bytes
160 heads, 24 sectors/track, 1638 cylinders, total 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     6291455     3145696+  83  Linux

[root@dg1 ~]# mkdir /oa
[root@dg1 ~]# cd /oa
[root@dg1 oa]# touch oa.sh
[root@dg1 oa]# cd ..
[root@dg1 /]# mount /dev/sdb1 /oa
[root@dg1 /]# df -a -Th
文件系统      类型    容量  已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
              ext3     22G   18G  2.9G  87% /
proc          proc       0     0     0   -  /proc
sysfs        sysfs       0     0     0   -  /sys
devpts      devpts       0     0     0   -  /dev/pts
/dev/sda1     ext3     99M   13M   82M  14% /boot
tmpfs        tmpfs    2.9G  1.4G  1.5G  48% /dev/shm
none   binfmt_misc       0     0     0   -  /proc/sys/fs/binfmt_misc
sunrpc  rpc_pipefs       0     0     0   -  /var/lib/nfs/rpc_pipefs
/dev/sdb1     ext3    3.0G   69M  2.8G   3% /oa
 

你可能感兴趣的:(linux,运维,服务器)