* [gentoo-user] migrating disks (from mounts to disklabels
@ 2010-11-17 21:59 James
2010-11-17 22:24 ` Alan McKinnon
` (2 more replies)
0 siblings, 3 replies; 32+ messages in thread
From: James @ 2010-11-17 21:59 UTC (permalink / raw
To: gentoo-user
Hello,
I have a ~250 gig sata disk I want to migrate to a 2T
Sata disk. This is simple, but, I have a few caveats.
old disk:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a1ff7
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6405 51448131 7 HPFS/NTFS
/dev/sda2 6406 6431 208845 83 Linux
/dev/sda3 6432 14080 61440592+ 83 Linux
/dev/sda4 14081 38913 199471072+ 5 Extended
/dev/sda5 14081 14861 6273351 82 Linux swap / Solaris
/dev/sda6 14862 26335 92164873+ 83 Linux
/dev/sda7 26336 38913 101032753+ 83 Linux
/dev/sda2 /boot reiserfs defaults 1 2
/dev/sda3 / reiserfs defaults 0 1
/dev/sda5 none swap sw 0 0
/dev/sda6 /usr/local reiserfs defaults 0 1
/dev/sda7 /usr/local/video reiserfs defaults 0 1
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
#/dev/fd0 /mnt/floppy auto noauto, 0 0
/dev/cdrom /mnt/cdrom auto noauto,rw,user 0 0
#/dev/sda1 /mnt/windows ntfs-3g 0 0
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5f61c272
Device Boot Start End Blocks Id System
<needs formatting and file systems installed>
OK, so I format using fdisk <no big deal>
<new disk will just have /(200G), swap, boot(250M) and one
bit fat /usr/local (1.8T)
Ok now I was going to use same reiserfs < no big deal>
unless I can use reiser4? good idea? <discuss-caveats>
OK now I want the new fstab to use disklabels
<old dog learning new trick here>
like this simple (few) partition scheme:
/dev/sdb3 200G 52G 42G 55% /
udev 10M 224K 9.8M 3% /dev
/dev/sdb1 250M 47M 189M 20% /boot
/dev/sdb4 1800G 125G 12G 92% /usr/local
Current <non disklabel fstab>
/dev/sda1 /boot reiserfs defaults 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / reiserfs defaults 0 1
/dev/sda4 /usr/local reiserfs defaults 0 1
/dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
/dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /proc proc defaults 0 0
so what does new fstab using disk labels look like?
Last, just dd it over like this?
dd if=/dev/sda of=/dev/sdb bs=32768
What did I miss?
Discussion, corrections or caveats are most welcome.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-17 21:59 James
@ 2010-11-17 22:24 ` Alan McKinnon
2010-11-18 23:47 ` Mick
2010-11-17 22:31 ` Florian Philipp
2010-11-18 4:20 ` Dale
2 siblings, 1 reply; 32+ messages in thread
From: Alan McKinnon @ 2010-11-17 22:24 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 23:59 on Wednesday 17 November 2010, James did
opine thusly:
> Hello,
>
> I have a ~250 gig sata disk I want to migrate to a 2T
> Sata disk. This is simple, but, I have a few caveats.
>
> old disk:
>
> Disk /dev/sda: 320.1 GB, 320072933376 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x000a1ff7
>
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 6405 51448131 7 HPFS/NTFS
> /dev/sda2 6406 6431 208845 83 Linux
> /dev/sda3 6432 14080 61440592+ 83 Linux
> /dev/sda4 14081 38913 199471072+ 5 Extended
> /dev/sda5 14081 14861 6273351 82 Linux swap /
> Solaris /dev/sda6 14862 26335 92164873+ 83 Linux
> /dev/sda7 26336 38913 101032753+ 83 Linux
>
>
> /dev/sda2 /boot reiserfs defaults 1 2
> /dev/sda3 / reiserfs defaults 0 1
> /dev/sda5 none swap sw 0 0
> /dev/sda6 /usr/local reiserfs defaults 0 1
> /dev/sda7 /usr/local/video reiserfs defaults 0 1
> none /proc proc defaults 0 0
> none /dev/shm tmpfs defaults 0 0
> /dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
> #/dev/fd0 /mnt/floppy auto noauto, 0 0
> /dev/cdrom /mnt/cdrom auto noauto,rw,user 0 0
> #/dev/sda1 /mnt/windows ntfs-3g 0 0
>
> Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x5f61c272
>
> Device Boot Start End Blocks Id System
>
> <needs formatting and file systems installed>
>
> OK, so I format using fdisk <no big deal>
No you don't. You will partition it with fdisk and format the filesystems with
mkfs*
> <new disk will just have /(200G), swap, boot(250M) and one
> bit fat /usr/local (1.8T)
>
>
> Ok now I was going to use same reiserfs < no big deal>
I dropped my beloved reiserfs systems of many years in favour of ext4. I was
seeing ext4 (and the much-hyped btrfs) racing forward into the distance with
improvements, useful features and more, while reiser3 languished. The last
straw was when I started getting fs errors for no good reason.
Let's face it, reiser was Hans. The team he left behind can do maintenance and
bug-fixes, but how many features have you seen added in two years?
> unless I can use reiser4? good idea? <discuss-caveats>
Yuck.
It's not in mainline and will never go in mainline.
It's not in the tree and will never go in the tree.
My understanding is it never actually got finished; and with all those plugins
it is just not possible to write a *real* fsck. I would not touch it myself
with your bargepole.
>
> OK now I want the new fstab to use disklabels
> <old dog learning new trick here>
>
> like this simple (few) partition scheme:
> /dev/sdb3 200G 52G 42G 55% /
> udev 10M 224K 9.8M 3% /dev
> /dev/sdb1 250M 47M 189M 20% /boot
> /dev/sdb4 1800G 125G 12G 92% /usr/local
>
> Current <non disklabel fstab>
>
> /dev/sda1 /boot reiserfs defaults 1 2
> /dev/sda2 none swap sw 0 0
> /dev/sda3 / reiserfs defaults 0 1
> /dev/sda4 /usr/local reiserfs defaults 0 1
> /dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
> /dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> none /proc proc defaults 0 0
>
> so what does new fstab using disk labels look like?
First you need to mkfs the filesystem with -L <label>
fstab looks like this:
LABEL=MY_BIG_DISK / reiserfs defaults 0 1
> Last, just dd it over like this?
> dd if=/dev/sda of=/dev/sdb bs=32768
Ahem no.
That will give you the *identical* filesystems on the new disk as were on the
old disk. Which means you have 250G used on a 2T disk with 1.75T
unpartitioned, plus the devil's own task of then getting it to be how you
actually want
> What did I miss?
The bit where you use a LiveCD :-)
The rub is, that you will be copying files that are subject to being changed,
especially /. It's a complete ball-ache trying to deal with this and it
involves multiple rsync's and holding of thumbs. A LiveCD lets you do it once
in complete confidence.
So install the new disk, fdisk it, mkfs it. Then boot off a LiveCD. If you
picked a good one, it will mount your disks at /mnt/sda and /mnt/sdb.
Now just rsync everything in /mnt/sda* to the right place in /mnt/sdb
You do not have exactly the same mount layout on sdb, so some intelligence is
needed to do it in the right order, such as in the case of /usr/local and
/usr/local/video
Reboot. Share. Enjoy.
>
> Discussion, corrections or caveats are most welcome.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-17 21:59 James
2010-11-17 22:24 ` Alan McKinnon
@ 2010-11-17 22:31 ` Florian Philipp
2010-11-18 8:48 ` Andrea Conti
2010-11-18 4:20 ` Dale
2 siblings, 1 reply; 32+ messages in thread
From: Florian Philipp @ 2010-11-17 22:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3275 bytes --]
Am 17.11.2010 22:59, schrieb James:
> Hello,
>
> I have a ~250 gig sata disk I want to migrate to a 2T
> Sata disk. This is simple, but, I have a few caveats.
>
[...]
>
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 6405 51448131 7 HPFS/NTFS
> /dev/sda2 6406 6431 208845 83 Linux
> /dev/sda3 6432 14080 61440592+ 83 Linux
> /dev/sda4 14081 38913 199471072+ 5 Extended
> /dev/sda5 14081 14861 6273351 82 Linux swap / Solaris
> /dev/sda6 14862 26335 92164873+ 83 Linux
> /dev/sda7 26336 38913 101032753+ 83 Linux
[...]
> <needs formatting and file systems installed>
>
> OK, so I format using fdisk <no big deal>
> <new disk will just have /(200G), swap, boot(250M) and one
> bit fat /usr/local (1.8T)
>
My advice: dd if=/dev/sda of=/dev/sdb bs=65535
You end up with a lot of empty space on the end your disk but it is easy
to extend your extended partition with GParted (or whatever) and then
add new logical partitions.
Alternative: Migrate to LVM for everything not needed for booting.
>
> Ok now I was going to use same reiserfs < no big deal>
> unless I can use reiser4? good idea? <discuss-caveats>
>
I guess you are a die-hard reiserfs user? You should really try ext4.
The perceived performance is much better than with ext3. Additional
advantages: Its development continues. With the next big patch, it will
scale well on multiple CPU cores.[1]
> OK now I want the new fstab to use disklabels
> <old dog learning new trick here>
>
> like this simple (few) partition scheme:
> /dev/sdb3 200G 52G 42G 55% /
> udev 10M 224K 9.8M 3% /dev
> /dev/sdb1 250M 47M 189M 20% /boot
> /dev/sdb4 1800G 125G 12G 92% /usr/local
>
> Current <non disklabel fstab>
>
> /dev/sda1 /boot reiserfs defaults 1 2
> /dev/sda2 none swap sw 0 0
> /dev/sda3 / reiserfs defaults 0 1
> /dev/sda4 /usr/local reiserfs defaults 0 1
> /dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
> /dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> none /proc proc defaults 0 0
>
> so what does new fstab using disk labels look like?
>
Just replace "/dev/sdb1" with "LABEL=boot", for example. Of course, your
file system needs to have that label. For Ext* you set it with `tune2fs
-L $label`, `e2label $label` or `mke2fs -L $label`. For reiserfs, it
should be similar.
Another approach (less readable but arguably less easy to break) is
using "UUID=...". You can find these out with dumpe2fs. I guess
something similar exists for reiserfs, as well.
> Last, just dd it over like this?
> dd if=/dev/sda of=/dev/sdb bs=32768
>
see above.
Hope this helps,
Florian Philipp
[1]
http://thunk.org/tytso/blog/2010/11/01/i-have-the-money-shot-for-my-lca-presentation/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-17 21:59 James
2010-11-17 22:24 ` Alan McKinnon
2010-11-17 22:31 ` Florian Philipp
@ 2010-11-18 4:20 ` Dale
2010-11-19 1:44 ` Walter Dnes
2 siblings, 1 reply; 32+ messages in thread
From: Dale @ 2010-11-18 4:20 UTC (permalink / raw
To: gentoo-user
James wrote:
>
> so what does new fstab using disk labels look like?
>
> << SNIP>>
>
> Discussion, corrections or caveats are most welcome.
>
>
>
>
This is mine and it worked when I rebooted a bit ago.
LABEL=boot /boot ext2 noatime 1 2
LABEL=root / reiserfs defaults 0 1
LABEL=swap none swap sw 0 0
LABEL=portage /usr/portage ext3 defaults 0 1
LABEL=home /home reiserfs defaults 1 1
LABEL=data /data reiserfs defaults 0 1
I use a variety of file systems don't I? lol I hope that helps.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-17 22:31 ` Florian Philipp
@ 2010-11-18 8:48 ` Andrea Conti
2010-11-18 11:42 ` Andrea Conti
0 siblings, 1 reply; 32+ messages in thread
From: Andrea Conti @ 2010-11-18 8:48 UTC (permalink / raw
To: gentoo-user
> Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
A small caveat -- if this is an "advanced format" drive be sure to use
fdisk in sector mode (fdisk -uc) and start the first partition on a
sector number which is a multiple of 8.
(Yes, I know it says "512 bytes physical sector size" above, but all
five of my 1TB AF WD greens happily advertise a 512 byte physical sector
size)
>> Ok now I was going to use same reiserfs < no big deal>
>> unless I can use reiser4? good idea? <discuss-caveats>
Assuming you care about your data, my advice is to drop reiserfs for
everything but unimportant, easily replaceable stuff (like
/usr/portage). Reiserfs undoubtedly has performance advantages in some
areas, but its structure is more prone to damage and it has lousy fs
utils. Ext4 might be slower at times but it is backed by a very well
tested and maintained fsck.
Reiser4? Not a chance in hell.
> Just replace "/dev/sdb1" with "LABEL=boot"
Small caveat: labels in /etc/fstab are ok (even for swap partitions,
just create them with mkswap -L), but you must still use a device name
in the "root" parameter on the kernel command line. Labels/UUIDs are not
supported there.
> Another approach (less readable but arguably less easy to break) is
> using "UUID=...". You can find these out with dumpe2fs. I guess
> something similar exists for reiserfs, as well.
or just ls -al /dev/disk/by-uuid
>> dd if=/dev/sda of=/dev/sdb bs=32768
Definitely not. Sure, you can grow the fs to fill the partition
aftwerwards (resize2fs or its reiser equivalent), but you will be
wasting time and taking unnecessary risks.
Boot from a livecd, create a new filesystem on the target, mount both
filesystems and use
rsync -aHPv /path/to/old/mountpoint/ /path/to/new/mountpoint/
or simply
tar c /path/to/old/ | tar xvp /path/to/new
rsync can show you the progress of the operation, which is nice, but it
is not available on all live cds (for example, gentoo-minimal did not
ship with it last time I checked). If you use rsync, pay special
attention to the -H option as -a (archive mode) does not preserve hard
links by default.
HTH,
andrea
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-18 8:48 ` Andrea Conti
@ 2010-11-18 11:42 ` Andrea Conti
0 siblings, 0 replies; 32+ messages in thread
From: Andrea Conti @ 2010-11-18 11:42 UTC (permalink / raw
To: gentoo-user
> tar c /path/to/old/ | tar xvp /path/to/new
Whoops... That should be
tar c -C /path/to/old/ . | tar xvp -C /path/to/new/
Sorry,
andrea
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-17 22:24 ` Alan McKinnon
@ 2010-11-18 23:47 ` Mick
0 siblings, 0 replies; 32+ messages in thread
From: Mick @ 2010-11-18 23:47 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 2093 bytes --]
On Wednesday 17 November 2010 22:24:23 Alan McKinnon wrote:
> Apparently, though unproven, at 23:59 on Wednesday 17 November 2010, James
> did opine thusly:
> > Hello,
> >
> > I have a ~250 gig sata disk I want to migrate to a 2T
> > Sata disk. This is simple, but, I have a few caveats.
[snip ...]
> >
> > Ok now I was going to use same reiserfs < no big deal>
>
> I dropped my beloved reiserfs systems of many years in favour of ext4. I
> was seeing ext4 (and the much-hyped btrfs) racing forward into the
> distance with improvements, useful features and more, while reiser3
> languished. The last straw was when I started getting fs errors for no
> good reason.
>
> Let's face it, reiser was Hans. The team he left behind can do maintenance
> and bug-fixes, but how many features have you seen added in two years?
>
> > unless I can use reiser4? good idea? <discuss-caveats>
>
> Yuck.
> It's not in mainline and will never go in mainline.
> It's not in the tree and will never go in the tree.
Hmm ... that's not what is mooted here:
http://www.phoronix.com/scan.php?page=news_item&px=NzY4OQ
> My understanding is it never actually got finished; and with all those
> plugins it is just not possible to write a *real* fsck. I would not touch
> it myself with your bargepole.
It seems that it is still under development, but perhaps not as fast as it
were when Hans Reiser was at it full time.
I have been using reiser4 for almost a year. It *is* fast!
http://www.phoronix.com/scan.php?page=article&item=reiser4_benchmarks&num=1
However, Alan's point about a <aheam!> questionable fsck.reiser4 seems correct
if my experience is anything to go by:
I've had a number of fs corruptions (could be dodgy hardware?) and some of
them have not recovered gracefully. :-(
Some data (files) were lost a couple of times. I don't know if I should blame
the disk, the fs or the fsck.reiser4 command, but it is clear to me that
reiser4 is not as reliable as reiserfs was for me for over 6 years.
YMMV.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-18 4:20 ` Dale
@ 2010-11-19 1:44 ` Walter Dnes
2010-11-19 9:04 ` Alan McKinnon
0 siblings, 1 reply; 32+ messages in thread
From: Walter Dnes @ 2010-11-19 1:44 UTC (permalink / raw
To: gentoo-user
On Wed, Nov 17, 2010 at 10:20:52PM -0600, Dale wrote
> This is mine and it worked when I rebooted a bit ago.
>
> LABEL=boot /boot ext2 noatime 1 2
> LABEL=root / reiserfs defaults 0 1
> LABEL=swap none swap sw 0 0
> LABEL=portage /usr/portage ext3 defaults 0 1
> LABEL=home /home reiserfs defaults 1 1
> LABEL=data /data reiserfs defaults 0 1
>
> I use a variety of file systems don't I? lol I hope that helps.
I have my own weird setup that optimizes disk usage, without LVM. It
consists of a 256 *MEGA*byte / partition (ext2fs), some swap, and the
rest of the drive is one big reiserfs3 partition mounted as /home.
/opt, /var, /usr/, and /tmp physically reside on the big /home
partition, but are bindmounted into the / partition.
Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 5 Extended
/dev/sda5 1 33 265009+ 83 Linux
/dev/sda6 34 1209 9446188+ 82 Linux swap / Solaris
/dev/sda7 1210 121601 967048708+ 83 Linux
/dev/sda5 / ext2 noatime,nodiratime,async 0 1
/dev/sda7 /home reiserfs noatime,nodiratime,async,notail 0 1
/home/bindmounts/opt /opt auto bind 0 0
/home/bindmounts/var /var auto bind 0 0
/home/bindmounts/usr /usr auto bind 0 0
/home/bindmounts/tmp /tmp auto bind 0 0
/dev/sda6 none swap sw 0 0
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 1:44 ` Walter Dnes
@ 2010-11-19 9:04 ` Alan McKinnon
2010-11-19 10:49 ` Marius Vaitiekunas
` (2 more replies)
0 siblings, 3 replies; 32+ messages in thread
From: Alan McKinnon @ 2010-11-19 9:04 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 03:44 on Friday 19 November 2010, Walter Dnes
did opine thusly:
> On Wed, Nov 17, 2010 at 10:20:52PM -0600, Dale wrote
>
> > This is mine and it worked when I rebooted a bit ago.
> >
> > LABEL=boot /boot ext2 noatime 1 2
> > LABEL=root / reiserfs defaults 0 1
> > LABEL=swap none swap sw 0 0
> > LABEL=portage /usr/portage ext3 defaults 0 1
> > LABEL=home /home reiserfs defaults 1 1
> > LABEL=data /data reiserfs defaults 0 1
> >
> > I use a variety of file systems don't I? lol I hope that helps.
>
> I have my own weird setup that optimizes disk usage, without LVM. It
> consists of a 256 *MEGA*byte / partition (ext2fs), some swap, and the
> rest of the drive is one big reiserfs3 partition mounted as /home.
> /opt, /var, /usr/, and /tmp physically reside on the big /home
> partition, but are bindmounted into the / partition.
>
> Device Boot Start End Blocks Id System
> /dev/sda1 1 121601 976760001 5 Extended
> /dev/sda5 1 33 265009+ 83 Linux
> /dev/sda6 34 1209 9446188+ 82 Linux swap /
> Solaris /dev/sda7 1210 121601 967048708+ 83 Linux
>
> /dev/sda5 / ext2 noatime,nodiratime,async
> 0 1 /dev/sda7 /home reiserfs
> noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt auto
> bind 0 0 /home/bindmounts/var /var
> auto bind 0 0 /home/bindmounts/usr /usr
> auto bind 0 0 /home/bindmounts/tmp
> /tmp auto bind 0 0 /dev/sda6
> none swap sw 0 0
Let me optimize that for you a little bit more:
A single 1T reiser3 partition mounted at /
This will optimize away the small performance loss introduced by that (empty)
/ on ext2
Seriously dude, this looks like a dumb scheme that gives you warm and fuzzies
but doesn't actually accomplish anything except increased complexity.
Feel free to publish verifiable metrics to back up your case.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 9:04 ` Alan McKinnon
@ 2010-11-19 10:49 ` Marius Vaitiekunas
2010-11-19 12:07 ` Alan McKinnon
2010-11-19 10:52 ` Mick
2010-11-23 4:06 ` Walter Dnes
2 siblings, 1 reply; 32+ messages in thread
From: Marius Vaitiekunas @ 2010-11-19 10:49 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2636 bytes --]
Hi,
One question about ext4. Is it possible to resize partition without
unmounting it like on reiserfs filesystem?
On Fri, Nov 19, 2010 at 11:04 AM, Alan McKinnon <alan.mckinnon@gmail.com>wrote:
> Apparently, though unproven, at 03:44 on Friday 19 November 2010, Walter
> Dnes
> did opine thusly:
>
> > On Wed, Nov 17, 2010 at 10:20:52PM -0600, Dale wrote
> >
> > > This is mine and it worked when I rebooted a bit ago.
> > >
> > > LABEL=boot /boot ext2 noatime 1 2
> > > LABEL=root / reiserfs defaults 0 1
> > > LABEL=swap none swap sw 0 0
> > > LABEL=portage /usr/portage ext3 defaults 0 1
> > > LABEL=home /home reiserfs defaults 1 1
> > > LABEL=data /data reiserfs defaults 0 1
> > >
> > > I use a variety of file systems don't I? lol I hope that helps.
> >
> > I have my own weird setup that optimizes disk usage, without LVM. It
> > consists of a 256 *MEGA*byte / partition (ext2fs), some swap, and the
> > rest of the drive is one big reiserfs3 partition mounted as /home.
> > /opt, /var, /usr/, and /tmp physically reside on the big /home
> > partition, but are bindmounted into the / partition.
> >
> > Device Boot Start End Blocks Id System
> > /dev/sda1 1 121601 976760001 5 Extended
> > /dev/sda5 1 33 265009+ 83 Linux
> > /dev/sda6 34 1209 9446188+ 82 Linux swap /
> > Solaris /dev/sda7 1210 121601 967048708+ 83 Linux
> >
> > /dev/sda5 / ext2 noatime,nodiratime,async
> > 0 1 /dev/sda7 /home reiserfs
> > noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt
> auto
> > bind 0 0 /home/bindmounts/var /var
> > auto bind 0 0 /home/bindmounts/usr /usr
> > auto bind 0 0 /home/bindmounts/tmp
> > /tmp auto bind 0 0 /dev/sda6
> > none swap sw 0 0
>
>
> Let me optimize that for you a little bit more:
>
> A single 1T reiser3 partition mounted at /
>
> This will optimize away the small performance loss introduced by that
> (empty)
> / on ext2
>
> Seriously dude, this looks like a dumb scheme that gives you warm and
> fuzzies
> but doesn't actually accomplish anything except increased complexity.
>
> Feel free to publish verifiable metrics to back up your case.
>
>
> --
> alan dot mckinnon at gmail dot com
>
>
--
mv
[-- Attachment #2: Type: text/html, Size: 3318 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 9:04 ` Alan McKinnon
2010-11-19 10:49 ` Marius Vaitiekunas
@ 2010-11-19 10:52 ` Mick
2010-11-19 14:42 ` Neil Bothwick
2010-11-23 4:06 ` Walter Dnes
2 siblings, 1 reply; 32+ messages in thread
From: Mick @ 2010-11-19 10:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 3248 bytes --]
On Friday 19 November 2010 09:04:26 Alan McKinnon wrote:
> Apparently, though unproven, at 03:44 on Friday 19 November 2010, Walter
> Dnes
>
> did opine thusly:
> > On Wed, Nov 17, 2010 at 10:20:52PM -0600, Dale wrote
> >
> > > This is mine and it worked when I rebooted a bit ago.
> > >
> > > LABEL=boot /boot ext2 noatime 1 2
> > > LABEL=root / reiserfs defaults 0 1
> > > LABEL=swap none swap sw 0 0
> > > LABEL=portage /usr/portage ext3 defaults 0 1
> > > LABEL=home /home reiserfs defaults 1 1
> > > LABEL=data /data reiserfs defaults 0 1
> > >
> > > I use a variety of file systems don't I? lol I hope that helps.
> > >
> > I have my own weird setup that optimizes disk usage, without LVM. It
> >
> > consists of a 256 *MEGA*byte / partition (ext2fs), some swap, and the
> > rest of the drive is one big reiserfs3 partition mounted as /home.
> > /opt, /var, /usr/, and /tmp physically reside on the big /home
> > partition, but are bindmounted into the / partition.
> >
> > Device Boot Start End Blocks Id System
> >
> > /dev/sda1 1 121601 976760001 5 Extended
> > /dev/sda5 1 33 265009+ 83 Linux
> > /dev/sda6 34 1209 9446188+ 82 Linux swap /
> > Solaris /dev/sda7 1210 121601 967048708+ 83 Linux
> >
> > /dev/sda5 / ext2 noatime,nodiratime,async
> > 0 1 /dev/sda7 /home reiserfs
> > noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt
> > auto
> >
> > bind 0 0 /home/bindmounts/var /var
> >
> > auto bind 0 0 /home/bindmounts/usr /usr
> >
> > auto bind 0 0 /home/bindmounts/tmp
> >
> > /tmp auto bind 0 0 /dev/sda6
> >
> > none swap sw 0 0
>
> Let me optimize that for you a little bit more:
>
> A single 1T reiser3 partition mounted at /
>
> This will optimize away the small performance loss introduced by that
> (empty) / on ext2
>
> Seriously dude, this looks like a dumb scheme that gives you warm and
> fuzzies but doesn't actually accomplish anything except increased
> complexity.
>
> Feel free to publish verifiable metrics to back up your case.
Haven't we been around the houses with this 4 years ago, only to conclude that
this is how Walter liked to run his fs? I can't recall what the main benefit
was (other than backing up a single physical partition), but I think it was
argued at the time that performance wise it would be better if all these
directories were placed directly in their own independent partitions (esp.
/tmp, /var and perhaps /usr).
Also primary partitions which he does not seem to be using at all have a
slight edge over logical.
Anyway, this is Gentoo linux afterall so we can play tunes on our fs
architecture more freely than other OS/distros to meet our particular needs.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 10:49 ` Marius Vaitiekunas
@ 2010-11-19 12:07 ` Alan McKinnon
2010-11-19 14:41 ` Neil Bothwick
0 siblings, 1 reply; 32+ messages in thread
From: Alan McKinnon @ 2010-11-19 12:07 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 12:49 on Friday 19 November 2010, Marius
Vaitiekunas did opine thusly:
> Hi,
> One question about ext4. Is it possible to resize partition without
> unmounting it like on reiserfs filesystem?
Yes, you can grow a mounted filesystem, just not shrink it. Most decent Unix
filesystems support this, I think xfs is the only one in common use that
doesn't.
>
> On Fri, Nov 19, 2010 at 11:04 AM, Alan McKinnon
<alan.mckinnon@gmail.com>wrote:
> > Apparently, though unproven, at 03:44 on Friday 19 November 2010, Walter
> > Dnes
> >
> > did opine thusly:
> > > On Wed, Nov 17, 2010 at 10:20:52PM -0600, Dale wrote
> > >
> > > > This is mine and it worked when I rebooted a bit ago.
> > > >
> > > > LABEL=boot /boot ext2 noatime 1 2
> > > > LABEL=root / reiserfs defaults 0 1
> > > > LABEL=swap none swap sw 0 0
> > > > LABEL=portage /usr/portage ext3 defaults 0 1
> > > > LABEL=home /home reiserfs defaults 1 1
> > > > LABEL=data /data reiserfs defaults 0 1
> > > >
> > > > I use a variety of file systems don't I? lol I hope that helps.
> > > >
> > > I have my own weird setup that optimizes disk usage, without LVM. It
> > >
> > > consists of a 256 *MEGA*byte / partition (ext2fs), some swap, and the
> > > rest of the drive is one big reiserfs3 partition mounted as /home.
> > > /opt, /var, /usr/, and /tmp physically reside on the big /home
> > > partition, but are bindmounted into the / partition.
> > >
> > > Device Boot Start End Blocks Id System
> > >
> > > /dev/sda1 1 121601 976760001 5 Extended
> > > /dev/sda5 1 33 265009+ 83 Linux
> > > /dev/sda6 34 1209 9446188+ 82 Linux swap /
> > > Solaris /dev/sda7 1210 121601 967048708+ 83 Linux
> > >
> > > /dev/sda5 / ext2 noatime,nodiratime,async
> > > 0 1 /dev/sda7 /home reiserfs
> > > noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt
> >
> > auto
> >
> > > bind 0 0 /home/bindmounts/var /var
> > >
> > > auto bind 0 0 /home/bindmounts/usr
> > > /usr
> > >
> > > auto bind 0 0 /home/bindmounts/tmp
> > >
> > > /tmp auto bind 0 0 /dev/sda6
> > >
> > > none swap sw 0 0
> >
> > Let me optimize that for you a little bit more:
> >
> > A single 1T reiser3 partition mounted at /
> >
> > This will optimize away the small performance loss introduced by that
> > (empty)
> > / on ext2
> >
> > Seriously dude, this looks like a dumb scheme that gives you warm and
> > fuzzies
> > but doesn't actually accomplish anything except increased complexity.
> >
> > Feel free to publish verifiable metrics to back up your case.
> >
> >
> > --
> > alan dot mckinnon at gmail dot com
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 12:07 ` Alan McKinnon
@ 2010-11-19 14:41 ` Neil Bothwick
2010-11-19 15:04 ` Alan McKinnon
0 siblings, 1 reply; 32+ messages in thread
From: Neil Bothwick @ 2010-11-19 14:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
On Fri, 19 Nov 2010 14:07:54 +0200, Alan McKinnon wrote:
> Yes, you can grow a mounted filesystem, just not shrink it. Most decent
> Unix filesystems support this, I think xfs is the only one in common
> use that doesn't.
XFS allows growing a mounted filesystem, but it has no option to shrink a
filesystem, mounted or otherwise.
--
Neil Bothwick
Top Oxymorons Number 35: Legally drunk
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 10:52 ` Mick
@ 2010-11-19 14:42 ` Neil Bothwick
2010-11-19 15:55 ` Peter Humphrey
0 siblings, 1 reply; 32+ messages in thread
From: Neil Bothwick @ 2010-11-19 14:42 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
> Also primary partitions which he does not seem to be using at all have
> a slight edge over logical.
Do you have any data on this? I generally use all logical partitions but
could be persuaded to rethink.
--
Neil Bothwick
Top Oxymorons Number 11: Terribly pleased
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 14:41 ` Neil Bothwick
@ 2010-11-19 15:04 ` Alan McKinnon
2010-11-19 23:03 ` Neil Bothwick
0 siblings, 1 reply; 32+ messages in thread
From: Alan McKinnon @ 2010-11-19 15:04 UTC (permalink / raw
To: gentoo-user; +Cc: Neil Bothwick
Apparently, though unproven, at 16:41 on Friday 19 November 2010, Neil
Bothwick did opine thusly:
> On Fri, 19 Nov 2010 14:07:54 +0200, Alan McKinnon wrote:
> > Yes, you can grow a mounted filesystem, just not shrink it. Most decent
> > Unix filesystems support this, I think xfs is the only one in common
> > use that doesn't.
>
> XFS allows growing a mounted filesystem, but it has no option to shrink a
> filesystem, mounted or otherwise.
Ah, ok.
xfs isn't something I use and I had a niggling thought I might have got the
details wrong. Thanks for that.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 14:42 ` Neil Bothwick
@ 2010-11-19 15:55 ` Peter Humphrey
0 siblings, 0 replies; 32+ messages in thread
From: Peter Humphrey @ 2010-11-19 15:55 UTC (permalink / raw
To: gentoo-user
On Friday 19 November 2010 14:42:23 Neil Bothwick wrote:
> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
> > Also primary partitions which he does not seem to be using at all
> > have a slight edge over logical.
>
> Do you have any data on this? I generally use all logical partitions
> but could be persuaded to rethink.
Well there must be one level of indirection on first access, since the
start of the logical partition has to be looked up in a "primary"
partition, but I can't imagine that being needed more than once per
reboot.
FWIW I use primaries for /boot, primary swap and (often) / but can't for
anything else. I do this to obtain more accessible partitions because I
used to try to cram several distros into one box.
--
Rgds
Peter. Linux Counter 5290, 1994-04-23.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
[not found] ` <fQBxy-4QA-45@gated-at.bofh.it>
@ 2010-11-19 19:19 ` David W Noon
2010-11-19 22:13 ` Mick
0 siblings, 1 reply; 32+ messages in thread
From: David W Noon @ 2010-11-19 19:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
On Fri, 19 Nov 2010 17:00:04 +0100, Peter Humphrey wrote about Re:
[gentoo-user] migrating disks (from mounts to disklabels:
>On Friday 19 November 2010 14:42:23 Neil Bothwick wrote:
>> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
>> > Also primary partitions which he does not seem to be using at all
>> > have a slight edge over logical.
>>
>> Do you have any data on this? I generally use all logical partitions
>> but could be persuaded to rethink.
>
>Well there must be one level of indirection on first access, since the
>start of the logical partition has to be looked up in a "primary"
>partition, but I can't imagine that being needed more than once per
>reboot.
Correct.
The same applies to LVM2 or EVMS logical volumes: a small "lookup"
penalty (a few milliseconds) when the filesystem is first
activated/mounted, and as fast as the drive itself thereafter.
--
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 19:19 ` [gentoo-user] migrating disks (from mounts to disklabels David W Noon
@ 2010-11-19 22:13 ` Mick
2010-11-19 22:45 ` Alan McKinnon
` (2 more replies)
0 siblings, 3 replies; 32+ messages in thread
From: Mick @ 2010-11-19 22:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1529 bytes --]
On Friday 19 November 2010 19:19:34 David W Noon wrote:
> On Fri, 19 Nov 2010 17:00:04 +0100, Peter Humphrey wrote about Re:
>
> [gentoo-user] migrating disks (from mounts to disklabels:
> >On Friday 19 November 2010 14:42:23 Neil Bothwick wrote:
> >> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
> >> > Also primary partitions which he does not seem to be using at all
> >> > have a slight edge over logical.
> >>
> >> Do you have any data on this? I generally use all logical partitions
> >> but could be persuaded to rethink.
> >
> >Well there must be one level of indirection on first access, since the
> >start of the logical partition has to be looked up in a "primary"
> >partition, but I can't imagine that being needed more than once per
> >reboot.
>
> Correct.
>
> The same applies to LVM2 or EVMS logical volumes: a small "lookup"
> penalty (a few milliseconds) when the filesystem is first
> activated/mounted, and as fast as the drive itself thereafter.
Short of measuring the latency with some system (which I wouldn't know how) I
have experimented with setting the /boot partition on primary and logical
partitions and the difference (on a stopwatch) was measurable in seconds
betweeen having said partition on a primary and having it on a logical.
Furthermore, sda7 was slower than sda5.
I haven't measured latencies for first mount and subsequent look ups. I
thought that it would be the same every time a partition fs is being accessed,
no?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 22:13 ` Mick
@ 2010-11-19 22:45 ` Alan McKinnon
2010-11-19 23:21 ` Neil Bothwick
2010-11-20 2:17 ` Peter Humphrey
2 siblings, 0 replies; 32+ messages in thread
From: Alan McKinnon @ 2010-11-19 22:45 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 00:13 on Saturday 20 November 2010, Mick did
opine thusly:
> On Friday 19 November 2010 19:19:34 David W Noon wrote:
> > On Fri, 19 Nov 2010 17:00:04 +0100, Peter Humphrey wrote about Re:
> >
> > [gentoo-user] migrating disks (from mounts to disklabels:
> > >On Friday 19 November 2010 14:42:23 Neil Bothwick wrote:
> > >> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
> > >> > Also primary partitions which he does not seem to be using at all
> > >> > have a slight edge over logical.
> > >>
> > >> Do you have any data on this? I generally use all logical partitions
> > >> but could be persuaded to rethink.
> > >
> > >Well there must be one level of indirection on first access, since the
> > >start of the logical partition has to be looked up in a "primary"
> > >partition, but I can't imagine that being needed more than once per
> > >reboot.
> >
> > Correct.
> >
> > The same applies to LVM2 or EVMS logical volumes: a small "lookup"
> > penalty (a few milliseconds) when the filesystem is first
> > activated/mounted, and as fast as the drive itself thereafter.
>
> Short of measuring the latency with some system (which I wouldn't know how)
> I have experimented with setting the /boot partition on primary and
> logical partitions and the difference (on a stopwatch) was measurable in
> seconds betweeen having said partition on a primary and having it on a
> logical. Furthermore, sda7 was slower than sda5.
>
> I haven't measured latencies for first mount and subsequent look ups. I
> thought that it would be the same every time a partition fs is being
> accessed, no?
Not at all. There's this thing the kernel does called caching.
Yes, I know you can invalidate the entire cache and force the next read to
come from disk, but that is completely devoid of reality. Very very few
machines actually do that or anything remotely similar. So measuring it does
give pretty numbers, pretty meaningless numbers.
The kernel will cache the entire partition layout scheme and any mapping it
needs in order to determine where blocks lie on the disk. Any thought that it
won't is just so bat-shit insane and so far out there it's not even worth
contemplating.
Thus, the question that sparked this thread off is entirely moot.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 15:04 ` Alan McKinnon
@ 2010-11-19 23:03 ` Neil Bothwick
2010-11-19 23:28 ` Alan McKinnon
0 siblings, 1 reply; 32+ messages in thread
From: Neil Bothwick @ 2010-11-19 23:03 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
On Fri, 19 Nov 2010 17:04:03 +0200, Alan McKinnon wrote:
> > XFS allows growing a mounted filesystem, but it has no option to
> > shrink a filesystem, mounted or otherwise.
> xfs isn't something I use and I had a niggling thought I might have got
> the details wrong. Thanks for that.
It's quite a limitation. I don't normally need to shrink a filesystem,
since I use LVM to only make them as large as they need to be, but it's
bitten me a couple of times. Maybe it's time to see how ext4 does with
large files.
--
Neil Bothwick
Half of being smart is knowing what you're dumb at.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 22:13 ` Mick
2010-11-19 22:45 ` Alan McKinnon
@ 2010-11-19 23:21 ` Neil Bothwick
2010-11-20 0:22 ` Alan McKinnon
2010-11-20 2:17 ` Peter Humphrey
2 siblings, 1 reply; 32+ messages in thread
From: Neil Bothwick @ 2010-11-19 23:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
On Fri, 19 Nov 2010 22:13:50 +0000, Mick wrote:
> Short of measuring the latency with some system (which I wouldn't know
> how) I have experimented with setting the /boot partition on primary
> and logical partitions and the difference (on a stopwatch) was
> measurable in seconds betweeen having said partition on a primary and
> having it on a logical.
Are you talking about GRUB loading time, kernel loading or what?
Since /boot isn't normally mounted or used once the kernel is loaded, I
don't see how relevant this is.
--
Neil Bothwick
[unwieldy legal disclaimer would go here - feel free to type your own]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 23:03 ` Neil Bothwick
@ 2010-11-19 23:28 ` Alan McKinnon
0 siblings, 0 replies; 32+ messages in thread
From: Alan McKinnon @ 2010-11-19 23:28 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 01:03 on Saturday 20 November 2010, Neil
Bothwick did opine thusly:
> On Fri, 19 Nov 2010 17:04:03 +0200, Alan McKinnon wrote:
> > > XFS allows growing a mounted filesystem, but it has no option to
> > > shrink a filesystem, mounted or otherwise.
> >
> > xfs isn't something I use and I had a niggling thought I might have got
> > the details wrong. Thanks for that.
>
> It's quite a limitation. I don't normally need to shrink a filesystem,
> since I use LVM to only make them as large as they need to be, but it's
> bitten me a couple of times. Maybe it's time to see how ext4 does with
> large files.
If it were say JFS that had that limitation, one could easily say "use ext3
instead" and life would be good. But xfs is very very good at dealing with
huge directories with thousands of files. Think video rendering. Or anything
with a spool.
One might easily want to temporarily grow a spool dir for one run then shrink
it again later. Maybe use a spare extra drive for that. Whatever.
Ah, but xfs can't do that. Bugger.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 23:21 ` Neil Bothwick
@ 2010-11-20 0:22 ` Alan McKinnon
2010-11-20 16:59 ` Mick
0 siblings, 1 reply; 32+ messages in thread
From: Alan McKinnon @ 2010-11-20 0:22 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 01:21 on Saturday 20 November 2010, Neil
Bothwick did opine thusly:
> On Fri, 19 Nov 2010 22:13:50 +0000, Mick wrote:
> > Short of measuring the latency with some system (which I wouldn't know
> > how) I have experimented with setting the /boot partition on primary
> > and logical partitions and the difference (on a stopwatch) was
> > measurable in seconds betweeen having said partition on a primary and
> > having it on a logical.
>
> Are you talking about GRUB loading time, kernel loading or what?
> Since /boot isn't normally mounted or used once the kernel is loaded, I
> don't see how relevant this is.
And:
Boot time differences measured in *seconds*?
fifty bucks says his fsck number came up
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 22:13 ` Mick
2010-11-19 22:45 ` Alan McKinnon
2010-11-19 23:21 ` Neil Bothwick
@ 2010-11-20 2:17 ` Peter Humphrey
2 siblings, 0 replies; 32+ messages in thread
From: Peter Humphrey @ 2010-11-20 2:17 UTC (permalink / raw
To: gentoo-user
On Friday 19 November 2010 22:13:50 Mick wrote:
> Short of measuring the latency with some system (which I wouldn't
> know how) I have experimented with setting the /boot partition on
> primary and logical partitions and the difference (on a stopwatch)
> was measurable in seconds betweeen having said partition on a
> primary and having it on a logical. Furthermore, sda7 was slower
> than sda5.
>
> I haven't measured latencies for first mount and subsequent look ups.
> I thought that it would be the same every time a partition fs is
> being accessed, no?
I shouldn't design it that way. Would you?
Consider the layout of the disk. First we have the master boot record,
which contains the disk addresses of the four allowable primary
partitions*, and not much else besides the primitive boot code to fetch
the data from those addresses. Then each primary partition has the
address of its first directory containing data. Those five parameters are
assumed to be fixed and can be held in a small lookup table in the OS.
One primary partition may be declared as an "extended" partition, by the
setting of a single bit in its entry in the MBR**. That partition has to
have the same header layout as the others, in particular not allowing
more than one data address***. In this case it's the address not of the
first directory but of the first logical partition - and that partition
has to have the same header layout again, because it's just a partition
full of data, isn't it?
The answer to your question is that only very few values are needed to
specify the fixed start points of all the partitions on the disk, and
virtually no overhead is involved in storing them for the inevitably
frequent use they're going to get.
(Sorry if I'm rambling. I've been down with the dreaded lurgy for a day
or two, and after a small glass of wine this evening I'm having trouble
focusing on the screen, never mind my thoughts.)
* One partition is plenty for all normal folk, especially those who run
an OS that's convinced it's the only entity in the universe - who could
possibly want more than four? And just don't mention 640KB memory unless
you're prepared for fisticuffs.
** Talk about a single point of failure!
*** Well, of course it doesn't, but what would we do without hindsight?
--
Rgds
Peter. Linux Counter 5290, 1994-04-23.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
[not found] ` <fQIfD-8dr-13@gated-at.bofh.it>
@ 2010-11-20 13:26 ` David W Noon
2010-11-20 14:57 ` Neil Bothwick
2010-11-20 17:24 ` Mick
0 siblings, 2 replies; 32+ messages in thread
From: David W Noon @ 2010-11-20 13:26 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2833 bytes --]
On Sat, 20 Nov 2010 00:10:02 +0100, Mick wrote about Re: [gentoo-user]
migrating disks (from mounts to disklabels:
>On Friday 19 November 2010 19:19:34 David W Noon wrote:
>> On Fri, 19 Nov 2010 17:00:04 +0100, Peter Humphrey wrote about Re:
>>
>> [gentoo-user] migrating disks (from mounts to disklabels:
>> >On Friday 19 November 2010 14:42:23 Neil Bothwick wrote:
>> >> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote:
>> >> > Also primary partitions which he does not seem to be using at
>> >> > all have a slight edge over logical.
>> >>
>> >> Do you have any data on this? I generally use all logical
>> >> partitions but could be persuaded to rethink.
>> >
>> >Well there must be one level of indirection on first access, since
>> >the start of the logical partition has to be looked up in a
>> >"primary" partition, but I can't imagine that being needed more
>> >than once per reboot.
>>
>> Correct.
>>
>> The same applies to LVM2 or EVMS logical volumes: a small "lookup"
>> penalty (a few milliseconds) when the filesystem is first
>> activated/mounted, and as fast as the drive itself thereafter.
>
>Short of measuring the latency with some system (which I wouldn't know
>how) I have experimented with setting the /boot partition on primary
>and logical partitions and the difference (on a stopwatch) was
>measurable in seconds betweeen having said partition on a primary and
>having it on a logical. Furthermore, sda7 was slower than sda5.
Unless you have the mother of all initrd's or initramfs's, you cannot
have /boot on a logical partition -- only a primary partition, as BIOS
interrupts will only access raw drives and primary partitions. If you do
put /boot on a logical partition, you will pay the "lookup" overhead
repeatedly as part of the early bootstrap process. Since you won't have
a kernel running at that time. no caching, including device mapping,
will be in force. It will be dog slow if /boot is not in the primary
partition table. I always make my /boot partition /dev/sda1, which is
the first primary on the first hard drive.
>I haven't measured latencies for first mount and subsequent look ups.
>I thought that it would be the same every time a partition fs is being
>accessed, no?
No.
The absolute seek addresses of all partitions and logical volumes are
cached by the kernel. Later accesses will always use the cached extent
details. Resizing a logical volume rebuilds that part of the cache and,
if you resize with the filesystem mounted, forces the filesystem driver
to reread the cached extent information.
--
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 13:26 ` David W Noon
@ 2010-11-20 14:57 ` Neil Bothwick
2010-11-20 16:58 ` Arttu V.
2010-11-20 17:24 ` Mick
1 sibling, 1 reply; 32+ messages in thread
From: Neil Bothwick @ 2010-11-20 14:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
On Sat, 20 Nov 2010 13:26:03 +0000, David W Noon wrote:
> Unless you have the mother of all initrd's or initramfs's, you cannot
> have /boot on a logical partition -- only a primary partition, as BIOS
> interrupts will only access raw drives and primary partitions.
% fdisk -l /dev/sda
Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cd4f9
Device Boot Start End Blocks Id System
/dev/sda1 124 1250263039 625131458 5 Extended
/dev/sda5 126 2923829 1461852 82 Linux swap / Solaris
/dev/sda6 2923893 3807404 441756 fd Linux raid autodetect
/dev/sda7 3807468 976848389 486520461 fd Linux raid autodetect
/dev/sda8 976848896 1250263039 136707072 83 Linux
Really? Please don't tell this computer, it's been booting from a logical
partition for more than six years.
--
Neil Bothwick
WinErr 013: Unexpected error - Huh ?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 14:57 ` Neil Bothwick
@ 2010-11-20 16:58 ` Arttu V.
0 siblings, 0 replies; 32+ messages in thread
From: Arttu V. @ 2010-11-20 16:58 UTC (permalink / raw
To: gentoo-user
On 11/20/10, Neil Bothwick <neil@digimed.co.uk> wrote:
> Really? Please don't tell this computer, it's been booting from a logical
> partition for more than six years.
GRUB user, meet a LILO user? :)
--
Arttu V.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 0:22 ` Alan McKinnon
@ 2010-11-20 16:59 ` Mick
2010-11-20 20:46 ` Alan McKinnon
0 siblings, 1 reply; 32+ messages in thread
From: Mick @ 2010-11-20 16:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1026 bytes --]
On Saturday 20 November 2010 00:22:49 Alan McKinnon wrote:
> Apparently, though unproven, at 01:21 on Saturday 20 November 2010, Neil
>
> Bothwick did opine thusly:
> > On Fri, 19 Nov 2010 22:13:50 +0000, Mick wrote:
> > > Short of measuring the latency with some system (which I wouldn't know
> > > how) I have experimented with setting the /boot partition on primary
> > > and logical partitions and the difference (on a stopwatch) was
> > > measurable in seconds betweeen having said partition on a primary and
> > > having it on a logical.
> >
> > Are you talking about GRUB loading time, kernel loading or what?
> > Since /boot isn't normally mounted or used once the kernel is loaded, I
> > don't see how relevant this is.
>
> And:
>
> Boot time differences measured in *seconds*?
>
> fifty bucks says his fsck number came up
Yes, I'm talking about GRUB loading time.
This is a (touch wood) healthy fs which has been serving my wife happily for
the last 4 years ...
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 13:26 ` David W Noon
2010-11-20 14:57 ` Neil Bothwick
@ 2010-11-20 17:24 ` Mick
1 sibling, 0 replies; 32+ messages in thread
From: Mick @ 2010-11-20 17:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1328 bytes --]
On Saturday 20 November 2010 13:26:03 David W Noon wrote:
> On Sat, 20 Nov 2010 00:10:02 +0100, Mick wrote about Re: [gentoo-user]
> >Short of measuring the latency with some system (which I wouldn't know
> >how) I have experimented with setting the /boot partition on primary
> >and logical partitions and the difference (on a stopwatch) was
> >measurable in seconds betweeen having said partition on a primary and
> >having it on a logical. Furthermore, sda7 was slower than sda5.
>
> Unless you have the mother of all initrd's or initramfs's, you cannot
> have /boot on a logical partition -- only a primary partition, as BIOS
> interrupts will only access raw drives and primary partitions. If you do
> put /boot on a logical partition, you will pay the "lookup" overhead
> repeatedly as part of the early bootstrap process. Since you won't have
> a kernel running at that time. no caching, including device mapping,
> will be in force. It will be dog slow if /boot is not in the primary
> partition table.
Thanks David, this explains then why booting from a logical partition takes
longer. After the GRUB code has run the OS loads normally, but that initial
delay is explained by the lookup overhead (hence I thought that no much
caching is happening at that stage).
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 16:59 ` Mick
@ 2010-11-20 20:46 ` Alan McKinnon
2010-11-21 8:44 ` Mick
0 siblings, 1 reply; 32+ messages in thread
From: Alan McKinnon @ 2010-11-20 20:46 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 18:59 on Saturday 20 November 2010, Mick did
opine thusly:
> On Saturday 20 November 2010 00:22:49 Alan McKinnon wrote:
> > Apparently, though unproven, at 01:21 on Saturday 20 November 2010, Neil
> >
> > Bothwick did opine thusly:
> > > On Fri, 19 Nov 2010 22:13:50 +0000, Mick wrote:
> > > > Short of measuring the latency with some system (which I wouldn't
> > > > know how) I have experimented with setting the /boot partition on
> > > > primary and logical partitions and the difference (on a stopwatch)
> > > > was measurable in seconds betweeen having said partition on a
> > > > primary and having it on a logical.
> > >
> > > Are you talking about GRUB loading time, kernel loading or what?
> > > Since /boot isn't normally mounted or used once the kernel is loaded, I
> > > don't see how relevant this is.
> >
> > And:
> >
> > Boot time differences measured in *seconds*?
> >
> > fifty bucks says his fsck number came up
>
> Yes, I'm talking about GRUB loading time.
>
> This is a (touch wood) healthy fs which has been serving my wife happily
> for the last 4 years ...
Was the speed difference a once-off, or is it consistent and reproducible?
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-20 20:46 ` Alan McKinnon
@ 2010-11-21 8:44 ` Mick
0 siblings, 0 replies; 32+ messages in thread
From: Mick @ 2010-11-21 8:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1707 bytes --]
On Saturday 20 November 2010 20:46:48 Alan McKinnon wrote:
> Apparently, though unproven, at 18:59 on Saturday 20 November 2010, Mick
> did
>
> opine thusly:
> > On Saturday 20 November 2010 00:22:49 Alan McKinnon wrote:
> > > Apparently, though unproven, at 01:21 on Saturday 20 November 2010,
> > > Neil
> > >
> > > Bothwick did opine thusly:
> > > > On Fri, 19 Nov 2010 22:13:50 +0000, Mick wrote:
> > > > > Short of measuring the latency with some system (which I wouldn't
> > > > > know how) I have experimented with setting the /boot partition on
> > > > > primary and logical partitions and the difference (on a stopwatch)
> > > > > was measurable in seconds betweeen having said partition on a
> > > > > primary and having it on a logical.
> > > >
> > > > Are you talking about GRUB loading time, kernel loading or what?
> > > > Since /boot isn't normally mounted or used once the kernel is loaded,
> > > > I don't see how relevant this is.
> > >
> > > And:
> > >
> > > Boot time differences measured in *seconds*?
> > >
> > > fifty bucks says his fsck number came up
> >
> > Yes, I'm talking about GRUB loading time.
> >
> > This is a (touch wood) healthy fs which has been serving my wife happily
> > for the last 4 years ...
>
> Was the speed difference a once-off, or is it consistent and reproducible?
It is the latter. Of course this is not important as GRUB is only loaded once
and doesn't affect running the OS thereafter. I think that this behaviour is
explained by the earlier comment about lookup times and BIOS doing no caching
of course. No idea if this would be different on one of the new EFI boot
systems.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [gentoo-user] migrating disks (from mounts to disklabels
2010-11-19 9:04 ` Alan McKinnon
2010-11-19 10:49 ` Marius Vaitiekunas
2010-11-19 10:52 ` Mick
@ 2010-11-23 4:06 ` Walter Dnes
2 siblings, 0 replies; 32+ messages in thread
From: Walter Dnes @ 2010-11-23 4:06 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 19, 2010 at 11:04:26AM +0200, Alan McKinnon wrote
> Seriously dude, this looks like a dumb scheme that gives you warm
> and fuzzies but doesn't actually accomplish anything except increased
> complexity.
I came up with this way back when I was using another distro that
didn't do "rolling upgrades" like Gentoo. As a matter of fact, on
occasion, it wouldn't do *ANY* type of upgrade, except nuke and
re-pave :(
This disk setup allowed me to...
* boot from an install CD
* manually wipe the contents of /boot, /tmp, /var. /usr, opt, /etc, etc.
* and then install the latest version from CD
...*WITHOUT* having to move my data and home directory to another disk
and repartion+reformat+restore.
It also avoided having to re-size partitions whenever my space needs
would change.
All the advantages of lvm without the "increased complexity" of lvm.
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2010-11-23 4:05 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fPYmu-5U7-5@gated-at.bofh.it>
[not found] ` <fQwRb-5kT-3@gated-at.bofh.it>
[not found] ` <fQArM-30Y-7@gated-at.bofh.it>
[not found] ` <fQBxy-4QA-45@gated-at.bofh.it>
2010-11-19 19:19 ` [gentoo-user] migrating disks (from mounts to disklabels David W Noon
2010-11-19 22:13 ` Mick
2010-11-19 22:45 ` Alan McKinnon
2010-11-19 23:21 ` Neil Bothwick
2010-11-20 0:22 ` Alan McKinnon
2010-11-20 16:59 ` Mick
2010-11-20 20:46 ` Alan McKinnon
2010-11-21 8:44 ` Mick
2010-11-20 2:17 ` Peter Humphrey
[not found] <fQEOK-28Y-3@gated-at.bofh.it>
[not found] ` <fQEOK-28Y-9@gated-at.bofh.it>
[not found] ` <fQEOK-28Y-1@gated-at.bofh.it>
[not found] ` <fQIfD-8dr-13@gated-at.bofh.it>
2010-11-20 13:26 ` David W Noon
2010-11-20 14:57 ` Neil Bothwick
2010-11-20 16:58 ` Arttu V.
2010-11-20 17:24 ` Mick
2010-11-17 21:59 James
2010-11-17 22:24 ` Alan McKinnon
2010-11-18 23:47 ` Mick
2010-11-17 22:31 ` Florian Philipp
2010-11-18 8:48 ` Andrea Conti
2010-11-18 11:42 ` Andrea Conti
2010-11-18 4:20 ` Dale
2010-11-19 1:44 ` Walter Dnes
2010-11-19 9:04 ` Alan McKinnon
2010-11-19 10:49 ` Marius Vaitiekunas
2010-11-19 12:07 ` Alan McKinnon
2010-11-19 14:41 ` Neil Bothwick
2010-11-19 15:04 ` Alan McKinnon
2010-11-19 23:03 ` Neil Bothwick
2010-11-19 23:28 ` Alan McKinnon
2010-11-19 10:52 ` Mick
2010-11-19 14:42 ` Neil Bothwick
2010-11-19 15:55 ` Peter Humphrey
2010-11-23 4:06 ` Walter Dnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox