![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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 Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 60801 488384001 83 Linux Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104391 83 Linux /dev/sdb2 14 2624 20972857+ 83 Linux /dev/sdb3 2625 4582 15727635 83 Linux /dev/sdb4 4583 19457 119483437+ 5 Extended /dev/sdb5 4583 4713 1052226 82 Linux swap /dev/sdb6 4714 4844 1052226 83 Linux /dev/sdb7 4845 19457 117378891 83 Linux Code:
du --max-depth 1 16828 ./sbin 16 ./lost+found 8 ./misc 299480 ./root 0 ./sys 12736 ./tmp 10429532 ./var 3945384 ./usr 18020 ./etc 920885 ./proc 4346884 ./backup 8068 ./scripts 8 ./selinux 152 ./dev 8 ./opt 21593880 ./home 82526980 ./img1 <-- this is the folder in question 8 ./media 8 ./initrd 55576 ./lib 5772 ./bin 8 ./mnt 8 ./srv 5293 ./boot 124185642 . 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:
Main >> Disk Drives >> Format/Mount a new Hard Drive Disk Setup Found Disk: sda [Partition,Format and Mount] ALL DATA WILL BE LOST
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Join Date: Nov 2007
Posts: 20
|
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.
__________________
Linux Server Management - AdminGeekZ.com Is your website Sluggish? Unavailable? Insecure? Why not call us? United Kingdom(Toll Free): 0800 8620073 // United States: 585 563 1729 // Australia: 02 9037 2448 // International: +44.1412800134 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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...
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Join Date: Nov 2007
Posts: 20
|
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.
__________________
Linux Server Management - AdminGeekZ.com Is your website Sluggish? Unavailable? Insecure? Why not call us? United Kingdom(Toll Free): 0800 8620073 // United States: 585 563 1729 // Australia: 02 9037 2448 // International: +44.1412800134 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
Here is what is in my fstab:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details LABEL=/ / ext3 defaults,usrquota 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=/tmp /tmp ext3 defaults 1 2 LABEL=/usr /usr ext3 defaults,usrquota 1 2 LABEL=/var /var ext3 defaults,usrquota 1 2 LABEL=SWAP-sda5 swap swap defaults 0 0 #/dev/sda1 /img1 ext2 defaults,usrquota 1 2
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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...
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Join Date: Nov 2007
Posts: 20
|
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
__________________
Linux Server Management - AdminGeekZ.com Is your website Sluggish? Unavailable? Insecure? Why not call us? United Kingdom(Toll Free): 0800 8620073 // United States: 585 563 1729 // Australia: 02 9037 2448 // International: +44.1412800134 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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.
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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...
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Registered User
Join Date: Nov 2007
Posts: 20
|
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.
__________________
Linux Server Management - AdminGeekZ.com Is your website Sluggish? Unavailable? Insecure? Why not call us? United Kingdom(Toll Free): 0800 8620073 // United States: 585 563 1729 // Australia: 02 9037 2448 // International: +44.1412800134 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
|
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.
__________________
www.gimmiegirlproductions.com |
![]() |
![]() ![]() ![]() ![]() ![]() |