{"id":8,"date":"2006-12-08T09:45:00","date_gmt":"2006-12-08T07:45:00","guid":{"rendered":"http:\/\/blog.sqawasmi.com\/?p=8"},"modified":"2006-12-08T09:45:00","modified_gmt":"2006-12-08T07:45:00","slug":"mount-failure-after-changing-hard-disk-location-solved","status":"publish","type":"post","link":"https:\/\/blog.sqawasmi.com\/index.php\/2006\/12\/08\/mount-failure-after-changing-hard-disk-location-solved\/","title":{"rendered":"mount Failure after changing hard disk location SOLVED ;)"},"content":{"rendered":"<p>Imagine that you have a system with three SCSI drives (sda,sdb,sdc) and has a failure in sdb (or even you removed it), on the next boot, drive sdc will become sdb. Many different scenarios can produce similar results (even with IDE).<\/p>\n<p>Look at this picture may be will explain what i am talking about: (this Picture from Red Hat documents)<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" style=\"height: 260px; width: 360px;\" src=\"http:\/\/docs.google.com\/File?id=dcr453t_3w9bhqd\" align=\"middle\" \/><\/div>\n<p>One approach in solving this problem is to use filesystem labels, but it doesn&#8217;t solve the<span class=\"fullpost\"> problem in all cases given that some partitions don&#8217;t have filesystems such as swap or rawdevices used in SAN environments and Oracle installations and lastly some filesystems don&#8217;t support labels at all.<br \/>any way, LABEL solution can be a good one when your filesystem is <span style=\"font-family:courier new;\">EXT2, EXT3, NFS, ISO9660,<\/span> <span style=\"font-family:courier new;\">MSDOS<\/span> and <span style=\"font-family:courier new;\">VFAT<\/span>. to mount using label then As you do with the devices then you can do with <span style=\"font-family:courier new;\">LABEL<\/span>, in <span style=\"font-family:courier new;\">\/etc\/fstab<\/span> just change the device with its <span style=\"font-family:courier new;\">LABEL<\/span>. For example if we have <span style=\"font-family:courier new;\">\/dev\/hdc5<\/span> labeled as <span style=\"font-family:courier new;\">WIN-G<\/span> and with the filesystem <span style=\"font-family:courier new;\">vfat<\/span>, with <span style=\"font-family:courier new;\">\/mnt\/win-g<\/span> as a mount point, then the normal entry in the fstab will be something like<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-size:85%;\"><span style=\"color: rgb(102, 102, 102);\"><span style=\";font-family:courier new;font-size:85%;\"  ><span style=\"color: rgb(51, 51, 255);\">\/dev\/hdc5<\/span>        \/mnt\/win-g       vfat        defaults         1   0<\/span><\/p>\n<p><\/span><\/span><\/div>\n<p>If you want to use Label to mount that partition, then change <span style=\"color: rgb(51, 0, 51);font-family:courier new;\" >\/dev\/hdc5<\/span> with <span style=\"color: rgb(51, 0, 51);font-size:85%;\" ><span style=\"font-family:courier new;\">LABEL=DeviceLabel<\/span><\/span>, in our example it will be like this:<\/p>\n<div  style=\"margin-left: 40px;font-family:courier new;\"><span style=\"font-size:85%;\"><span style=\"color: rgb(102, 102, 102);\"><span style=\"color: rgb(51, 51, 255);\">LABEL=WIN-G<\/span>      \/mnt\/win-g       vfat        defaults         1   0<\/span><\/span><\/div>\n<p>Now try to change change your hard disk location (<span style=\"font-size:85%;\"><span style=\"font-family:verdana;\">Shutdown before \ud83d\ude1b<\/span><\/span>), the system will mount that device without any problem, if you are interest in this then Google will give you a great help, this sites may give some:<br \/><span style=\"font-size:85%;\"><a href=\"http:\/\/elibrary.fultus.com\/technical\/topic\/com.fultus.redhat.elinux4\/manuals\/rhel-isa-en-4\/s1-storage-rhlspec.html#S2-STORAGE-BASICS\">Red Hat Documentation<\/a><br \/><a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=283131\">good ubuntu how-to<\/a><\/span><\/p>\n<p>Another approach is to use a script called <span style=\"font-family:courier new,courier,monospace;\">devlabel <\/span>produced by <a href=\"http:\/\/www.lerhaupt.com\/linux.html\">engineers at Dell<\/a>, it will use the <span style=\"font-family:courier new;\">UUID<\/span> of the partition to know it and then mount it every reload, what does it do is making a symlink to your device, and keep its <span style=\"font-family:courier new;\">UUID<\/span>, when you change your hard disk location then it will know where is it now by its <span style=\";font-family:courier new;font-size:100%;\"  >UUID<\/span>, i will not explain any more about it you can know more about it and how it work by following this links:<br \/><span style=\"font-size:85%;\"><a href=\"http:\/\/www.redhat.com\/docs\/manuals\/enterprise\/RHEL-3-Manual\/sysadmin-guide\/ch-devlabel.html\">Red Hat Documentation<\/a><br \/><a href=\"http:\/\/www.dell.com\/content\/topics\/global.aspx\/power\/en\/ps1q03_lerhaupt\">Resolving Device Name Issues in Linux (Dell website)<\/a><br \/><a href=\"http:\/\/www.linux.dell.com\/devlabel\/devlabel.html\">devlabel project page, download the script from here<\/a><\/span><br \/><span style=\"font-size:85%;\"><a href=\"http:\/\/www.gurulabs.com\/goodies\/RedHatLinux9-TechReview.php\">Linux Red Hat 9 Review &#8211;> look at &#8220;<\/a><a href=\"http:\/\/www.gurulabs.com\/goodies\/RedHatLinux9-TechReview.php\">The introduction of Device Labels&#8221;<\/a><\/span><\/p>\n<p>Okay, i use slackware, it was work with me good, but take a look at that script, you will know that it use <span style=\"font-family:courier new;\">\/etc\/sysconfig\/<\/span> for its configuration, i dont like sysconfig approach so i changed the script to take the configuration from another folder, if you want to do change, just take a look at devlabel code and the installation script&#8230;<br \/>finally i want to thank Net_Spider to let me know about this tool (devlabel).<br \/><\/span><\/p>\n<h3>Related Images:<\/h3>","protected":false},"excerpt":{"rendered":"<p>Imagine that you have a system with three SCSI drives (sda,sdb,sdc) and has a failure in sdb (or even you removed it), on the next boot, drive sdc will become sdb. Many different scenarios can produce similar results (even with IDE). Look at this picture may be will explain what i am talking about: (this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-about-my-life"],"_links":{"self":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sqawasmi.com\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}