Ubuntu :: Removing A Drive From A LVM Without Losing Date?
Jul 27, 2011
My little server box running 11.04 currently has two drives configured in a LVM, a 160gb internal drive and a 1tb usb drive.I have three logical volumes root and swap on the 160gb and backup on the 1tb. I am going to be changing the internal drive for a 8gb SSD and would like to keep the data currently on the external, is it possible to do this?
I had six partitions in my HDD, but due to some fatal error or virus, one has vanished itself. how to recover that drive without losing my precious data?
I installed Ubuntu 9.10 on half of my D drive about a year ago, but realized that I don't really need all the space on the Ubuntu partition. I have Windows Visa Home Premium installed on my C drive. Is there any way to re-size the drive on which I had installed Ubuntu without removing it?
When I replace a drive in a RAID 1 and then resync it, why does the file access date (all the files) on the drive from which I am syncing not change? Shouldn't the file access date always change when I copy a file? Are there ways to overgo this?
I have been attempting to load the latest version of Shotwell only to find that it is not available on 10.04. Consequently I attempted to load 10.10 and found that it would not load from my DVD. Similarly 11.04 fell at the wayside. Tried downloading both OSs again and again but each time failure to load.
Having come across reference to test drive I thought that I would give it a go and followed the instructions on this. It appeared to download OK but then would not display the OS. Decided to remove but despite it appearing to be removed (from the information displayed in the terminal) it still is loitering on the menu.
Since that failure I think that it could be related I am now being continuously asked to authenticate the keyring, something that from my initial install I have never needed to use.
Is there anything that could betray the time the USB memory drive was last removed ? I can't find it and the time would help me pinpoint what happened to it.fstab file last access time or something like that ?
The search function does not like "U3" so I cannot locate the latest in removing it. Has anyone figured out how to do so using Linux? (Explosive, maybe, but was the Stupix worm hidden in flash drives using the U3 tools?)
I did an installation of SUSE 11.2 on a new SCSI hard drive. Keeping the old hard drive separate. I remembered there was some info on the old hard drive I wanted.
I added this to the system and mounted a partition. I then copied the data over. Then I umounted the partition rebooted the machine and removed the hard drive.
However the machine will now not boot without this hard drive even though its not mounted. Not sure what the error message im given means I think it could be trying to fchk it.
Do I need to do something more like remove /dev/sdd ?
I have a flash drive that I used on my old netbook to temporally hold a copy of ubuntu as the netbooks internal drive was dead. I have since got a new netbook and wanted to return the flash drive to simple removable storage. I've re-partitioned it back to 14gb fat32 2gb ext2 and everything is working fine. Except that if I try to boot with the key inserted grub loads then errors imminently (sort of obvious if grub is still in the MBR but there is no menu.lst file anymore...) Googling for removal of GRUB just gives me loads of hits for how to restore windows mbrs when you dont want to keep linux anymore. None of these methods seem to have any targeting. I need to remove grub from sdb while keeping it intact in sda. sdb shouldn't even be bootable, so that when boot from usb is higher in the bios than boot from hdd the usb key is ignored and the hdd is booted as normal.
I want to install a new 500GB and remove the 320GB, of course moving the data on the 320GB to the new 500GB. I have an external 1TB in enclosure that I can plug in to move the data over, but how do I move only the data on the 320GB to it?? I found this [URL]. But that is only to move the data to a new replacement disk, but my external is only temporary to move the data from the 320GB until I remove it+install 500GB, then move the data back. Not enough space on the 500GB already on server to move everything from 320GB to it, just in case that seemed the obvious thing to do.
I tried to install Ubuntu on an external drive, but it doesn't boot, but it installed GRUB on my main HD, and now I can't even boot Windows. I only get a "grub rescue" prompt. I need to remove GRUB. How to do it?
I'm looking for a way to quickly remove all data/partitions/boot records from my hard drives while running linux (distribution is irelevant). There are lots of ways to do this that I know of, but they all have some problems. Here's a list of what I've tried/thought of already. The most obvious is fdisk: Simply delete all the partitions. This usually works just fine and is very quick, but there are times it just doesn't....I'm realy not sure what gets left behind...I remove the MBR as well..but whatever it is, it's in the way. A couple other options are:
Both of these approaches are great if you're selling the components and want to make it very difficult for anyone to recover data. The draw-back is they take so very long to run. I've got four 1.5 TB drives that I've been writing zeros to for 2 days now. If you thought watching grass grow or paint drying was boring. A hundred years ago or so, when I was doing tech support for Windows 95 users we used this nifty dos-based debug script to wipe the hard drive. It was sort-of a last resort thing, but it worked beautifully, most of the time. If the customer had already formated, fdisked, fdisk /mbr, reinstalled Windows, but still couldn't get the thing to work, this would clean the drive so you could do a fresh install.
Just in case someone wants this, I'll post it. To use: first boot to some type of DOS environment in which you have the program "debug".
After a couple of years, I decided this weekend to replace my old slackware 10.2 with the latest stable version 13.1 64 bit. The change log tells me that with the new kernel 2.6, the old IDE/ATA system has been removed and the libata is used instead. That /dev/hda become /dev/sda and so on. No problem sofar, however ...
My FIRST hardware configuration was: One SATA drives connected to the onboard SATA controller [A] Two PATA drive connected to PCI IDE controller 1 [B & C] Two PATA drive connected to PCI IDE controller 2 [D & E] One PATA drive connected to the onboard IDE controller [F]
So initially the system had 6 disk drives. Booting from the Slackware install dvd, I found out that the drives are detected in the following order. Onboard SATA controller PCI IDE Controllers Onboard IDE Controller
And the drives are get names in the following order: /dev/sda : SATA disk @ Onboard SATA controller /dev/sdb : first PATA disk @ PCI IDE controller 1 /dev/sdc : seconde PATA disk @ PCI IDE controller 1 /dev/sdd : first PATA disk @ PCI IDE controller 2 /dev/sde : seconde PATA disk @ PCI IDE controller 2 /dev/sdf : PATA disk @ Onboard IDE controller 1 sda upto sde are configured to us with LVM, so 4 disks are added to the volume group. sdf is where Slackware is installed (sdf1 = swap; sdf5 = /boot; sdf6 /; sdf7 = /usr; sdf8 = /home; sdf9 = /var; sdf10 = /tmp)
Here is the problem: When a 7th disk is added (another SATA drive @ Onboard SATA controller) then all names are changed like: sda remains the same sdb new added SATA drive sdb -> sdc sdc -> sdd sdd -> sdf sdf -> sdg
Obviously booting without LILO parameters results in a kernel panic, so I booted with: Linux boot=/dev/sdg root=/dev/sdg6. This does not give the kernel panic, but results in an option to check a drive and gives an option ctrl+d to boot normally. However it reboots and I get stuck at the same again.
How does LVM handle the naming shift of the drives? The 4 drives that are part of the volume group contain critical data!!! If needed, I can reinstall Slackware again from dvd with all 7 drives attached (to avoid naming shift), but how do I recover my volume group? What if one of the drives dies or is removed, then naming shift happens again.
I have a 7.9 TB logical volume I've created from 8 1 TB RAID 0 devices. The volume is formatted with XFS so I can resize when ready. However, I think I want to do something that is not possible. I have 2.5 TB free on my logical volume. I'd like to shrink the volume down to be 6 TB by getting rid of 2 of the 1 TB devices in the physical volume. However pvmove seems to require free extents in order to work. Do I need to add 6 TB of storage, pvmove everything onto it, and then decommission the original 8 1 TB physical devices from the volume?
I have a nightly scheduled script which creates a $vhostname directory under /mnt, mounts a windows box pointing to /mnt/$vhostname then rsyncs (pulls) some files/folders from the mount point. After this, I want to unmount the drive and remove the /mnt/$vhostname directory. Problem is that removing the /mnt/$vhostname directory sometimes ends up deleting all the files on the source! Example of script (stripped out lots of superfluous stuff):
It seems that my umount line isn't disconnecting the mount, leaving the following line to literally delete all directories, recursively. Is there a way of safely just deleting the directory (ie: mount link) without linux accidentally trashing the whole source?
I'm looking for a method for modifying some jpg photo files last modification date with the corresponding timestamp creation date of each file.The reason is that shotwell import pictures in folders according to last modification date which is stupid on my opinion.
I took some videos off a usb flash drive, then went and selected " safely remove usb" and the light continued to blink on the flashdrive, I pulled it out any way, and the root folder turned red... everything seems ok, but how do you know when it's ok to safely remove a usb devise ?
As a photographer I'm constantly taking photos and storing them in folders. Now occasionally I'm using two cameras (either for different settings or an assistant is also taking photos) which means that for one event I can have differently named images.Both cameras have the same time set (which always helps in Windows) but in Ubuntu when trying to sort my folder by date taken I can't.The options I'm given are to sort them: Manually, by Name, by Size, by Type, by Modification date and by Emblem.Now none of those are helpful to me once I've done a few edits to the images.So please if anyone knows, how do you organise a folder with images taken on different cameras by Date Taken rather than Date Edited?
I am trying to install freeBSD on F14 (with LUKS encryprion). freeBSD doesn't detect hard-drive, probably coz of LUKS? Now what can I do within F14 to format harddrive and remove LUKS to get in a shape that I can install freeBSD or other OS.
I am using CRON to create a new, blank file, every minute, in a specific location on my web server. After web searching, and reading man pages, I get the impression that the following command is supposed to work:touch /home/mydomain/var/folder/attachments/`date +%H%M`.txtThis should give me a new file with a file name that is the current hour and minute.However, when executed, the CRON mailer reports:touch /home/mydomain/var/folder/attachments/`date +/bin/sh: -c: line 0: unexpected EOF while looking for matching /bin/sh: -c: line 1: syntax error: unexpected end of fileSo, it looks like shell is seeing the plus (+) sign as an EOFObviously, nothing get created.What would be the easiest, single line command to create an empty file, at a given location, with a time based file name
I have a seagate SATA hard drive that was running a mythtv distro. It had 3 partitions, EXT3, swap, and XFS. I started having I/O errors on boot and saw error messages on both the EXT3 and the XFS partitions. I also heard some clunking sounds on the drive when it was reading, so I thought hell, the drive is dead.
I have since replaced the drive and everything is back up and running on the replacement drive. I thought hell, the seagate drive is toast, but I just want to verify it with some sort of tool. I have the hard drive in a Vantec NexStar external hard drive case (SATA->USB) and found there was a tool called badblocks. Ran badblocks on it, which ran for 24ish hours and found no bad blocks. I also didn't notice any clunking sounds while it was running.
I ran Code: badblocks -n -v /dev/sdb Is badblocks a proper test to run on external hard drives or was I just wasting my time? Is there any way that I can really test it without removing it and connecting it with SATA to the motherboard?
what i did was, remove evolution mail from synaptic, what i wanted to do was just remove the indicator applet from the task bar. i read a bunch of bad stuff about removing evolution from synaptic vs just removing the applet.
im worried. did i break anything or put my security at risk. after, i used a command (older) (sudo apt-get install ubuntu-desktop)to install ubuntu desktop. because i thought that it would fix evolution. then i went to synaptic and installed a package called evolution. i rechecked evolution in applications menu. however, i notice that i have both a checkable evolution and two evolution icons. nothing 'seems' broken. im not sure if it ever was. and evolution calender pops up as normal, as does the the installed plain evolution. they both seems to be an exact copy of the other.
all i really wanted to do was remove the indicator applet. did i make a serious mistake. since ive had ubuntu, ive reformatted a lot because i was worried i made a mistake of some kind. however now im into the more "make a mistake and fix it stage' as im pretty happy with my current desktop and have worked hard to customize it. the command, sudo apt-get remove indicator-messages removed the mail icon. i still am worried that i broke something, or put my security at risk. also, now i have two mail icons. evolution mail and calendar, and another just called evolution.
I have an old Dell Dimension 2400 and want to install the latest version of the OS. I downloaded the software and burnt the image to a CD. I new the CD had worked as it was recognized by my laptop. When i insert the disk into my CD drive i selected boot from CD drive. It came up with something like "IOSLINUX from a certian date to now" but didnt load.I load up the computer like normal and clicked on the CD from my computer. It came up with a message like " The application could not be loaded, reinstalling it may fix this".
I know a bunch of commands and I am comfortable using the terminal, I even set a powerpc server but I can't figure out how to remove epiphany on this new computer I'm setting up. I didn't install anything with tasksel. I installed gnome and xorg afterwards... I load it up and 'startx' just fine. then I check around for the programs that were installed. I lik'em gimp, lot's of utilities. gedit. anyway I find epiphany, which I have already established that I dislike, I immediately go to the root terminal (another nice program that comes with gnome) and type apt-get remove epiphany-browser-data the output says it will be deleting gnome... however I have researched and found these are simpy meta packages that don't really matter.... however under the section that states all the packages that will be removed by autoremove there is a huge list... I doubt these packages are safe to remove. how to remove epiphany without removing a huge amount of probably needed software
These should be my last pleas for help with regard to Fedora 13. I've been unable to turn off the notifications that appear in the top right corner, despite a decent amount of searching on google. I can't remove any notifications package without removing a bunch of important software along with it. Also, F13 refuses to "Safely Remove" either of my external disks. I have to yank out the usb cord, touching wood each time.
I just switched from a basic digital camera to a more advanced one that stores both Jpeg and Raw (.Nef - it's a Nikon) files for me.When importing files in Digikam, I rename the files so that they start with Date and Time. Example: 20110121-223748.JPG for a photo taken on Jan 21st 2011 at 22:37:48.I was a bit surprised when importing both the JPEG and the Raw version of the same photo, that the filename is different by a few seconds (no constant offset, sometimes they are the same):
20110121-223748.JPG 20110121-223750.NEF
I did some "research" by looking at the exif data of both files (using "exiftool 20110121-223748.JPG" from the command line). Here is what I got back
(amongst other data):20110121-223748.JPG File Modification Date/Time : 2011:01:21 22:37:48+01:00 Modify Date : 2011:01:21 22:37:48 Date/Time Original : 2011:01:21 22:37:48
[code]....
So it seems that Digikam is using the "File Modification Date/Time" (different in the Jpeg's and Raw's of my camera) rather than the "Create Date" (the same for both Jpeg and Raw). (The few seconds difference in "File Modification Date/Time" between the two versions of the same photo is probably due to the time that my camera needs to write away the data on the SD memory card. I guess.) Is there a way to have Digikam use the Create Date? (Or the Date/Time Original?)
I would really like to preserve a file's original modified date and pass it back to the file as the same attribute after a script has worked on it. I get a lot of JPEG files from different places on the Net which I either turn around and upload or burn to disk, and having the "original" date of either download or last mod in a graphics app would be for me, in the long run, a lot more helpful when deciding, for instance, which files to "recycle" or pass on backing up more than once.I've tried doing this on my own every now and then. Where I run into problems is that it appears "stat" and "date" use different formats for date information, and I can't seem to puzzle out how to "translate" one to the other satisfactorily for the latter command.
Just to give an example: stat foo.jpg |grep Modify gives me Modify: 2010-07-12 06:28:56.890625000 -0400
Passing that string as-is to date foo.jpg, I get the errordate: unknown option -- 0 and the usual semi-courteous suggestion to Try 'date --help' for more information.Somehow my TexInfo database got screwed up somewhere along the line and info dategives me the short article on date input formats, not the full documentation for the command