官术网_书友最值得收藏!

6.4 Mounting the New Partition

Next, we need to mount the new partition. In this example we will mount it in a directory named /data. You are free, however, to mount the new partition using any valid mount point you desire or to use it as part of a logical volume (details of which are covered in the chapter entitled “Adding a New Disk to an Ubuntu Volume Group and Logical Volume”). First we need to create the directory to act as the mount point:

# mkdir /data

Secondly, we need to edit the mount table in /etc/fstab so that the partition is automatically mounted each time the system starts. At the bottom of the /etc/fstab file, add the following line to mount the new partition (modifying the /dev/sda1 device to match your environment):

/dev/sda1 /data xfs defaults 0 0

Finally, we can manually mount the new partition (note that on subsequent reboots this will not be necessary as the partition will automount as a result of the setting we added to the /etc/fstab file above).

# mount /data

To check the partition, run the following command to display the available space:

# df -h /data

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 29G 62M 29G 1% /data

主站蜘蛛池模板: 昔阳县| 江城| 遂平县| 肇源县| 津南区| 贵阳市| 沾益县| 耿马| 和静县| 斗六市| 寿光市| 历史| 崇信县| 高密市| 广东省| 东港市| 牡丹江市| 嘉荫县| 牟定县| 贞丰县| 本溪市| 额敏县| 珠海市| 双桥区| 十堰市| 佛教| 海晏县| 湘阴县| 新疆| 务川| 邵东县| 怀仁县| 伊春市| 沅江市| 上栗县| 嫩江县| 罗城| 淳安县| 秦皇岛市| 安西县| 崇礼县|