X
X
X
X

Knowledge Base

HomepageKnowledge BaseProblem of Linuxlinux, /home merges into /root

linux, /home merges into /root

#### 1. View partition
`df -h`

#### 3. Uninstall /home, if it cannot be uninstalled, first terminate the process using the /home file system
`fuser -km /home/`
`umount /home `

#### 4. Delete the lv where /home is located
`lvremove /dev/mapper/centos-home`

#### 5. Expand the root zone, two ways
1). Expand all free capacity to root
`lvextend -l +100%free /dev/mapper/centos-root`

2). Expand the specified capacity to root
`lvextend -L +800G /dev/mapper/centos-root`

#### 6. Extend/root file system
`xfs_growfs /dev/mapper/centos-root`

#### 7. Modify the auto mount file
`vi /etc/fstab`




**Rebuild/home operation*

#### 1. Recreate home lv
`lvcreate -L 10G -n /dev/mapper/centos-home `

#### 2. Create a file system
`mkfs.xfs /dev/mapper/centos-home`

#### 3. Mount home
`mount /dev/mapper/centos-home`

#### 4. Modify the auto mount file
`vi /etc/fstab`

PS: View volume group information: vgdisplay

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(275 times viewed / 0 people found it helpful)

Top