One for the *nix bods

Discussion in 'UK Motorcycles' started by Cab, Dec 7, 2006.

  1. Cab

    Cab Guest

    Cab, Dec 7, 2006
    #1
    1. Advertisements

  2. Cab

    Ace Guest

    Point of order - you're talking Linux, not Unix.

    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #2
    1. Advertisements

  3. Cab

    Cab Guest

    Same principles.
     
    Cab, Dec 7, 2006
    #3
  4. Cab

    Tim Guest

    I'd tend to agree with you. Logon as root and do it in single user mode
    or alternatively boot from the maintenance CD and then the disk
    filesystem will be fully available for alteration.
     
    Tim, Dec 7, 2006
    #4
  5. Cab

    Ace Guest

    Not in this case.
    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #5
  6. Cab

    Cab Guest

    Well, I'm using Redhat, but the same principles apply.

    What I'll do is:

    1. Create the partition
    2. Boot into single user mode
    3. Copy all stuff to the new partition using the "find . -depth -print0
    | cpio --null --sparse -pvd /mnt/newhome/" part from the URL (this
    should work as well as tar, no?)
    4. umount the old partition
    5. Rename the new partition to the name of the old partition
    6. Edit fstab to remove references to the old partition
    7. Reboot

    That should work, shouldn't it?

    The reason that I'm doing it this way, is that I keep on having
    problems with mdadm in mirroring /home from the existing partition to
    the new one. It keeps failing and reconstructing. Strangely enough,
    it's only on /home where I'm having the problem. It shouldn't be an
    issue with open files too, should it?

    I thought it was a bad block problem on both the old and new disks, but
    an fsck didn't seem to resolve the problem.
     
    Cab, Dec 7, 2006
    #6
  7. Cab

    Cab Guest

    Tell me how.
     
    Cab, Dec 7, 2006
    #7
  8. Cab

    Ace Guest

    The article is talking about partitioning a hard drive, which is
    effectively[1] a PC-only concept. Hence linux, not proper unix.


    [1] In this context.
    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #8
  9. Cab

    prawn Guest

    <chews imaginary beard>

    Probably.

    As other have said, boot from a CD first.

    For the second time this week this: http://www.ultimatebootcd.com/ can
    be handy.
     
    prawn, Dec 7, 2006
    #9
  10. Cab

    Cab Guest

    Hmm, I see your point, but I suppose somewhere out there, there are
    Unix systems that do use partitioning as opposed to something like LVM.
     
    Cab, Dec 7, 2006
    #10
  11. Cab

    ogden Guest

    Eh? Are you claiming that Solaris x86 isn't a proper Unix?
     
    ogden, Dec 7, 2006
    #11
  12. Cab

    Ace Guest

    Doubtless, but the topic being discussed would still, I'm sure, not be
    relevant to them.

    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #12
  13. Cab

    Ace Guest

    Damn. I thought I'd gotten away with it too.
    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #13
  14. Cab

    Cab Guest

    <fx: snort> :)
     
    Cab, Dec 7, 2006
    #14
  15. Cab

    Catman Guest

    Wot he said, though personally I'd not faff around with tar


    --
    Catman MIB#14 SKoGA#6 TEAR#4 BOTAFOF#38 Apostle#21 COSOC#3
    Tyger, Tyger Burning Bright (Remove rust to reply)
    Alfa 116 Giulietta 3.0l (Really) Sprint 1.7 75 TS 156 TS S2
    Triumph Speed Triple: Black with extra black bits
    www.cuore-sportivo.co.uk
     
    Catman, Dec 7, 2006
    #15
  16. You should do it in init 1 (or make sure that no-one is logged in
    except root) - home doesn't generally have that many files open unless
    you are running gnome/kde. For partitions like /var or /usr it's pretty
    much mandatory to be in runlevel 1.

    A better way to copy the files is to use the tar copy method as shown
    here:

    http://www.tech-recipes.com/unix_tips115.html

    You can play about with the tar parameters to handle sparse files or
    symlinks properly if you need to.

    This is the method I've always used to move file trees between devices
    (like on machines where the person who set it up didn't give sufficient
    space for stuff like the /var filesystem!).

    Phil
     
    Phil Launchbury, Dec 7, 2006
    #16
  17. And anyway - other unix versions (FreeBSD et. al.) use partitioning -
    they don't *call* it partitioning but they use it none the less.

    Phil
     
    Phil Launchbury, Dec 7, 2006
    #17
  18. Cab

    Cab Guest

    I'm glad I read the comments, because this seems to be the one to use:

    tar cf - * .??* .a .z .bc | ( cd /target; tar xfp -)

    But could I modify it to

    tar cf - * .??* .[a-zA-Z0-9] | ( cd /target; tar xfp -)

    to take into account any .? files?
     
    Cab, Dec 7, 2006
    #18
  19. Cab

    Ace Guest

    Yebbut, the techniques dicussed in the articel posted would not be
    relevant thereto, would they?

    --
    _______
    ..'_/_|_\_'. Ace (brucedotrogers a.t rochedotcom)
    \`\ | /`/ GSX-R1000K3 (slightly broken, currently missing)
    `\\ | //' BOTAFOT#3, SbS#2, UKRMMA#13, DFV#8, SKA#2, IBB#10
    `\|/`
    `
     
    Ace, Dec 7, 2006
    #19
  20. Cab

    Tim Guest

    Depends on how you have got the disk laid-out.
     
    Tim, Dec 7, 2006
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.