LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-06-2016, 02:48 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
Newbie question about fsck and mount


Hello,

i have 2 drives in HW raid 1. This is fstab:
Quote:
/dev/mapper/vg-root / ext4 discard,noatime 1 1
UUID=2ab84f72-7ace-4849-b911-c04fcf526b54 /boot ext2 defaults 1 2
/dev/mapper/vg-tmp /tmp ext4 discard,noatime 1 2
/dev/mapper/vg-swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
# parted /dev/sda 'print'
Quote:
Model: Dell VIRTUAL DISK (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 263MB 262MB primary ext2 boot
2 263MB 1000GB 999GB primary lvm
Its a server that is running non-stop. I assume i do not need to run fsck or any such program on the filesystem/drive? I read i need to unmount filesystem before i run it (fsck /dev/sda). What would happen if i not unmount it?

If i unmount like: umount /dev/sda and then mount /dev/sda , will the partitions/filesystems return in same state before umount or i need to take a note of something before unmounting?
 
Old 07-06-2016, 03:25 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by postcd View Post
I assume i do not need to run fsck or any such program on the filesystem/drive?
Why then are you raising this query ?.
Quote:
I read i need to unmount filesystem before i run it (fsck /dev/sda). What would happen if i not unmount it?
Why have you not read the manpage for fsck.ext4 ?.
Quote:
If i unmount like: umount /dev/sda and then mount /dev/sda , will the partitions/filesystems return in same state before umount or i need to take a note of something before unmounting?
You cannot umount the root.
 
1 members found this post helpful.
Old 07-06-2016, 08:21 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by postcd View Post
Hello,
i have 2 drives in HW raid 1. This is fstab:
Code:
/dev/mapper/vg-root / ext4 discard,noatime 1 1
UUID=2ab84f72-7ace-4849-b911-c04fcf526b54 /boot ext2 defaults 1 2
/dev/mapper/vg-tmp /tmp ext4 discard,noatime 1 2
/dev/mapper/vg-swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
# parted /dev/sda 'print'
Code:
Model: Dell VIRTUAL DISK (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 263MB 262MB primary ext2 boot
2 263MB 1000GB 999GB primary lvm
Its a server that is running non-stop. I assume i do not need to run fsck or any such program on the filesystem/drive? I read i need to unmount filesystem before i run it (fsck /dev/sda). What would happen if i not unmount it?

If i unmount like: umount /dev/sda and then mount /dev/sda , will the partitions/filesystems return in same state before umount or i need to take a note of something before unmounting?
A 'newbie' question...after you've been here for years, and been asking about mounting/fsck/raid/disk status for at least two?
http://www.linuxquestions.org/questi...ed-4175528660/
http://www.linuxquestions.org/questi...io-4175523763/
http://www.linuxquestions.org/questi...ll-4175505865/
http://www.linuxquestions.org/questi...ck-4175501524/

If you know how to check your RAID status and disk health, you then know if you need to run fsck. Again, since you've been using Linux for years now, and been asking such questions for years, this is hardly a 'newbie' thing for you. What are you confused about? If you tried running fsck on a mounted file system, it will warn you that it's not a good thing, and you can find MANY pages of documentation telling you this as well, with a simple search, as well as what will happen if you do NOT unmount a file system before running fsck. And, since the program itself is *ON* the root partition...how do you think you'll be able to run it, if you UNMOUNT it, and make it unavailable?

A brief Google search for "how to automatically run fsck on centos" pulls up, as the VERY FIRST HIT:
http://www.cyberciti.biz/faq/linux-f...boot-sequence/

...a way to force your system to run fsck upon a reboot. You don't typically need to run it, unless you're getting errors...which you already know how to check for, based on your previous threads.
 
Old 07-06-2016, 08:43 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
This is one compelling reason for using logical volumes.

A volume cannot be checked if it is mounted. Filesystem integrity checks that occur at boot-time take place in a special system state that was purposely contrived to support it.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext4 won't mount - fsck required - 2nd fsck in less than a week td3201 Linux - General 1 09-10-2012 12:07 AM
/home dir. wont mount after system crash. I have to run fsck to mount it again. why? druonysus Linux - Desktop 9 08-19-2010 05:27 AM
newbie raid question - fsck rusl Linux - Server 8 08-11-2008 04:59 AM
mount questions (newbie question) roc Linux - Software 6 07-25-2005 05:50 PM
mount -r while fsck is running? aaccomazzi Linux - Hardware 1 10-20-2004 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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