LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-09-2011, 06:34 PM   #1
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Rep: Reputation: 0
CentOS 5.6: LVM, LV, PV, external SCSI, USB - discussion and questions


First I will need to discuss a little bit, followed by my questions.

I'm trying to understand LVM as it relates to mounting and un-mounting of filesystems and to learn what actions are needed (if any) to attach and remove an external drive that has been placed into the LVM system.

I have two LVM Physical Volumes (PV) on my system. The first is comprised of my 2 internal IDE drives and provides space for logical volumes (LV) which map to /,/boot,/opt and /orafs. These LV's are mounted.

I have a SCSI external drive attached to my computer. It's 4 partitions have been allocated to a single, second PV. This PV has yet to have any LV's created from it, so, naturally, I have nothing mounted for this drive.

In Windows XP, to "un-mount" an external (USB) device requires me to run the "Safely Remove Hardware" widget, which dumps any write buffers that are outstanding, before the device is powered down.

(Q1) Is CentOS also capable of creating a similar possibility - having buffer(s) that need to get dumped before device removal? Let us consider all questions from both USB connections and SCSI connections.

(Q2) If Q1 is yes, is there an analagous program to run for an external drive connected to CentOS?

(Q3) Is the act of un-mounting (umount) equivalent to dumping outstanding buffers to the device?

(Q4) What if I just turned off my SCSI drive? Will that have a disastrous effect on the PV that it is mapped to? I expect to use this drive for backups.

(Q5) Since this is the first of many external backup drives, does it make sense to even place them within the context of LVM?

(Q6) If I created a PV out of two external drives, would both have to be online at the same time for me to be able to access one of them?

Thanks,
 
Old 09-11-2011, 06:17 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You may want these for ref
http://tldp.org/HOWTO/LVM-HOWTO/
http://sunoano.name/ws/public_xhtml/lvm.html

You check if any process has open files on the LVM, look at fuser http://linux.die.net/man/1/fuser & lsof http://linux.die.net/man/8/lsof
 
Old 09-11-2011, 09:10 PM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,149

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Quote:
Originally Posted by needsleep View Post
(Q1) Is CentOS also capable of creating a similar possibility - having buffer(s) that need to get dumped before device removal? Let us consider all questions from both USB connections and SCSI connections.
Yes. Filesystems use cache, which is flushed in the background.
Quote:
(Q2) If Q1 is yes, is there an analagous program to run for an external drive connected to CentOS?
Not quite. umount writes the data needed to properly close the filesystem, then sync schedules it to be written to disk, but neither one waits for the writes to complete. eject dooes this for removable devices like USB flash drives, but not for disk
Quote:
(Q3) Is the act of un-mounting (umount) equivalent to dumping outstanding buffers to the device?
Nope
Quote:
(Q4) What if I just turned off my SCSI drive? Will that have a disastrous effect on the PV that it is mapped to? I expect to use this drive for backups.
Don't do that
Quote:
(Q5) Since this is the first of many external backup drives, does it make sense to even place them within the context of LVM?
LVM doesn't matter. The above applies to filesystems on non-LVM disk also.
Quote:
(Q6) If I created a PV out of two external drives, would both have to be online at the same time for me to be able to access one of them?
If you want redundancy, you want an md (RAID).
 
  


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
DISCUSSION: External USB or firewire drives Steel_J LinuxAnswers Discussion 30 03-05-2012 01:46 PM
mount an external usb lvm scc28y Linux - General 4 01-12-2009 09:35 PM
problem seeing lvm partition on external usb hard disk kpachopoulos General 0 12-23-2006 04:43 AM
LVM with external USB drives pompeyjohn Linux - Hardware 0 10-01-2005 01:56 AM
pci SATA or SCSI controller or external usb HD kiko Slackware 1 02-05-2004 09:42 PM

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

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