LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-23-2001, 01:15 PM   #1
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Setup free space on /dev/hdc without screwing up /swap


I have a 3G HD with only a swap partition on it. How can I set it up and mount it, then move /home from hda to it? /home is in / .


[david@xxxxxxx david]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 7953612 3269872 4279708 44% /
/dev/hda1 54416 7570 44037 15% /boot


[david@xxxxxxxx david]$ df /dev/hdc
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdc 7953612 3269872 4279708 44%



Command (m for help): p

Disk /dev/hdc: 128 heads, 63 sectors, 787 cylinders
Units = cylinders of 8064 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 82 330592+ 82 Linux swap

Command (m for help): v
5685182 unallocated sectors



thanks again for all the help.

Last edited by DavidPhillips; 06-23-2001 at 01:17 PM.
 
Old 06-24-2001, 01:32 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Original Poster
Rep: Reputation: 58
Ok I said what the heck and did it.

Here's how it went.

Reboot

console login root

fdisk /dev/hdc
n
p
1

partition already exists(I expected this)
n
p
2

no problem

t
83
a(don't know about this but what the heck right.)

mkdir /home2

mount /dev/hdc2 /home2

all kinds of errors(No file system, I should know that)

try typing mkext2fs

no such command

look for info on forum
look for info on internet

ahaa mkfs.ext2 /dev/hdc2

tons of errors to many files systems Blaa Blaa Blaa with a hint (partition not updated other file systems were mounted)

reboot

mkfs.ext2 /dev/hdc2

special geek code look like it worked
decided to try the shinny new linuxconf

filesystems/access local drive

add
partition /dev/hdc2
type ext2
mount point /home2
mount

success

open file manager
there she is, Oh Boy 2.7G


Last edited by DavidPhillips; 06-24-2001 at 01:35 AM.
 
Old 06-24-2001, 02:07 AM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Original Poster
Rep: Reputation: 58
Moving /home from / to new /dev/hdc2

Piece of cake right. Here I go, following my nose.

cp /home/ * /home2
rename /home /home3
rename /home2 to /home
ennhh

what the heck, now of have three of them?

maybe edit fstab

change /home2 to /home
get stupid and rename /home3 to /home and delete /home

reboot

what no /home what the heck have I done
mkdir /home

reboot

logon to user

Smoke cigar and chill out everythings fine.

Ready to move /var next time, think I will use the exact same process cause I know it works.

where will all those logs and stuff go while I am moving it?

Maybe I think I should copy it to /var2 and heck I don't know. I've really gotten attached to having /var right where it is.
 
Old 06-24-2001, 04:17 AM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Partition juggling is an endeavor that should not be undertaken _way_ after bedtime. I, uhhh... kind of lost some, er, log files when moving my /var to it's own partition. Although there was no actual _need_ to delete stuff in the original /var I thought it would be a more thorough approach. Unfortunately I was in the wrong terminal window and deleted the log files from my firewall box.
 
Old 06-24-2001, 10:35 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Original Poster
Rep: Reputation: 58
Bummer

Well I don't need to move it yet but I am thinking just back it up, copy it to partition, and then mount it with a reboot. Not sure what will happen.

I think it may just remove the files there but they will probably have to be deleted first.

Can someone clear this up.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount /dev/hdc /dev/cdrom doesn't work ShrikesHarvest Linux - Newbie 10 02-21-2009 07:05 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 02:09 PM
/dev/cdrom & /dev/hdc missing! Lord_Devi Slackware 4 06-25-2004 09:17 AM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:32 AM.

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
Open Source Consulting | Domain Registration