First Use SSH login to the Aliyun server SSH landing software I use putty baidu inside download.
Then use your root account to log in. The command to modify the password is passwd
How to mount the data disk as follows:
The first step is to use fdisk-l to view your hard drive
Shows the following
code is as follows |
copy code |
[root@ay1105190 13348b ~]# fdisk-l disk/dev/hda:53.6 GB, 53687091200 bytes 255 heads, Sectors/track, 6527 cylinders Unit s = Cylinders of 16065 * 8225280 bytes Device Boot Start end Blocks Id System /dev/hda1 * 1 6004 48227098+ 8 3 Linux /dev/hda2 6005 6526 4192965 up Linux swap/solaris disk/dev/xvdb:96.6 GB, 96636764160 bytes 255 hea DS, 11748 cylinders Units = cylinders of 16065 * sectors/track = 8225280 bytes Device Boot Start End block s Id System /dev/xvdb1 1 11748 94365778+ Linux |
The red hard drive is the one we want to mount.
Mount by using the Mount command
The code is as follows |
Copy Code |
[root@ay110519013348b ~]# Mount/dev/xvdb1/home |
Note:/DEV/XVDB1 for the disk you want to mount (the/DEV/XVDB1 here must be the same as the one you see above using the Fdisk-l command, or it will mount failure)/home is the directory to be mounted general website data is stored in/home/wwwroot
Finally, use the Mount command to see if the mount is successful
The code is as follows |
Copy Code |
[root@ay110519013348b ~]# Mount /DEV/HDA1 on/type ext3 (rw) Proc On/proc type proc (rw) Sysfs On/sys type SYSFS (rw) Devpts on/dev/pts type devpts (rw,gid=5,mode=620) Tmpfs ON/DEV/SHM type TMPFS (rw) None On/proc/sys/fs/binfmt_misc type Binfmt_misc (rw) Sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) /DEV/XVDB1 on/home type ext3 (rw) |
The reboot will disappear automatically when the above command is mounted. The following I introduce is let it boot automatically mount.
Type command after root login vi/etc/fstab
At the bottom, add an article
The code is as follows |
Copy Code |
/dev/xvdb1/home ext3 defaults 1 1 |
Save exit
Here will not use VI for editing friends can use the WinSCP software to modify, and FTP as
Note the space, and the boot mounted data disk must be carefully checked
Finally, by the way, mount the mobile data hard disk method
The code is as follows |
Copy Code |
#查看分区情况: # fdisk-l disk/dev/sda:250.0 GB, 250059350016 bytes 255 heads, Sectors/track, 30401 cylinders Units = Cylinders of 16065 * 8225280 bytes Device Boot Start End Blocks Id System /DEV/SDA1 1 7904 63488848+ 7 hpfs/ntfs /dev/sda2 7905 11983 32764567+ C Win95 FAT32 (LBA) #这个就是我的移动硬盘分区 /dev/sda3 * 11984 16062 32764567+ c Win95 FAT32 (LBA) #这个就是我的移动硬盘分区 /DEV/SDA4 16063 30401 115178017+ f Win95 Ext ' d (LBA) /dev/sda5 16063 30401 115177986 7 hpfs/ntfs disk/dev/hda:160.0 GB, 160041885696 bytes 255 heads, Sectors/track, 19457 cylinders Units = Cylinders of 16065 * 8225280 bytes Device Boot Start End Blocks Id System /DEV/HDA1 * 1 104391 Linux /dev/hda2 268 2048287+ Linux Swap /dev/hda3 MB 19457 154135642+ Linux #挂载: # MKDIR/MNT/USB1 # MKDIR/MNT/USB1 # MOUNT/DEV/SDA2/MNT/USB1 # MOUNT/DEV/SDA3/MNT/USB2 |