The company hard disk is not enough, the new buy a storage, need to mount to the current system. The previous steps do not say, operation and maintenance of all, is nothing more than hardware and network that set, here only say assigned to me after the Linux how to mount.
The steps are as follows:
1. See if you have assigned
[Email protected] home]# fdisk-L Disk/DEV/SDA:64.4GB,64424509440Bytes125829120a Sector units= Sector of1* += +bytes Sector size (logical/physical): +bytes +byte i/o Size (min/Best): +bytes +byte disk label type: DOS disk identifier:0X000A47ADdevice Boot Start End Blocks Id System/DEV/SDA1 *2048 1026047 512000 theLinux/dev/sda21026048 125829119 624015368e Linux LVM disk/DEV/SDB:1649.3GB,1649267441664Bytes3221225472a Sector units= Sector of1* += +bytes Sector size (logical/physical): +bytes +byte i/o Size (min/Best): +bytes +Bytes
2, found a disk, the path is/DEV/SDB. Then use the FDISK command to create the partition
[Email protected] home]# Fdisk/dev/sdb
The Fdisk command is as follows:
command (input m for help): M command operation a toggle a bootable flag B edit BSD Disklabel c toggle the DOS compatibility flag D Delete a partition g create aNewempty GPT partition table G Create an IRIX (SGI) partition table l list known partition types M print ThisMenu N Add aNewpartition o Create aNewempty DOS partition table p print the partition table Q quit without saving changes s create aNewempty Sun disklabel t change a partition's System IDU Change display/Entry Units v Verify the partition Table W write table to disk and exit X extra functionality (experts onl Y)
3, then create a new partition (I am here because I want to store a large database file, so the logic is all a partition)
command (enter M for help): Npartition Type:p Primary (0Primary0Extended4Free ) e Extendedselect (defaultp): Usingdefaultresponse P-Partition area code (1-4Default1): Start Sector (2048-3221225471, the default is2048): Default value will be used2048Last sector,+ Sector or +size{k,m,g} (2048-3221225471, the default is3221225471): Default value will be used3221225471Partitioning1Set to Linux type, size set to1.5TiB
4. Last Save partition
command (enter M for help): Wthe partition table has been altered! calling IOCTL () to re-read partition table. Synchronizing disks.
5, using the fdisk-l command to view, has been partitioned
Disk/dev/sdb:1649.3GB,1649267441664Bytes3221225472a Sector units= Sector of1* += +bytes Sector size (logical/physical): +bytes +byte i/o Size (min/Best): +bytes +byte disk label type: DOS disk identifier:0xe0bc0098device Boot Start End Blocks Id System/dev/sdb12048 3221225471 1610611712 theLinux
6. After the partition is built, the partition should be formatted and the file system will be established.
[Email protected] home]# mkfs.xfs-f/dev/SDSDA sda1 sda2 sdb sdb1 [[email protected] home]# MKFS.XFS-f/dev/Sdb1meta-DATA=/DEV/SDB1 isize= theAgcount=4, agsize=100663232Blks= sectsz= +Attr=2, projid32bit=1= crc=0finobt=0Data= bsize=4096blocks=402652928, imaxpct=5= sunit=0Swidth=0blksnaming=version2Bsize=4096Ascii-ci=0Ftype=0Log=InternalLog bsize=4096blocks=196607, version=2= sectsz= +sunit=0Blks, lazy-count=1Realtime=none extsz=4096blocks=0, rtextents=0
7, so the file system is built, and then select a mount point to hang on it, I hung up under the/home/data/
[Email protected] home]# mount/dev/sdb1/home/data/
8. Check if the mount is successful
[[email protected] home]# df-th/home/data/ file system type capacity has been used with available % mount point /dev/sdb1 XFS 1. 7T 34M 1. 7T 1/home/data
9, modify the system configuration add the following line to/etc/fstab, let the system automatically mount after startup, otherwise it may fall
/DEV/SDB1 /home/data xfs defaults 0 0
Linux under Disk mount