Hi,
Quote:
Originally Posted by nullp0inter
Code:
[root@XXXX]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 7.9G 1.5G 85% /
/dev/sda2 335G 5.6G 313G 2% /mnt
none 874M 0 874M 0% /dev/shm
I am constantly trying to clear out files on /dev/sd1 to stop MySQL from running out of space. How can I tap into all that free space on /dev/sda2? I would love to split the partition up better i.e. give /dev/sda1 more free space.
|
I would make sure to have a backup of everything that you value on the machine before doing anything else. Backup!
I would not perform any maintenance on a Live machine. You may need to schedule downtime to do some regeneration. Seems like you need to do it real soon.
Once you have the machine then boot with the install media or a LiveCD. Shrink the partition on '/dev/sda2' with 'parted' or whatever but allow some space for the '/mnt' since for some reason someone allocated that space originally.
Once you have the partition shrunk to the desired size then you can use 'parted', cfdisk or even fdisk to create partitions for your use. Make sure that you allow for growth. Once you have created the new partition an prepared a filesystem on that partition, you can then copy or move contents to the new partition. Once this is done then you could mount the '/dev/sda?' on the mount point you desire/use. If you do 'cp' then be certain to preserve everything with the '-p' option. 'man cp' to see the details.
On most servers that I maintain, partitions are created in the manner to allow growth and prevention of floods so the system won't be taken down. Sometimes multiple hdd/subsystems are used to allow good partitioning schemes for both prevention for loss of space problems and other potential problems.
You are aware of other filesystem types?