hard drive specs?


 
Thread Tools Search this Thread
Operating Systems Linux hard drive specs?
# 8  
Old 04-03-2004
1. Use fdisk /dev/hdb to set up the partition on the second disk. This may already be done since dmesg showed /dev/hdb1.

2. Create a filesystem on hdb1. 'mkfs /dev/hdb1' will create an ext2 filesystem. 'mke2fs -j /dev/hdb1' will create an ext3 filesystem.

3. Make a directory in /. Call it what ever you want. It will be your mount point for the second disk. For example 'mkdir /disk2'.

4. Mount the second disk - 'mount /dev/hdb1 /disk2'.

Then copy away.
# 9  
Old 04-04-2004
Perfect, it worked ... thanks man. Sorry i didn't have a chance to do it earlier but i've been dieing of some stupid virus going arround. So will i have to mount the file system every time i turn the computer on or will it mount it self?
# 10  
Old 04-04-2004
Hey, it's weird when i try to copy anything over to the new partition it gives me an error...either

omitting directory 'file name'
or
cp cannot create regular file: 'dir to file': Input/Output error

Is this a problem with my new partition or am, i just doing somehting really stupid. I'm using the cp command to copy things over.

cp /FTPfiles/* /disk2/ftpfiles

i've tried that and doing just the files sepratly and i get those errors.
# 11  
Old 04-05-2004
I don't recall ever seeing that exact error but it may be because you are trying to copy a directory and not using the -R on the cp command. Typically if I am copying data and I want it to retain the same date, timestamps, permissions, etc I would use tar piped to tar like this:

tar cf - /FTPFiles/* | (cd /disk2/ftpfiles; tar xf -)

This assumes /disk2/ftpfiles is a directory that already exists.

To have disk2 mounted automatically, simply add it to /etc/fstab. I don't know your device but it will look something like this:

/dev/hdb1 /disk2 ext3 defaults 1 2

I'm doing it from memory so I hope I didn't forget any feilds.
# 12  
Old 04-05-2004
oh haha thanks, i wondered why when i restarted my computer it wasen't there haha i'll do that right now while i'm feeling ok. Where did you learn all this from, how long have you been at this?

Oh and i don't really get the command
tar cf - /FTPFiles/* | (cd /disk2/ftpfiles; tar xf -)
could you break it down for me please just so i understand how it works...it's mostly everything after the pipe that i don't get.

When i ran the command it said cowardly refusing to make an empty archive.

I don't know what it is...all my other files copied over fine, it's just two stupid directories.


Last edited by byblyk; 04-05-2004 at 01:19 AM..
# 13  
Old 04-06-2004
It just takes time to learn all this. I have a degree in computer science and have been working with Unix and Linux for about 10 years. My best advice is read a lot and play with any hardware and OSes you can get your hands on. The cool thing about Linux and Unix is there is always more to learn. It's pretty much infinite for all practical purposes. Even guys like Perdarabo probably still learn new things pretty frequently. I can only hope to learn as much as he already knows.

For the tar command:

tar cf - /FTPFiles/*. This part creates a tar of all the files tar are in /FTPFiles. The "-" after the cf part just redirects the contents of the tar file to STDOUT instead of to a file. This is where the pipe comes in.

The | takes the STDOUT and redirects it to the next set of commands as STDIN. The () make these work as 1 unit. First we cd to /disk2/ftpfiles then is "untars" the data passed via -. The tar xf - uses "-" the same as the tar cf did. It opens what was STDOUT and has been changed to STDIN by the | to expand the archive. Basically you are using - as a file to pass info without actually creating a file on disk.

Your error may be caused if /FTPFiles doesn't have any files in it yet.
# 14  
Old 04-06-2004
Thanks for the break down haha i get it now...that was weird though, i've never seen a command liek tha tbefore...lol it threw me through a loop.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

External hard drive

I have connected an external hard drive. I can't find it. Both ls /media, fdisk -l and ls /dev show nothing. TIA (3 Replies)
Discussion started by: Meow613
3 Replies

2. Red Hat

Hard drive formating

Im trying to install a fresh version of Fedora 17. I keep getting formating errors when trying to reformat the hard drive. I recieve errors as well I I try to use the entire disk for the install instead of creat new partitions from scratch. I even tried fromatting the disk using PartedMagic and... (7 Replies)
Discussion started by: Fingerz
7 Replies

3. Red Hat

Corrupted Hard Drive

I am running FC-7 which I realize is an older distro. But my question would apply to any distro. I ran fsck on my mounted file system (I know, I shouldn't have). Now it won't boot. I get a kernel panic message. I booted to a Knoppix Live Cd. The desktop icon shows /dev/sda2 mounted at... (4 Replies)
Discussion started by: 2buck56
4 Replies

4. Filesystems, Disks and Memory

Hard Drive Temperature?

Hi, I just set up a raid Z array in solaris xpress and I notice that the drives feel pretty damn hot. I use speedfan to monitor the temperatures of the hard drives in XP. Is there a similar program for solrais? I assume there would be since the drives all have temp sensors in them, but I... (2 Replies)
Discussion started by: ciscocbee
2 Replies

5. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

6. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies

7. SCO

Processor and Hard Drive

I trying to learn Unix and I am using SCO Unixware 7.1. Below are three question that I have: 1) Can someone tell me what command I can use to find out the system processor speed. 2) Can someone tell me what command I can use to find out what's the hard drive size of my unix box. 3) Can... (1 Reply)
Discussion started by: etaup02
1 Replies

8. UNIX for Dummies Questions & Answers

currupted my hard drive

Hello, earlier tonight I was installing BETA version of Mandrake Linux 9.0 and I realised I needed to partition my drive. I tried making the partition within mandrake but ther wasnt an option within the mandrake setup. So i go into my WindowsXP and do the disk management option but there want a... (5 Replies)
Discussion started by: xcaliber
5 Replies

9. UNIX for Advanced & Expert Users

reading the hard drive

I have suns machine that holds two hard drives. I only used one. I tryed to make a lan network with my windows xp. When I tryed to restart the machine it wanted to a password. when before I just typed root to log in. So i edited the etc dir. big mistake. So now the machine will not read the hard... (2 Replies)
Discussion started by: victbla
2 Replies
Login or Register to Ask a Question