![]() |
Mounting harddrives - help needed
I bought a new 500 GIG harddrive for my server and installed it, formatted it an mounted it at /img1. My script now saves all image data to /img1
...I think... You see, it now says the harddrive is 100% full. How can I confirm that I did it correctly? Somehow I think I have not mounted the /img1 folder to the 500gig harddrive. Somehow I suspect the /img1 folder is really on the main 160GB harddrive and that the new 500G harddrive is not being used. How can I confirm that the /img1 folder is really my new 500 gig harddrive and not simply a folder on the old drive? Code:
fdisk -l Code:
du --max-depth 1 I really really want to click the button to [Partition,Format and Mount], but I think I already did this when I mounted the drive to /img1. I obviously don't want to lose my data. Code:
|
df -h will show if it is mounted or not.
Looking at the space from the du it's unlikely that it's mounted but before you mount it i'd suggest you rename the current /img1 directory to something like /img1.old then mkdir /img1 and mount /dev/sda1 /img1 Then copy the contents from /img1.old -> /img1 using something like rsync -av /img1.old/ /img/1 Then you can delete /img1.old otherwise the data you have already copied till now will not be on the new drive. Secondly you will want to add your new drive to /etc/fstab so it mounts on boot. |
Is it possible that the img1 directory has been mounted already, but was not added to fstab so it is mounted again at boot?
As you can see I don't really understand the process well enough to experiment with my data... |
It is possible it was mounted and you rebooted and it's not mounted anymore.
You have data in your /img1 directory just now hence why I mentioned to copy it before mounting. |
Here is what is in my fstab:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details |
I notice the last line in fstab, where it is commented out.
Would that have been done by "fstab-sync"? It appears so. Don't know what that program is. I think am ready to try renaming the folder then mounting it. I just want to make 100% sure this is right... |
To make it easier, open /etc/fstab and uncomment the line
#/dev/sda1 /img1 ext2 defaults,usrquota 1 2 Then run mv /img1 /img.old mkdir /img1 mount /img1 rsync -av /img.old/ /img1/ Then that's you done, you can verify your data is fine and copied then remove /img.old |
Ok I will try that. Thanks. I hate it when my server is not 3 feet from my desk and I can't just pop in another harddrive, copy it over then, then experiment like crazy.
l will post results. Thanks. |
mount /img1
This command says mount: wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted file systems I suspect this suggests that it is not even formatted... |
Quote:
mkfs.ext3 /dev/sda1 You may however want to double check you have never had any data on it (and it's not just corrupt, but the chances of that are minimal so formatting would be the right choice) then repeat the steps above. |
Thanks. It in fact never had data on it, and I formatted it and mounted it correctly.
...I think... Now du does show that I have 160G + 500G of space, and that the 500 is mapped to /img1. I can't believe that I had a 500G harddrive installed for almost a year and it wasn't being used. Thanks for the unix help. I need to stick to PHP. |
All times are GMT -7. The time now is 09:36 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123