LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2002, 08:51 PM   #1
finger51
LQ Newbie
 
Registered: Aug 2002
Posts: 22

Rep: Reputation: 15
extra hard drive


Howdie~

I have SuSE 8.0 installed. When I installed this OS there were two identical hard drives. KDiskFree reports /dev/hdi2 as / and /dev/hdk2 as 'data1'

so this tells me hdi2 is my system and hdk2 is data1 (not sure what this means exactly)

when I use Konquerer to navigate around root, I see data1 in the directory tree and when I go into it it has the same root directory structure. I didn't think much of it since I had two 40 gig drives- so I just ignored it.

Well, I'm steadily running out of space and would like to use the second drive. I have noticed that none of the programs I've installed to /home/user show up in data1. So the question is- can I just delete everything in data1 and use it as a storage drive?

Also-

any recommendations for a backup utility? What directories need to be backed up? I used to like using ghost when I was windowing. I know I can use it still but I'm not sure which directories to backup besides /home and /usr?
I used to keep all the system files on one partition, programs on another and a storage partition. I could back up my c:\ to a CDR and just re-image whenever something went wrong. What should I do in the linux world?

thanks

Last edited by finger51; 09-20-2002 at 09:03 PM.
 
Old 09-21-2002, 11:19 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
first you need a place to put whatever is there

It sounds like you are saying it's your / folder, you cannot just delete what's there


look at this

[root@Micro Office]# mount
/dev/hda7 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
devfs on /dev type devfs (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /dev/shm type tmpfs (rw)
/dev/hda5 on /mnt/windows type ntfs (rw,iocharset=iso8859-1)
/dev/hda1 on /mnt/windows_c type ntfs (rw,iocharset=iso8859-1)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0664,devgid=43)




see where it says /dev/hda7 is mounted on /

in the first line

this means that / (called the root folder) is on the partition that's /dev/hda7

you need to look at that and see where the partition you want to use is mounted.

you can also look at /etc/fstab

[root@Micro Office]# cat /etc/fstab
/dev/hda7 / ext3 noatime 1 1
none /dev/pts devpts mode=0620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,umask=0,exec,codepage=850,ro,noauto 0 0
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,umask=0,sync,exec,codepage=850,user,auto 0 0
/dev/hda5 /mnt/windows_d ntfs iocharset=iso8859-1 0 0
/dev/hda1 /mnt/windows_c ntfs iocharset=iso8859-1 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0




It sounds like you have several partitions mounted, probably
/
/usr
/var
/home


you need to decide how you want it split up on the free drive, then you can partition the free drive the way you want, format it, mount it on your system and copy everything over to the proper folders on it.

then you would change /etc/fstab

make any changes needed in the /etc/lilo.conf file and run lilo


I would make sure I had a working boot disk first

then just setup the empty drive for the system the way you want it

then copy files over to it, you don't need to copy /proc/ just have it an empty folder


this is probably not something for a beginner to try

However if you post your fstab file and the output of mount then maybe you could just move a partition or two somewhere without moving everything

also post the output of df
[root@Micro root]# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda7 7684844 4275728 3018740 59% /
none 127724 0 127724 0% /dev/shm
/dev/hda5 3076412 1993064 1083348 65% /mnt/windows_d
/dev/hda1 8393928 7385172 1008756 88% /mnt/windows_c
 
Old 09-22-2002, 12:41 PM   #3
finger51
LQ Newbie
 
Registered: Aug 2002
Posts: 22

Original Poster
Rep: Reputation: 15
Hey~

thanks for the response.

fstab:

/dev/hdi2 / reiserfs defaults 1 2
/dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0
/dev/cdrecorder1 /media/cdrecorder1 auto ro,noauto,user,exec 0 0
/dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0
/dev/hdk2 /data1 auto noauto,user 0 0
devpts /dev/pts devpts defaults 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
proc /proc proc defaults 0 0
usbdevfs /proc/bus/usb usbdevfs noauto 0 0
/dev/hdi1 swap swap pri=42 0 0
172.16.1.104:/home /mnt/stevie-linux nfs defaults 0 0
/dev/hdg /mnt/mp3s ntfs rw,defaults,user 0 0

_____

df:

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdi2 18961408 17336328 1625080 92% /
shmfs 514560 0 514560 0% /dev/shm
172.16.1.104:/home 8723020 2577720 6145300 30% /mnt/stevie-linux

_____

mount:

/dev/hdi2 on / type reiserfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
shmfs on /dev/shm type shm (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
172.16.1.104:/home on /mnt/stevie-linux type nfs (rw,addr=172.16.1.104)



_______


So I guess I should have mentioned that I have been using Kdiskfree to mount the 'data1' drive. It does not mount automagically.

the folder data1 appears in my root directory but it shows no contents until I mount the drive. Then it looks like the / directory structure at the time I installed. There are no extra users (I'm using samba) in home, and none of the programs I've installed show up. Here's mount after I mount the hdk2 (data1) :

/dev/hdi2 on / type reiserfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
shmfs on /dev/shm type shm (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
172.16.1.104:/home on /mnt/stevie-linux type nfs (rw,addr=172.16.1.104)
/dev/hdk2 on /data1 type reiserfs (rw,noexec,nosuid,nodev,user=dfinger)


It now shows up... in the last line. df gives this now:


Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdi2 18961408 17336376 1625032 92% /
shmfs 514560 0 514560 0% /dev/shm
172.16.1.104:/home 8723020 2577728 6145292 30% /mnt/stevie-linux
/dev/hdk2 18961408 1406092 17555316 8% /data1


So, since the drive does not get mounted at boot, does this mean I can just delete the contents and add a storage folder?

thanks again...

Last edited by finger51; 09-22-2002 at 12:43 PM.
 
Old 09-22-2002, 03:59 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
well your problem seems to me that / is running low

it also looks like all the system folders are in root except /home

you can get a lot of space back in / by making a partition in some free space on an unused drive, formating it, and moving the files over to it. then mount it in a folder under /

If you have a fairly large drive that you want to use I would move /usr over to it like this

I will pretend it's /dev/hdb but it could be anything

make partition we will call hdb1

format it

mke2fs /dev/hdb1
tune2fs -j /dev/hdb1

or use whatever fs you want

mkdir /tempdir

mount /dev/hdb1 /tempdir

mkdir /tempdir/usr


cp -a /usr/* /tempdir/usr



now you need to make sure everything is there before removing it from /usr

umount /dev/hdb1

rm -rf /usr/*

mount /dev/hdb1 /usr/


you should have everything in /usr and everything is good to go

for boot up

add the line to mount /dev/hdb1 on boot in fstab


/dev/hdb1 /usr ext3 defaults 1 1





when you delete all files from /usr it will give the space to /

when you mount /dev/hdb1 in /usr it will have it's free space in /usr and will not use any space in /

all you need to do is have the empty folder /usr in / and mount /dev/hdb1 on it.

Last edited by DavidPhillips; 09-22-2002 at 04:10 PM.
 
Old 09-22-2002, 04:17 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Also, talking about data1

I don't know what that is, it sounds like a backup of somekind or another system that you can boot if you set a different root

I do know that mounting a unix file system tree in /data1 probably serves no purpose other than to be able to acces it. But I'm not sure what you have there.

You could try this and see what it is


chroot /data1


now you are in the other system using it's files and / is actually /data1

when you exit you will be back in /
 
Old 09-22-2002, 04:48 PM   #6
finger51
LQ Newbie
 
Registered: Aug 2002
Posts: 22

Original Poster
Rep: Reputation: 15
Howdie~

pt.1
Hey thats some really helpful stuff. Thanks alot for the instructions. It's really nice and sunny out right now though and the dog has his leash in his mouth. so I'll need to give it a try tomorrow. just had a brainstorm -- maybe just unplug the drive... eh. the simple answers are faves. I'll post results

pt.2
as for chroot-

dfinger@stevie1:~> chroot /data1
chroot: cannot change root directory to /data1: Operation not permitted

then I tried it as su-

stevie1:/home/dfinger # chroot /data1
chroot: cannot execute /bin/bash: No such file or directory

wassatabout.

again thanks

finger
 
Old 09-22-2002, 05:39 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
if it was a complete directory tree it would have /bin/bash

so it's not a dir tree, You should look at it and see what it is.
 
Old 09-24-2002, 08:31 PM   #8
finger51
LQ Newbie
 
Registered: Aug 2002
Posts: 22

Original Poster
Rep: Reputation: 15
well, I unplugged it and rebooted. all went well so I got brave and just deleted the entire contents. Worked GREAT!

Thanks for the input. I"ve copied all my music (9gigs) to the 'data1' folder and now have lots of room in root.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
extra hard disk space ic_torres Linux - Hardware 7 11-03-2005 07:56 PM
Extra Hard drive invisible? Hopeful Red Hat 1 05-19-2005 12:27 PM
Extra Hard Drive FAT32 cant be read AndrewZorn Linux - Newbie 15 04-04-2005 07:15 AM
mounting extra hard drive Brother Michael Linux - Newbie 1 08-18-2003 06:15 PM
Extra hard drive. New distro? Misteree Linux - General 21 02-20-2003 04:42 PM


All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration