LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2018, 04:31 PM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
volumn have problem


I use Centos 7.1 , the path /files mounts to the /dev/sda2 , but it can not be mount now.

I tried

1) mount -a
the system will be hang when mount to /dev/sda2

2) xfs_repair -n /dev/sda2
it returns no error.
I know xfs_repair -L will cause data lose .

What I want is to find a way to mount it or retrieve the data from /dev/sda2 .

Would advise what I should try , to mount it again ?

thanks

Last edited by catiewong; 09-28-2018 at 04:36 PM.
 
Old 09-28-2018, 04:44 PM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Some more information might help. Like what is /dev/sda2 for? Another HDD/SSD drive, something else ?

You could try the following;

Code:
mount -t xfs /dev/sda2 /files
That would do a manual mount and would not last after reboot. The "-a" option tells the mount command to mount all filesystems listed in /etc/fstab
 
Old 09-28-2018, 04:52 PM   #3
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jsbjsb001 View Post
Some more information might help. Like what is /dev/sda2 for? Another HDD/SSD drive, something else ?

You could try the following;

Code:
mount -t xfs /dev/sda2 /files
That would do a manual mount and would not last after reboot. The "-a" option tells the mount command to mount all filesystems listed in /etc/fstab
tried , it hangs when issue it .
 
Old 09-28-2018, 04:57 PM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by catiewong View Post
tried , it hangs when issue it .
Once again, exactly what is it you're trying to mount ?

Have you done a filesystem check on it? If it's a HDD/SSD drive, you should run the following command and check it's SMART status;

Code:
smartctl -a /dev/sda2
 
Old 09-28-2018, 05:11 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you are using sudo or root to mount yes?
Code:
lsblk #to insure hdd 
sudo mount /dev/sdxx /mount_point
 
Old 09-28-2018, 06:49 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by catiewong View Post
1) mount -a
the system will be hang when mount to /dev/sda2
Are you sure this is XFS? What is the corresponding line in /etc/fstab? You can also use tools like lsblk and blkid to guess at the content of a disk.

Is there anything in the kernel message buffer (dmesg command)?

Side remark: Generally, you should not use non-persistent path names like /dev/sda, since there is always the possibility that the same disk gets a different name after a reboot. Instead, use UUIDs, LABELs or other unique properties of your filesystems to mount them. Having said that, for a manual mount command there shouldn't be a problem - as long as you are certain that /dev/sda refers to the correct disk.
 
Old 09-28-2018, 08:14 PM   #7
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
you are using sudo or root to mount yes?
Code:
lsblk #to insure hdd 
sudo mount /dev/sdxx /mount_point
yes , still not work.
 
Old 09-28-2018, 08:15 PM   #8
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Are you sure this is XFS? What is the corresponding line in /etc/fstab? You can also use tools like lsblk and blkid to guess at the content of a disk.

Is there anything in the kernel message buffer (dmesg command)?

Side remark: Generally, you should not use non-persistent path names like /dev/sda, since there is always the possibility that the same disk gets a different name after a reboot. Instead, use UUIDs, LABELs or other unique properties of your filesystems to mount them. Having said that, for a manual mount command there shouldn't be a problem - as long as you are certain that /dev/sda refers to the correct disk.
I known it from /etc/fstab , it is xfs .
 
Old 09-28-2018, 08:26 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
What is the error message when you try to mount /dev/sda2?

Post the fstab line that is associated with /dev/sda2
 
Old 09-28-2018, 09:00 PM   #10
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Original Poster
Rep: Reputation: Disabled
No error , it hangs when issue the command

#cat /etc/fstab
#UUID=c6c87a84-3455-4cb2-bb21-034e3d476d42 /files xfs defaults 0 0
 
Old 09-28-2018, 09:30 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
looking up for mounting at boot
Code:
UUID=c6c87a84-3455-4cb2-bb21-034e3d476d42 /files xfs rw,user,auto 0 0
make sure your UUID is correct.
/storage_administration_guide/xfsmounting

https://access.redhat.com/documentat...de/xfsmounting

Last edited by BW-userx; 09-28-2018 at 09:32 PM.
 
Old 09-29-2018, 12:27 AM   #12
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by catiewong View Post
I known it from /etc/fstab , it is xfs .
Anybody can write anything into the fstab. To check if it's really XFS, use blkid, or use xfs_admin -l to display the superblock (this is from memory; consult the man page to be certain).

However, the fact that you get no error message indicates another problem. Perhaps the disk has a problem. Did you check the message buffer (dmesg command)?
 
Old 09-29-2018, 12:52 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Anybody ???.
Anybody named root maybe. If it's in fstab and broken how did the last boot succeed ?. Seems we are not getting the entire story.
 
Old 09-29-2018, 01:58 AM   #14
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by syg00 View Post
Anybody ???.
Anybody named root maybe.
My name is not root, but I am known to have written fstab entries
Quote:
If it's in fstab and broken how did the last boot succeed ?. Seems we are not getting the entire story.
Agreed.
 
  


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
question about volumn group byran cheung Linux - Newbie 2 10-17-2014 12:53 AM
VG and LV volumn ust Linux - Newbie 6 07-29-2013 08:42 AM
mount volumn elainelaw Linux - Newbie 1 04-12-2010 08:02 AM
volumn control huangyongqiang Linux - Newbie 5 12-16-2007 05:41 AM
Audio Volumn in 10.1 raylhm SUSE / openSUSE 4 12-07-2006 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 PM.

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