linux mount new hard disk process sharing
- 2020-05-07 20:49:50
- OfStack
fdisk � l
----------------------------------------------------------------------------
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000af383
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1244 9992398+ 83 Linux
/dev/sda2 1245 1305 489982+ 5 Extended
/dev/sda5 1245 1305 489951 82 Linux swap / Solaris
Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
----------------------------------------------------------------------------
1
I see that the newly added disk is /deb/sdb, but there is no partition table yet
3. The partition
fdisk /dev/sdb
There are a lot of options, so m
Then select n
Then select p
And then choose 1
And then there are two options
First Cylinder(1-1014,default 1):
Last cylindet or +siza or +sizeM or +sizeK:
I selected the default, then entered w, save, exit
4. Format the partition
sudo mkfs -t ext3 /dev/sdb1
5. Mount the partition
sudo mkdir /www // Create a new mount point , loading matlab with
sudo mount /dev/sdb1 /www
sudo df
6. Boot and mount automatically
vi /etc/fstab // Modify this file, or use gedit Will do
Then add it to the end
dev/sdb1 /www ext3 defaults 1 2
This way, you can mount www!