Hello, I am getting low on space in my /(root) partition. I have 23GB free. I have 350GB in my /home partition. I am the only user. I was experimenting with virtualization and it causes the root partition to get very low. I would like to move /var from the root partition, to the same partition as /home, if that's safe to do. Or, resize /home and add another partition for /var I also don't want to screw the pooch doing it. This is over my head. The more I read about it, the more confused I get. TIA
On 09/25/2016 11:47 AM, TE Dukes wrote:> Hello, > > I am getting low on space in my /(root) partition. I have 23GB free. > > I have 350GB in my /home partition. I am the only user. > > I was experimenting with virtualization and it causes the root partition to > get very low. I would like to move /var from the root partition, to the same > partition as /home, if that's safe to do. > > Or, resize /home and add another partition for /var > > I also don't want to screw the pooch doing it. > > This is over my head. The more I read about it, the more confused I get.The way I've been doing it for quite some time is to make /var a separate partition, put the home directories on /var/home, and then bind-mount /var/home on /home. In /etc/fstab that's: /var/home /home none bind 0 0 To keep SELinux happy, you need to set up an equivalence of /var/home to /home: semanage fcontext -a -e /home /var/home It's all completely transparent in the running system. The only time I have to remember that it's set up that way is when I'm looking in my backups and need to know that home directories are backed up as part of /var. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
On 25/09/16 18:03, Robert Nichols wrote:> On 09/25/2016 11:47 AM, TE Dukes wrote: >> Hello, >> >> I am getting low on space in my /(root) partition. I have 23GB free. >> >> I have 350GB in my /home partition. I am the only user. >> >> I was experimenting with virtualization and it causes the root >> partition to >> get very low. I would like to move /var from the root partition, to >> the same >> partition as /home, if that's safe to do. >> >> Or, resize /home and add another partition for /var >> >> I also don't want to screw the pooch doing it. >> >> This is over my head. The more I read about it, the more confused I get. > > The way I've been doing it for quite some time is to make /var a > separate partition, put the home directories on /var/home, and then > bind-mount /var/home on /home. In /etc/fstab that's: > > /var/home /home none bind 0 0 > > To keep SELinux happy, you need to set up an equivalence of /var/home > to /home: > > semanage fcontext -a -e /home /var/home > > It's all completely transparent in the running system. The only time I > have to remember that it's set up that way is when I'm looking in my > backups and need to know that home directories are backed up as part > of /var. >Alternatively create /home/VM and keep the virtualised disks in there. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20160925/1f374955/attachment-0001.sig>
> -----Original Message----- > From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On > Behalf Of Robert Nichols > Sent: Sunday, September 25, 2016 1:03 PM > To: centos at centos.org > Subject: Re: [CentOS] How to move /var to another partition > > On 09/25/2016 11:47 AM, TE Dukes wrote: > > Hello, > > > > I am getting low on space in my /(root) partition. I have 23GB free. > > > > I have 350GB in my /home partition. I am the only user. > > > > I was experimenting with virtualization and it causes the root > > partition to get very low. I would like to move /var from the root > > partition, to the same partition as /home, if that's safe to do. > > > > Or, resize /home and add another partition for /var > > > > I also don't want to screw the pooch doing it. > > > > This is over my head. The more I read about it, the more confused I get. > > The way I've been doing it for quite some time is to make /var a separate > partition, put the home directories on /var/home, and then bind-mount > /var/home on /home. In /etc/fstab that's: > > /var/home /home none bind 0 0 > > To keep SELinux happy, you need to set up an equivalence of /var/home to > /home: > > semanage fcontext -a -e /home /var/home > > It's all completely transparent in the running system. The only time Ihave to> remember that it's set up that way is when I'm looking in my backups and > need to know that home directories are backed up as part of /var. > > -- > Bob Nichols "NOSPAM" is really part of my email address. > Do NOT delete it.[Thomas E Dukes] Thanks, Bob!!