Method 1: ubuntu Disk Management Command
Umount/mnt uninstall
Mount/dev/sda1/mnt loading
Fdisk-l View disk information
Df/boot: check which partition of the boot folder belongs to the disk
Df-h View disk usage
Method 2: ubuntu disk management tool GNOME Disks 3.8.2
GNOME Disks is the default disk and media manager software for Ubuntu. It allows you to perform many operations on the disk, including formatting, status, deep partitioning, and other related practical operations. The interface is friendly and easy to operate.
GNOME Disks 3.8.2 has been logged on to Ubuntu13.10. Through regular updates, features of versions later than version 3.6 are enriched.
A new device is prompted at the top.
Disk format option changed!
Method 3: ubuntu disk management tool gparted
Gparted is a good graphical disk management tool on Ubuntu (installed using "sudo apt-get install gparted"). It is intuitive and easy to use and is suitable for beginners.
1. How to add a new hard disk // 111cn.net
Virtual Machine Setting-> Add-> Hard Disk-> create a new virtual disk->...
After successful addition, start Ubuntu.
1) view hard disk information:
Ray @ ray-ubuntu :~ $ Sudo fdisk-l
[Sudo] password for ray:
Disk/dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0001d2ab
Device Boot Start End Blocks Id System
/Dev/sda1*1 5036 40450048 83 Linux
/Dev/sda2 5037 5222 1489921 5 Extended
/Dev/sda5 5037 5222 1489920 82 Linux swap/Solaris
Disk/dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x00000000
Disk/dev/sdb doesn' t contain a valid partition table
From the display information, two hard disks are available:/dev/sda and/dev/sdb. The corresponding capacity is 42.9G and 10.7G. /Dev/sdb is not partitioned yet.
2) partition/dev/sdb
Ray @ ray-ubuntu :~ $ Sudo fdisk/dev/sdb
WARNING: DOS-compatible mode is deprecated. It's stronugly recommended
Switch off the mode (command 'C') and change display units
Sectors (command 'u ').
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)
Select n to add a new partition. Then select the default settings. Select w, execute the operation, and exit.
Check the hard disk information again.
Ray @ ray-ubuntu :~ $ Sudo fdisk-l
Disk/dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0001d2ab
Device Boot Start End Blocks Id System
/Dev/sda1*1 5036 40450048 83 Linux
/Dev/sda2 5037 5222 1489921 5 Extended
/Dev/sda5 5037 5222 1489920 82 Linux swap/Solaris
Disk/dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x976fd8e8
Device Boot Start End Blocks Id System
/Dev/sdb1 1 1305 10482381 83 Linux
It is confirmed that the new hard disk partition is successful.
2. Partition formatting
Format the file system to ex3.
Ray @ ray-ubuntu:/dev $ sudo mke2fs-j sdb1
[Sudo] password for ray:
Mke2fs 1.41.11 (14-Mar-2010)
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
Stride = 0 blocks, Stripe width = 0 blocks
655360 inodes, 2620595 blocks
131029 blocks (5.00%) reserved for the super user
First data block = 0
Maximum filesystem blocks = 2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs-c or-I to override.
Note: You can also use the command "sudo mkfs. ext3/dev/sdb1" to format the ex3 file system"
Check the partition format:
Ray @ ray-ubuntu :~ $ Sudo df-hT/dev/sdb1
Filesystem Type Size Used Avail Use % Mounted on
/Dev/sdb1 ext3 9.9G 151 M 9.2G 2%/media/sdb1
3. How to automatically mount www.111cn. Net
Before talking about how to automatically mount a disk, let's talk about how to manually mount the disk.
First, create the disk-2 folder in the/media/Directory (of course, you can specify any mount point ):
Ray @ ray-ubuntu:/media $ sudo mkdir disk-2
Ray @ ray-ubuntu:/media $ ls-al
Total 16
Drwxr-xr-x 4 root 4096.
Drwxr-xr-x 22 root 4096 ..
Drwxr-xr-x 2 root 4096 disk-2
Lrwxrwxrwx 1 root 7 2010-08-16 16:34 floppy-> floppy0
Drwxr-xr-x 2 root 4096 2010-08-16 16:34 floppy0
Ray @ ray-ubuntu:/media $ sudo mount/dev/sdb1 disk-2
Ray @ ray-ubuntu:/media $ cd disk-2
Ray @ ray-ubuntu:/media/disk-2 $ ls
Lost + found
In this way, the mount is successful.
1) automatic startup
The script file is/etc/fstab and is added as follows:
# Mount the second hard disk
/Dev/sdb1/media/sdb1 ext3 defaults 0 0
The six parameters are:
<File system> <mount point> <type> <options> <dump> <pass>
The meaning of the first three parameters is obvious.
Options: specify that the file system to load the device is a specific parameter option, multiple parameters are separated by commas. Most systems can use "defaults" to meet their needs.
Other common options include:
Ro loads the file system in read-only mode
Sync does not buffer write operations on the device, which can prevent file system damage during abnormal shutdown, but reduces the computer speed.
User allows normal users to load the file system
Quota forces disk quota limit on this file system
Noauto no longer uses the mount-a command (for example, when the system is started) to load the file system
Dump: This option is used by the "dump" command to check how often a file system should be dumped. If you do not need to dump, set this field to 0.
Pass: This field is used by the fsck command to determine the sequence of the file system to be scanned at startup. The value of the "/" pair of the root file system should be 1, other file systems should be 2. If the file system does not need to scan at startup, set this field to 0.