I. BACKGROUND
We have the Ubuntu Server 12.04 version installed on our servers, and because of the development environment, we have no centeos or red Hat, and we have a few big hard drives that need to be mounted to the root directory, which is not the same as Windows.
A single machine mount method can refer to: Under the Ubuntu12 mounted hard disk (9TB), if we need to install N machine, we have any good way? Is it impossible to install a single one? No, the shell can help you at this time.
Second, Mount detailed command
1. Check the disk information first
ls/dev/sd*
/dev/sda/dev/sda2/dev/sdb/dev/sdc/dev/sdd/dev/sde/dev/sdf
/dev/sda1/dev/sda5/dev/sdb1/dev/sdc1/dev/sdd1/dev/sde1/dev/sdf1
2. Format
sudo mkfs.ext4/dev/sdb1
sudo mkfs.ext4/dev/sdc1
sudo mkfs.ext4/dev/sdd1
sudo mkfs.ext4/dev/sde1
sudo mkfs.ext4/dev/sdf1
3. Create PV
sudo pvcreate/dev/sdb1
sudo pvcreate/dev/sdc1
sudo pvcreate/dev/sdd1
sudo pvcreate/dev/sde1
sudo pvcreate/dev/sdf1
4. Query the volume of the situation, obtain the VG name
sudo vgdisplay
VG Name UBUNTU1
5. Join VG (note the VG name obtained by using the query)
sudo vgextend ubuntu1/dev/sdb1
sudo vgextend UBUNTU1/DEV/SDC1
sudo vgextend ubuntu1/dev/sdd1
sudo vgextend ubuntu1/dev/sde1
sudo vgextend ubuntu1/dev/sdf1
6. Obtain available PE size (free PE)
sudo vgdisplay
Alloc pe/size 471797/1.80 TiB
Free Pe/size 1912136/7.29 TiB
7. Get LV Name
sudo lvdisplay
LV Name/dev/ubuntu1/root
8. Add LV
sudo lvextend-l+1912136/dev/ubuntu1/root
9. Modify Capacity
sudo resize2fs/dev/ubuntu1/root
10. View Effects
Df–h
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/