I second all this about labelling the drives. It makes them much easier to manage... But I mount my drives via UUID - that way I never have clashes. I'm a bit old school and used to mount by device name. But I have seen my device names move around live the proverbial shell game. So I bit the bullet and mounted via UUID. I still label them so they are readable,
you can map between labels and UUIDS by using the commands ls -l /dev/disk/by-label/ ls -l /dev/disk/by-id/ But sudo blkid -L is much easier Also don't think you can label FAT (and probably NTFS) file systems. So UUID has an advantage there as well ---------------------------------------------------------- Chris Martin m: 0419812371 ---------------------------------------------------------- On Fri, Apr 30, 2010 at 12:16 AM, Karl Bowden <[email protected]> wrote: > > > On 29 April 2010 20:38, Paul Gear <[email protected]> wrote: > >> On 28/04/10 14:00, Chris Martin wrote: >> >> Peter. >> >> This the short version... >> Contact me if you need more specific instructions >> >> >> A few suggestions, given that this was the short version. :-) >> >> >> >> Once you have the drive installed. >> >> use "gparted" - this is a GUI tool that will partition and format the new >> disk >> >> >> I'm not sure if gparted allows you to specify a label for the filesystem. >> If it doesn't, then you can add one later (with e2label), but i would >> strongly recommend adding a label, since then it makes no difference where >> the disk is connected. I would suggest a label of something like "/home". >> >> >> The mount it in a convenient location (say /mnt) >> >> Copy your existing /home to /mnt - takeing care to preserve permissions >> and ownership >> >> >> rsync is probably the best way to do this: you would run "rsync -SHavx >> /home/ /mnt/" (don't miss the trailing slashes). >> >> >> umount /mnt, >> >> mount your drive as /home - this will replace the directory /home with the >> content of the drive (however the original data in /home will still be >> preserved, just not accessible while the drive is mounted) >> >> test.. test.. test.. >> >> if all goes well, unmount /home, >> double check it is unmounted ... and check again >> >> delete the origional /home contents >> >> mount the drive as /home (again) >> >> >> Great advice there - mounting over the contents allows an absolutely >> painless recovery method if it doesn't work: just unmount the filesystem and >> you're back exactly where you were. >> >> >> edit /etc/fstab to make the change persistant across reboot and have /home >> mounted automatically on reboot >> >> >> When you edit fstab, use LABEL=/home for the device instead of /dev/sdb1 >> or whatever you've been using so far. That way, you can move the drive >> around without any issues. >> >> Paul >> > > I'd just like to second Paul's advice for using filesystem labels. If your > going to be adding disks in the future too or changing anything around it > makes life so much easier. It's almost like Ubuntu's use of UUID's for > filesystem identifiers, except readable. The trade off for > the reasonableness being increase of the chance that there will be multiple > filesystems with the same label. > Ie: I already have my harddrive partitioned to with root, home and swap > and labelled as written. I connect a friends harddrive to recover his home > folder for him, but his fs label is home too. Clash. But by that time at > least you will be aware of what is happening and should be pretty to fix. > This is not a warning though. Absolutely go for it. The benefits are great > when you see them pay off, just be aware of the possibility of a clash and > don't be afraid to ask for help if it happens. > > - Karl > > -- > ubuntu-au mailing list > [email protected] > https://lists.ubuntu.com/mailman/listinfo/ubuntu-au > >
-- ubuntu-au mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-au
