LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2005, 05:01 PM   #1
kvnband
Member
 
Registered: Jan 2004
Distribution: Suse 10.2
Posts: 107

Rep: Reputation: 15
Mandriva won't mount drive...


Won't Mount Second Hard Drive!
Ok, background information here:

I installed Mandriva 2006 yesterday, and spent today getting everything working. At the start, I had a 160GB HD used for storage (NTFS) and my C drive (NTFS). Of course, this meant that Mandrake couldn't write to either (I am constantly updating the contents of my storage drive, so I needed write access). So, I split the partition 75GB/75GB. I formatted the second half of the drive and made it ext3. Then I moved the contents of the NTFS partition to the ext3 and then formatted the NTFS part as ext3. So now the whole drive is formatted as ext3. Upon reboot, both partitions are loaded, along with my C drive...GREAT! Now I try to combine the two partitions, but start coming into problems. I move the data from the second half of the drive to the first half, format the second half and resize the first half to take up the whole Storage drive. So now hdb has one partition, hdb1. Files are stored correctly, accessible and writable. Everything seems to be good. I umount -a and then mount -a to attempt to remount all the drives. And I get nothing. the console says that they were mounted successfully, but upon looking in the Devices area, only my C drive is showing (hda1). Weird. So I do a mount /dev/hdb1 /mnt/win_c2 Mount tells me that 'special device hdb1 does not exist'. WEIRD. I open up DiskDrake and it says that hdb1 is mounted. Unmount, remount (via DiskDrake) and the drive is still not showing up in my devices area. Have I royally f*cked things here or what? My fstab is as follows:

Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
 /dev/hda5 / ext3 defaults 1 1 
/dev/hda7 /home ext3 defaults 1 2 
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0 
none /mnt/floppy supermount 
dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0 
/dev/hda1 /mnt/win_c ntfs umask=0,nls=iso8859-1,rw 0 0 
/dev/hdb1 /mnt/win_c2 ext3 umask=0,nls=iso8859-1,rw 0 0 
none /proc proc defaults 0 0 /dev/hda6 swap swap defaults 0 0

For now, I am accessing the files by going to /mnt/win_c2 and they are there and accessible. What does that mean?

Urgently awaiting help
Thanks
Kevin
UPDATE: If I go to 'Storage Media' instead of Devices, my hard drive is listed there. GREAT! However, upon viewing its properties, I am told that the disk is only 75 GB. Opening up DiskDrake, I am told that the drive is made up of one huge partition, totalling around 155GB (which is indeed how large it should be). What is the deal here?
 
Old 12-27-2005, 12:26 PM   #2
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
After you reboot, the partion information should show up correctly. It is probably caching the old partition information.

If you want to share that data between Windows & Linux, you should reformat it as FAT32. According to Microsoft, fat32 will support drives up to 2 terabytes, but XP won't create fat32 drives bigger than 32G (They want you to use NTFS), so you'll have to create the partition in linux using mkfs.vfat. You should be able to create it using the same method you described to back up your data and convert it to ext3.

The reason it doesn't show up in the Devices, is that it is now a native filesystem. Devices is for non-linux native file systems (CD/DVD, Windows file systems, removable media, etc).
 
Old 12-27-2005, 12:32 PM   #3
kvnband
Member
 
Registered: Jan 2004
Distribution: Suse 10.2
Posts: 107

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GrueMaster
After you reboot, the partion information should show up correctly. It is probably caching the old partition information.

If you want to share that data between Windows & Linux, you should reformat it as FAT32. According to Microsoft, fat32 will support drives up to 2 terabytes, but XP won't create fat32 drives bigger than 32G (They want you to use NTFS), so you'll have to create the partition in linux using mkfs.vfat. You should be able to create it using the same method you described to back up your data and convert it to ext3.

The reason it doesn't show up in the Devices, is that it is now a native filesystem. Devices is for non-linux native file systems (CD/DVD, Windows file systems, removable media, etc).
Thank you. I have no desire to share the data with windows systems. The drive is used for my private storage. Now that is very interesting that it doesn't show up in the devices area. I guess I learn something new every day huh :-) Are there any benefits or drawbacks to changing the format to fat32 instead of ext3?
Thanks for your reply.
Kevin

Also, why does mount tell me that special device hdb1 not exist? Is there a change I need to make to fstab here?
Kevin

Last edited by kvnband; 12-27-2005 at 12:35 PM.
 
Old 12-27-2005, 12:50 PM   #4
kvnband
Member
 
Registered: Jan 2004
Distribution: Suse 10.2
Posts: 107

Original Poster
Rep: Reputation: 15
Just as an update: I have rebooted, gone to media:/ and checked out the properties for my storage drive. It is still reporting that it is only 72.3 GB. This is really starting to bug me.
 
Old 12-27-2005, 04:37 PM   #5
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
What did you use to resize the partition? It sounds like it didn't resize properly. From the command line, the first step would be to delete all the partitions on this drive using fdisk, then recreate the first partition with the same starting sector as it was before, just with a larger size. Then you use resize2fs to enlarge the actual file system. resize2fs will only enlarge or shrink the filesystem inside a partition, not redefine the partition size. Another option would be to convert it to reiserfs. This has the benefit of being able to resize the partition & filesystem on the fly. Read the man page on resize2fs ("man resize2fs").

The only real advantage to using fat32 would be sharing data between Linux & Windows on the same computer (has nothing to do with file sharing between computers or users). Disadvantages would be file ownership permissions (not a big deal in a single user environment).

If you are going to use the space exclusively for Linux, you might as well mount it permanently in a different location. If this is a single user system, you could just move all your other stuff under /home to this drive, then mount it as /home. Linux and Unix don't care about drive letters. Everything is a directory for them at the user level (as it should be). Use /mnt or /media for removable media devices or foreign media (NTFS or fat32 partitions).
 
Old 12-27-2005, 04:51 PM   #6
kvnband
Member
 
Registered: Jan 2004
Distribution: Suse 10.2
Posts: 107

Original Poster
Rep: Reputation: 15
I used parted to resize the drive. This is really turning into a nightmare. I'm not really getting what you're suggesting I do. Right now, /home is mounted on hda7, and has right at 50 gigs dedicated to it. I guess what you're saying it to mount hdb1 as /home and then use the rest of the space on hda as /? The sounds like a feasable plan. So what I need to do is this:?

Move files from hdb1 (since it seems that the partitions are messed up) to hda7 (plenty of storage on hda7 for my files).

Format hdb1 completely...erase everything, and make a new partition, ext3.

Move all files from hda7 to hdb1 (Including the /home/kevin linux files)

Combine hda6 with hda5 to increase the capacity of /

Mount hdb1 to /home

Right? I can handle the partitioning, formatting, and mounting of hdb1, but I really need to know exactly how to go about combining hda6 (/) and hda5 (/home) into one partition (/)

Hope I wasn't too confusing ;-)
Kevin
 
Old 12-27-2005, 05:38 PM   #7
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
To start with, using parted was half of the solution. parted resized the partition, but the filesystem still needs to know that it is on a bigger partition. think of the partition as a pice of canvas, and the filesystem is the painting on the canvas. You can enlarge the painting by adding to the canvas, but the painting will be the same size until it is expanded to fill the added canvas.

To expand the filesystem, you now need to use resize2fs. To do this, you need to unmount the partition, then type "resize2fs -p /dev/hdb1" to resize the filesystem. It will automatically detect the partition size, and expand the filesystem to use it (the -p will give you a percent complete display). Unfortunately, it will only work on a non-mounted filesystem, so combining your / partition with your existing /home partition would be difficult without a live cd.

Basically, what resizing the filesystem does, is add more entries to the filesystem space allocation tables, which it uses to track which file owns each block on the drive. If you have the space, I'd do another reshuffle and get the drive running with the reiserfs, as the resizing steps can be done while the drive is in use. Hope this is more helpful.
 
Old 12-27-2005, 06:39 PM   #8
kvnband
Member
 
Registered: Jan 2004
Distribution: Suse 10.2
Posts: 107

Original Poster
Rep: Reputation: 15
You are absolutely awesome! I am learning so much here. I have plenty of space to move things, and have a knoppix CD. Think I could manage it without messing up too horribly? I'm really starting to understand partitioning. Might give it a go later tonight.
Thanks for all your help.
Kevin
 
  


Reply



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
mount: unknown filesystem type 'ntfs' when trying to mount windows drive... DiZASTiX Linux - Hardware 12 09-28-2008 07:29 PM
Mount usb drive, umount and mount another drive arubin Linux - Hardware 9 01-17-2007 03:46 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 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