View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 8 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: XFS drive removal Solved
PostPosted: Fri May 08, 2009 3:05 pm 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
I have a question regarding removal of drive from my system.

My main box had three sata drives. I wanted to get organized with three of the same size drives. Since the price of drives has been really low I decided to purchase 1 more drive so they are all the same size and organize my storage group. So I added a four drive to my box and moved all the data around so it is now nice and organized. In fact I really, really like how organized things are now with enough space.

Next, I cleared off all the data from my second drive (dev/sdb1) since I want to retire it since it is the smaller drive. I removed it from the storage group and remove the folder /myth2, then removed the partition. Finally, I removed the drive from my fstab.

Code:
GNU nano 2.0.2              File: /etc/fstab                        Modified

/dev/sda3  /myth  auto  defaults,auto  0  2

proc  /proc  proc  defaults  0  0

/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
sysfs  /sys  sysfs  defaults  0  0
tmpfs  /dev/shm  tmpfs defaults  0  0
/dev/cdrom /cdrom  auto  defaults,ro,user,noexec,noauto  0  0

# Added by KNOPPIX
/dev/sda2 none swap defaults 0 0
/dev/sdc1 /myth3 xfs defaults,auto 1 2
/dev/sdd4 /myth4 xfs defaults,auto 1 2
#
/etc/fstab:
filesystem table.
#
/etc/fstab:
filesystem table.
#


I now only see the drive /dev/sdb1 when I issue the fdisk -l. My machine boots up fine.

When I physically disconnect this drive from my system I get error booting. It says it can't find my XFS drives. I think this is because /dev/sdb1 is removed. And then the system goes and asks to press D to go into Maintance mode. At this point I got a bad feeling in my stomach and stopped and just put the drive back in and it boots up fine. How do I ensure a graceful removal of this drive?


Thanks


Last edited by RacerX on Sun May 24, 2009 7:41 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 17, 2009 4:13 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
It's been week or so, did you resolve your issue?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 23, 2009 5:11 pm 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
Nope, unfortunately I had other flames to put out with my washing machine giving up the ghost..... :cry:


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 24, 2009 5:19 am 
Offline
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
Seems silly, but maybe your system is objecting to the empty connector. That is maybe it doesn't like having an sdc and sdd without an sdb. It would be easy enough to check. Change the /dev/sdd4 entry to /dev/sdb4 then plug the sdd drive into the sdb drive's cable.

Just curious, why is there an sdd4 and no sdd1? Usually a drive with one big partition is sdx1. It seems as though you've created a primary partition, then created an extended partition within it. Again, I can see no reason why that would cause a problem for the OS, but when the system is behaving weird you look at anything funny...


Top
 Profile  
 
 Post subject: SOLVED
PostPosted: Sun May 24, 2009 7:37 pm 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
Well that fixed the problem

All I had do was

1. Change Fstab for device /dev/sdd4 to /dev/sdb4
2. Shutdown the system
3. Pull the old drive and use that cable for the /dev/sdb4 drive
4. Restart the system and everything came up gracefully

I''m not sure if I can change the name of drive /dev/sdb4 to /dev/sdb1
and have it gracefully see it without messing up my box.

Many thanks jmckeown2


Top
 Profile  
 
 Post subject: Re: SOLVED
PostPosted: Mon May 25, 2009 9:21 am 
Offline
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
I thought it was a long shot, but I'm very glad it helped.

RacerX wrote:
I''m not sure if I can change the name of drive /dev/sdb4 to /dev/sdb1
and have it gracefully see it without messing up my box.


I wouldn't say there's anything wrong with the partitioning of the drive, there's no reason it should not work just fine as it is. You could re-partition the drive, but you'd have to back-up and restore everything or just kiss the existing data goodbye. It's just potentially confusing, but since you are your own admin, and know about the "missing" sdb1, 2, and 3, then the "fix" is probably not worth the effort.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 25, 2009 2:54 pm 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 690
I'm happy with the way it is for now. Thanks again for the help


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 26, 2009 10:55 am 
Offline
Joined: Wed Feb 08, 2006 6:13 pm
Posts: 480
Location: IN
Linux populates drive labels in /dev in the order the drives are detected. Therefore when you removed the /dev/sdb4 and booted back up the drives were detected in a different order than how your /etc/fstab was set up and thus resulted in failure to boot.

By renaming /dev/sdd4 to /dev/sdb4 in /etc/fstab and then physically moving that drive to the same connector that the former /dev/sdb drive was on you have made it so that the drives are detected, and thus labeled in /dev in the same order that they are defined in /etc/fstab and thus "solved" the problem.

If you ever decide to move around your drives in the future however you will have problems again.

The only 100% sure fire solution is to use udev names for your drives in /etc/fstab to ensure that the proper physical drives / partitions get mapped to the /dev names that you want. I did this when I upgraded the motherboard in my server and went from a PCI ATA100 controller ( /dev/hde - /dev/hdh) to the new motherboards onboard ATA100 controller ( /dev/hda - /dev/hdd). Without using udev naming for my drives I would have been in a world of hurt when I pulled the ATA100 controller and all the drives mapped to different /dev names!

Here is a decent article that explains udev device in better detail:

http://manual.sidux.com/en/part-uuid-en.htm

Hope this is more helpful than confusing. It took me a while to wrap my head around how udev naming works but once it "clicks" you wonder how you lived without it!

Martian

_________________
ABIT NF-M2 nView | Athlon 64 X2 3800+ | 2GB DDR2 800 | HDHomerun | GeForce 6150 (onboard) | WD 640 GB SATA HD | DVD-RW (sata) | StreamZap IR receiver with Logitech Harmony remote

Vizio 37" LCD HDTV (1080p)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu