linux-241:/opt # fdisk -l

提示有些盘符错误

113746883.png

113858927.png


这是因为装系统时没有分好区,只要重新分区后挂载就行


重新分/dev/dm-2的分区


linux-241:/opt # fdisk /dev/dm-2
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 24354.
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): 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 cylinder (1-24354, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-24354, default 24354):
Using default value 24354
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 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
linux-241:/opt # mount /dev/dm-2 /opt/
linux-241:/opt # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/system_30811-LogVol1
                      3.0G  1.2G  1.9G  39% /
udev                  2.0G  160K  2.0G   1% /dev
/dev/sda2             204M   47M  158M  23% /boot
/dev/mapper/system_30811-LogVol3
                      187G  2.1G  185G   2% /usr
/dev/mapper/system_30811-LogVolHome
                       95G  120M   95G   1% /home
/dev/dm-3              95G  120M   95G   1% /data
/dev/dm-2             187G  2.1G  185G   2% /opt
linux-241:/opt #


查看结果

linux-241:/opt # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/system_30811-LogVol1
                      3.0G  1.2G  1.9G  39% /
udev                  2.0G  160K  2.0G   1% /dev
/dev/sda2             204M   47M  158M  23% /boot
/dev/mapper/system_30811-LogVol3
                      187G  2.1G  185G   2% /usr
/dev/mapper/system_30811-LogVolHome
                       95G  120M   95G   1% /home
/dev/dm-3              95G  120M   95G   1% /data
/dev/dm-2             187G  2.1G  185G   2% /opt
linux-241:/opt #




淘宝小店

http://shop62632578.taobao.com/