Dear all
I have a server where i'm running mysql and postgresql databases based on CentOS 6.8 x86_64. the problem is that the /var directory (where those db are running) is mounted on a 50Gb partition which already full (95%). So, i'm looking for a way to move the content of this partition to a new bigger one where i can remount /var directory. There are 300Gb space free remaining on my HDD and it's a RAID1 disk.
Thanks for your help.
How to backup and restore a RAID1 partition on CentOS 6
-
- Posts: 2
- Joined: 2018/01/01 12:42:58
How to backup and restore a RAID1 partition on CentOS 6
- Attachments
-
- disk space.jpg (162.85 KiB) Viewed 1267 times
-
- Disk utility 1.jpg (135.69 KiB) Viewed 1267 times
Re: How to backup and restore a RAID1 partition on CentOS 6
Just think how easy this would've been if you'd used LVM... you could've umounted /home, resize2fs'ed the filesystem on it to a smaller amount, lvresized the LV then lvresize -r'ed your /var. Done.
You don't seem to be using your /dev/md126p7 at all. Perhaps you can delete that (and lose whatever its contents are) and then extend your /dev/md126p6 into it by changing the ending sector number and then resize2fs the filesystem on top of it. If md126p7 is swap then you probably don't need 16GB of it anyway...
You don't seem to be using your /dev/md126p7 at all. Perhaps you can delete that (and lose whatever its contents are) and then extend your /dev/md126p6 into it by changing the ending sector number and then resize2fs the filesystem on top of it. If md126p7 is swap then you probably don't need 16GB of it anyway...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2
- Joined: 2018/01/01 12:42:58
Re: How to backup and restore a RAID1 partition on CentOS 6
md126p7 is a swap partition.
Can i just delete it and relocate it in a new partition that i'll create from the free space, and extend my md126p6 partition on that space ?
Can i just delete it and relocate it in a new partition that i'll create from the free space, and extend my md126p6 partition on that space ?
Re: How to backup and restore a RAID1 partition on CentOS 6
You may be able to extend the partition by using GParted Live.
Whatever you end up doing, I strongly suggest that you run a (full) backup.
Whatever you end up doing, I strongly suggest that you run a (full) backup.
Re: How to backup and restore a RAID1 partition on CentOS 6
You could do the following:
Place /var on your / partition, ie /dev/md126p4), which has 174Gb free.
Mount /var/log on the partition which is currently filling up (ie /dev/md126p6).
Just a thought.
Place /var on your / partition, ie /dev/md126p4), which has 174Gb free.
Mount /var/log on the partition which is currently filling up (ie /dev/md126p6).
Just a thought.
Re: How to backup and restore a RAID1 partition on CentOS 6
Basically, yes. You'll need to swapoff it first, remove it from fstab and add it back later after recreating it and use mkswap on the new partition/LV then add it back to fstab and use swapon -a to activate it to test that it works.md126p7 is a swap partition.
Can i just delete it and relocate it in a new partition that i'll create from the free space, and extend my md126p6 partition on that space ?
If you use fdisk -lu to list the existing partitions, that will include the exact starting sector number of each partition. You'll need to delete and redefine /dev/md126p6 so that it starts on the exact same sector number and ends on the newer (larger) one. Save that when you're happy, reboot then you can resize2fs the filesystem that's on that partition.
Since this is dangerous, backups are recommended.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke