Last time I split the partition, so this time I will use the split partition!
Setting items ① Mount (2) Capacity limit for each user ③ Authority setting ④ Symbolic link setting at mount point
Mount / dev / sda5 of the extended area that was divided last time in the following order.
[root@localhost ~]# fdisk -l
・ ・ ・
・ ・ ・ Abbreviation
・ ・ ・
Device Boot Start End Blocks Id System
/dev/sda1 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 8390655 3145728 5 Extended
/ dev / sda5 2101248 4198399 1048576 83 Linux ← This
Check the current mount status. Execute the mount command as it is.
[root@localhost ~]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
・ ・ ・
・ ・ ・ Abbreviation
・ ・ ・
# / Dev / sda5 is missing
/dev/sda1 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
Make a backup first.
[root@localhost ~]# cp -p /etc/fstab /etc/fstab.bak
[root@localhost ~]# vi /etc/fstab
Added / dev / sda5 / home2 ext4 defaults 1 2
to the end of the line.
** Meaning of each item ** / dev / sda5 ・ ・ ・ Device file name to mount / home2 ・ ・ ・ Directory to connect with / dev / sda5 (absolute path) ext4 ・ ・ ・ File system type (reiserfs, xfs, etc.) defaults ・ ・ ・ Mount options are default 1 ... Whether backup is required (1: required, 2: unnecessary) 2 ... Order when checking with the fsck command
/etc/fstab
Created by anaconda on Sat Jun 1 17:13:31 2019
Accessible filesystems, by reference, are maintained under '/dev/disk'
See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
UUID=8ac075e3-1124-4bb6-bef7-a6811bf8b870 / xfs defaults 0 0
/swapfile none swap defaults 0 0
/ dev / sda5 / home2 ext4 defaults 1 2 ← Add here
Since the mount destination directory / home2 was not created, create it and execute the mount command.
[root@localhost ~]# mkdir /home2
[root@localhost ~]# mount -a
mount: special device /dev/sda5 does not exist
that? It is said that there is no such thing. But it comes out with fdisk -l
, so check the device file.
[root@localhost ~]# ls /dev/sda*
/dev/sda /dev/sda1
There is no device file. After restarting, I thought that the device file would not be created and restarted.
[root@localhost ~]# systemctl reboot
grub rescue>
e!
The OS has stopped booting ... When I tried to start the PC, I got impatient with "unknown file system" Not fixed. Upon further investigation, I found an article in the same situation as myself. Apparently, boot the OS via USB or DVD and reinstall the OS. I'm using a virtual machine this time, so I decided to vagrant up again.
$ vagrant status
Current machine states:
Erase this
default poweroff (virtualbox)
The VM is powered off. To restart the VM, simply run `vagrant up`
$ vagrant destroy ← Delete
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
7$ vagrant status
Current machine states:
Deleted
default not created (virtualbox)
$ vagrant up ← up again
I went back to the beginning ... Next time I want to complete ① to ④! !!
Recommended Posts